three.js - Three js particle system with mouse interaction -
i try change behaviour particles example: http://threejs.org/examples/#webgl_particles_random
to more this: http://minimal.be/lab/flugl/
now when change fragment of code:
( = 0; < scene.children.length; ++ ) { var object = scene.children[ ]; if ( object instanceof three.particlesystem ) { object.rotation.z = time * ( < 4 ? + 1 : - ( + 1 ) ); } } into that:
( = 0; < scene.children.length; ++ ) { var object = scene.children[ ]; if ( object instanceof three.particlesystem ) { object.position.x = mousex; object.position.y = -mousey; } } all particles move globally without change distance , velocity. change, present example. how modify code, avoid global changes in move particles? have change in shaders? or particle system in three.js enough create mouse attractor behaviour?
Comments
Post a Comment