+ simulate(dt) {\r
+ let now = performance.now();\r
+ for (let particle of this.particles) {\r
+ let vertex = particle.position;\r
+ let fWind = new THREE.Vector3(\r
+ this.windFactor.x * (Math.sin(vertex.x * vertex.y * now)+1),\r
+ this.windFactor.y * Math.cos(vertex.z * now),\r
+ this.windFactor.z * Math.sin(Math.cos(5 * vertex.x * vertex.y * vertex.z))\r
+ );\r
+ // normalize then multiply?\r
+ particle.addForce(fWind);\r
+ // calculate wind with normal?\r
+\r
+ particle.addForce(GRAVITY);\r
+\r
+ particle.verlet(dt);\r
+ }\r