mirror of
https://github.com/tiennm99/webgl-heart.git
synced 2026-10-13 02:14:53 +00:00
slow down
This commit is contained in:
1 parent
9898a5bad9
commit
710b207f72
1 file changed
+2
-2
@@ -56,7 +56,7 @@
|
||||
const xSize = 50;
|
||||
const ySize = 50;
|
||||
const zSize = 50;
|
||||
const density = 3;
|
||||
const density = 2;
|
||||
const nParticles = xSize * ySize * zSize * density;
|
||||
|
||||
const positions = [];
|
||||
@@ -104,7 +104,7 @@
|
||||
float pLimit = 0.675;
|
||||
float nLimit = -pLimit;
|
||||
float nullPoint = 0.5;
|
||||
float scaledT = time * 1.3;
|
||||
float scaledT = time * 1.1;
|
||||
float dt = scaledT - pLimit * ( 2. * floor( scaledT / (pLimit* 2.)) + 1.);
|
||||
float r = 15. + 1.2 * pow(sin(2. * PI * dt), 4.);
|
||||
if (dt < -nullPoint || dt > nullPoint) {
|
||||
|
||||
Reference in new issue
Block a user