)
        instancedMesh.setMatrixAt(i, dummy.matrix)

        // save the initial position and rotation
        initialPositions.push(dummy.position.clone())
        initialRotations.push(dummy.rotation.clone())
      }

      webgl.scene.add(instancedMesh)

      const params = { speed: 0.3 }
      webgl.gui.add(params, 'speed', -1, 1)

      let t = 0
      webgl.onUpdate((dt) => {
        t += dt * params.speed

        // rotate the elements each frame,
        // this is a bit expensive, even without p