mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Removed center() method, added getCenter(), updated examples
This commit is contained in:
+2
-1
@@ -62,7 +62,8 @@ void draw () {
|
||||
|
||||
if (lifetimes[n] == 0) {
|
||||
// Re-spawn dead particle
|
||||
part.center(mouseX, mouseY);
|
||||
PVector center = part.getCenter();
|
||||
part.translate(mouseX - center.x, mouseY - center.y);
|
||||
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