WebGL experiment part 3
A very small update from part 2.
We will only rotate our elements.
(image from NeHe website)
We will create our elements as usual, and then apply rotation on them
Square rotation, along y axis:
var triangle = drawTriangle(scene); triangle.rotation = new BABYLON.Vector3(0, -Math.PI/4, 0);
Square rotation, along x axis:
var square = drawSquare(scene); square.rotation = new BABYLON.Vector3(Math.PI/4, 0, 0);
You will find more information about rotation and scaling on this BabylonJS tutorial.
Next lesson will be about creating 3d objects. OH YEAH.