OrbitControls
Orbit controller based on three/addons. Automatically hooks into the render loop after installation.
Usage
ts
import { create3dApp } from '@threeuse/core'
import { OrbitControls } from '@threeuse/core/plugins'
const app = create3dApp()
app.use(OrbitControls, {
enableDamping: true,
dampingFactor: 0.05,
})
app.$orbitControls // OrbitControls instanceOptions
| Option | Type | Default | Description |
|---|---|---|---|
enableDamping | boolean | true | Enable damping (inertia) |
dampingFactor | number | 0.05 | Damping coefficient |
enableZoom | boolean | true | Enable zoom |
enablePan | boolean | true | Enable panning |
autoRotate | boolean | false | Auto rotate |
autoRotateSpeed | number | 2 | Auto rotate speed |
Demo
拖拽旋转 · 滚轮缩放 · 右键平移