web-dev-qa-db-fra.com

Comment faire pivoter un Three.js Vector3 autour d'un axe?

Comment faire pivoter un Three.js Vector d'un certain angle autour d'un axe?

24
MaiaVictor
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 );
71
mrdoob