ecspresso
    Preparing search index...
    • Create both local and world 3D transform components. World transform is initialized to match local transform.

      Parameters

      Returns Transform3DComponentTypes

      ecs.spawn({
      ...createTransform3D(10, 5, -20),
      mesh: myMesh,
      });

      // With rotation and scale
      ecs.spawn({
      ...createTransform3D(10, 5, -20, {
      rotation: { y: Math.PI / 4 },
      scale: 2,
      }),
      mesh: myMesh,
      });