- Timestamp:
- 2015-02-09T09:51:09+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nz-flag-design/trunk/render-3d/weather/rain.js
r29694 r29719 39 39 // create a velocity vector 40 40 this.particle.velocity = new THREE.Vector3( 41 (windForce.x * this.MASS), // x41 (windForce.x * (1-this.MASS)), // x 42 42 -Math.random() * 0.01, // y 43 (windForce.z * this.MASS)); // z43 (windForce.z * (1-this.MASS))); // z 44 44 45 45 // add it to the geometry … … 76 76 this.particle.x = (Math.random() * 10000) - 5000; 77 77 this.particle.z = (Math.random() * 10000) - 5000; 78 79 78 } 80 79 81 80 // update the velocity 82 81 this.particle.velocity.y -= Math.random() * 0.01; 82 this.particle.velocity.x = windForce.x * (1-this.MASS); 83 this.particle.velocity.z = windForce.z * (1-this.MASS) 83 84 84 85 // and the position
Note:
See TracChangeset
for help on using the changeset viewer.