Vec3() - newo2001/HTML5-Canvas-Wrapper GitHub Wiki
Creates a Vec3 object.
A float (or int) value to represent the length of the vector's x-component.
A float (or int) value to represent the length of the vector's y-component.
If y is not set it will be initialized with the value of the vector's x-component. A float (or int) value to represent the length of the vector's z-component.
If z is not set it will be initialized with the value of the vector's y-component. A new Vec3 type with the specified lengths.
Creates a Vector of which the x-component is 1.5 long, the y-component is 5.0 long and the z-component is 3.25 long.
new Vec3(x, [y, z])
If y is not set it will be initialized with the value of the vector's x-component. A float (or int) value to represent the length of the vector's z-component.
If z is not set it will be initialized with the value of the vector's y-component. A new Vec3 type with the specified lengths.
let vec = new Vec3(1.5, 5, 3.25);
- This is the constructor for the Vec3 type.