我尝试在我的项目中使用trackballcontrols.js,但需要一些修改,而且我无法理解这些代码,你能给我一些解释吗?
var getMouseOnCircle = ( function () {
var vector = new THREE.Vector2();
return function getMouseOnCircle( pageX, pageY ) {
vector.set(
( ( pageX - _this.screen.width * 0.5 - _this.screen.left ) / ( _this.screen.width * 0.5 ) ),
( ( _this.screen.height + 2 * ( _this.screen.top - pageY ) ) / _this.screen.width ) // screen.width intentional
);
return vector;
};
}() );
最佳答案
关于javascript - 当我使用trackballcontrols.js时关于三个.js的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45315751/