", onWindowResize);
      }

      function transform(targets, duration) {
        TWEEN.removeAll();

        for (let i = 0; i < objects.length; i++) {
          const object = objects[i];
          const target = targets[i];

          new TWEEN.Tween(object.position)
            .to(
              {
                x: target.position.x,
                y: target.position.y,
                z: target.position.z,
              },
              Math.random() * duration + duration
            )
            