This browser has no WebGPU, so the sketch cannot run here. The program is below, and it runs in a current Chrome, Edge or Safari.

Instance Spin

counter act formation rotation and instance rotations

Open in new tab ↗ · 3dformationsinstancing

//////////////////////////////////////
// instance-spin
// counter act formation rotation and instance rotations
/////////////////////////////////////

&dim = (16, 16);
&rotSpeed = 0.005;

#A{
   dim = &dim;
   run = rand(1,2,3);
   every = 12;
}

~A{
   dim = &dim;
   col = #A;
   i_scl = (0.707); 
   rot = (0, 0, mlt(step, -&rotSpeed)); 
   i_rot = (0, 0 , mlt(step, &rotSpeed));
}