Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
update(i, count) {
this.color = interpolateViridis(i / count);
this.g.update(i);
this.w.update(i);
this.s.update(i);
this.p.update(i);
this.gx = this.g.x * magnitude + ww;
this.gy = this.g.y * magnitude + wh;
this.wx = this.w.x * magnitude + ww;
this.wy = this.w.y * magnitude + wh;
this.sx = this.s.x * magnitude + ww;
this.sy = this.s.y * magnitude + wh;
this.px = this.p.x * magnitude + ww;
this.py = this.p.y * magnitude + wh;
}
update(i, count) {
this.color = interpolateViridis(i / count);
this.g.update(i);
this.w.update(i);
this.s.update(i);
this.p.update(i);
this.gx = this.g.x * magnitude + ww;
this.gy = this.g.y * magnitude + wh;
this.wx = this.w.x * magnitude + ww;
this.wy = this.w.y * magnitude + wh;
this.sx = this.s.x * magnitude + ww;
this.sy = this.s.y * magnitude + wh;
this.px = this.p.x * magnitude + ww;
this.py = this.p.y * magnitude + wh;
}
makePoints(count) {
const newPoints = [];
for (var i = 0; i < count; i++) {
newPoints.push({
x: 0,
y: 0,
color: interpolateViridis(i / count),
});
}
this.setAnchors(newPoints);
}