提交 370b0e85 编写于 作者: L Lewy Blue

convert preRotations with builtin function

上级 867e4174
......@@ -1821,7 +1821,7 @@
if ( 'PreRotation' in node.properties ) {
var preRotations = new THREE.Euler().setFromVector3( parseVector3( node.properties.PreRotation ).multiplyScalar( Math.PI / 180 ), 'ZYX' );
var preRotations = new THREE.Euler().fromArray( node.properties.PreRotation.value.map( THREE.Math.degToRad ), 'ZYX' );
preRotations = new THREE.Quaternion().setFromEuler( preRotations );
var currentRotation = new THREE.Quaternion().setFromEuler( model.rotation );
preRotations.multiply( currentRotation );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册