Wednesday 20 August 2014

Three.js Final


Here I am making a new shape. This is a octahedron wireframe with a line width of 2.2 and a radius of 115.

 Next I copied the code from the GUI into the editor. 


 And assigned a script which rotates the shape.


Next I customized the rotation speed. The values I put happened to have a cool effect where after a period of time, the individual rotations would almost cancel each other out and it would cause the shape to almost stop and vibrate erratically. 


Next I made my own simple for loop. 
This starts at zero, and as long as the i value is less than 0.01, it will increment in steps of +1.
I then changed the mesh.rotation.z value to i.
This caused the whole shape to vibrate continuously. But still periodically halting rotation and vibrating on the spot.


I then wanted to multiply this shape, however the code for this in the snippets menu already used a for loop with i as a variable. This means that I will need to change this a bit.


I then changed the variable to j and pasted it into my code



After adding the replication code, only one of the shapes had the rotation animation applied.




No comments:

Post a Comment