MCPcopy
hub / github.com/mudler/LocalAI / update

Method update

core/http/static/p2panimation.js:32–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 }
31
32 update() {
33 if (!isDragging || dragParticle !== this) {
34 this.x += this.speedX;
35 this.y += this.speedY;
36
37 // Bounce off the edges of the canvas
38 if (this.x < 0 || this.x > canvas.width) {
39 this.speedX *= -1;
40 }
41 if (this.y < 0 || this.y > canvas.height) {
42 this.speedY *= -1;
43 }
44 }
45 }
46
47 draw() {
48 ctx.beginPath();

Callers 1

animateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected