How to rotate a Three.js Vector3 around an axis?

2019-01-16 10:21发布

问题:

How to rotate a Three.js Vector3 by a certain angle around an axis?

回答1:

var vector = new THREE.Vector3( 1, 0, 0 );

var axis = new THREE.Vector3( 0, 1, 0 );
var angle = Math.PI / 2;

vector.applyAxisAngle( axis, angle );