Friday, 3 February 2017

(Year 3 Sem C) Working on Technical

Since the particles can move around by applying the code. Therefore, I decided to try to stop by using click function.

I have applied the code as below:

function onDocumentMouseClick(){
isMouseDown = true;
console.log ('Mouse Click');
}


function onDocumentMouseUp(){
isMouseDown = false;
console.log ('Mouse True');
}


After applying the code, the particles can be clicked and moved to the certain position.




Therefore. I decided to make some adjustment for the particle's position.The position of the particles is separated to three row and each row will have 14 particles. Besides, I also decided to make all the particles be rotated.

Reference Link:

Barkofthebyte.azurewebsites.net. (2017). three.js canvas - interactive - cubes. [online] Available at: http://barkofthebyte.azurewebsites.net/demos/projspikesfs.htm [Accessed 12 Feb. 2017].

Barkofthebyte.azurewebsites.net. (2017). Three.js projecting mouse clicks to a 3D scene - how to do it and how it works. [online] Available at: http://barkofthebyte.azurewebsites.net/post/2014/05/05/three-js-projecting-mouse-clicks-to-a-3d-scene-how-to-do-it-and-how-it-works [Accessed 3 Feb. 2017].

CodePen. (2017). Three.JS orbit controls example. [online] Available at: https://codepen.io/anon/pen/EZEOoy [Accessed 3 Feb. 2017].

clicked, t. (2017). three.js: stop automatic rotation while mouse is clicked. [online] Stackoverflow.com. Available at: http://stackoverflow.com/questions/39449582/three-js-stop-automatic-rotation-while-mouse-is-clicked [Accessed 3 Feb. 2017].

No comments:

Post a Comment