import { Vector3 } from "https://deno.land/x/threejs_4_deno@v121/src/Three.d.ts";
3D vector.
Examples
const a = new THREE.Vector3( 1, 0, 0 );
const b = new THREE.Vector3( 0, 1, 0 );
const c = new THREE.Vector3();
c.crossVectors( a, b );
const a = new THREE.Vector3( 1, 0, 0 ); const b = new THREE.Vector3( 0, 1, 0 ); const c = new THREE.Vector3(); c.crossVectors( a, b );
Methods
Sets this vector to a + b.
Clones this vector.
Sets this vector to cross product of a and b.
Computes distance of this vector to v.
Computes squared distance of this vector to v.
Divides this vector by scalar s. Set vector to ( 0, 0, 0 ) if s == 0.
Sets this vector's x, y and z value from the provided array.
Sets this vector's x, y and z value from the provided array-like.
Computes length of this vector.
Computes Manhattan length of this vector. http://en.wikipedia.org/wiki/Taxicab_geometry
Computes squared length of this vector.
Computes the Manhattan length (distance) from this vector to the given vector v
Computes the Manhattan length of this vector.
Multiplies this vector by scalar s.
Inverts this vector.
Normalizes this vector.
Sets this vector's x, y and z from Math.random
Sets value of this vector.
Normalizes this vector and multiplies it by l.
Sets all values of this vector.
Sets this vector to a - b.
Returns an array [x, y, z], or copies x, y and z into the provided array.
Copies x, y and z into the provided array-like.