|
@@ -119,11 +119,15 @@ export default {
|
|
|
} */
|
|
|
this.renderer.render(this.scene, this.camera)
|
|
|
this.css2DRenderer.render(this.scene, this.camera)
|
|
|
+ this.controls.update()
|
|
|
requestAnimationFrame(this.render)
|
|
|
},
|
|
|
- // 创建控件对象
|
|
|
+ // 创建控件对象,并设置自动旋转
|
|
|
createControls () {
|
|
|
this.controls = new OrbitControls(this.camera, this.renderer.domElement)
|
|
|
+ this.controls.autoRotate = true
|
|
|
+ this.controls.autoRotateSpeed = 0.5
|
|
|
+ this.controls.dampingFactor = 0.9
|
|
|
},
|
|
|
rayCasterFn () {
|
|
|
// 画布添加事件监听
|