提交 dc9cfc52 编写于 作者: M Mr.doob

OrbitControls: Added warning about target now being immutable.

上级 8e071b41
......@@ -782,6 +782,13 @@
return this.constraint.target;
},
set: function ( value ) {
console.warn( 'THREE.OrbitControls: target is now immutable. Use target.set() instead.' );
this.constraint.target.copy( value );
}
},
......
......@@ -209,7 +209,7 @@
camera.position.set( 0.0, radius, radius * 3.5 );
controls = new THREE.OrbitControls( camera );
controls.target = new THREE.Vector3( 0, radius, 0 );
controls.target.set( 0, radius, 0 );
controls.update();
// Set default weights
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册