class ProjectileLayer extends Layer { ParticleSystem system; float MASS = 1.0f; float VELOCITY_Y = -10.0f; float MUZZLE_VELOCITY = -1.0f; int THRESHOLD_Z = -10; int PROJECTILE_SIZE = 20; float GRAVITY = 1.5f; ProjectileLayer(PApplet parent) { super(parent, P3D); } void setup() { system = new ParticleSystem(GRAVITY, 0.001f); colorMode(HSB); } void draw() { background(0, 0); noStroke(); lights(); if (mousePressed) { fire(); } system.tick(); int i = 0; while(i