如何围绕轴旋转Three.js Vector3?

时间:2012-05-25 01:47:59

标签: javascript vector rotation three.js

如何围绕轴旋转一个特定角度的Three.js Vector3

1 个答案:

答案 0 :(得分:66)

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 );