mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
updated example so it doesn't use getCenter
This commit is contained in:
+2
-2
@@ -62,8 +62,8 @@ void draw () {
|
||||
|
||||
if (lifetimes[n] == 0) {
|
||||
// Re-spawn dead particle
|
||||
PVector center = part.getCenter();
|
||||
part.translate(mouseX - center.x, mouseY - center.y);
|
||||
part.resetMatrix();
|
||||
part.translate(mouseX, mouseY);
|
||||
float angle = random(0, TWO_PI);
|
||||
float s = random(0.5 * speed, 0.5 * speed);
|
||||
velocities[n].x = s * cos(angle);
|
||||
|
||||
Reference in New Issue
Block a user