ecspresso
    Preparing search index...
    • Create a 3D transform plugin for ECSpresso.

      This plugin provides:

      • 3D transform propagation system that computes world transforms from local transforms
      • Parent-first traversal ensures parents are processed before children
      • Supports full 3D transform hierarchy (position, rotation, scale)
      • Rotation composed via quaternions internally for correctness

      Type Parameters

      • G extends string = "transform3d"

      Parameters

      Returns Plugin<
          WithComponents<EmptyConfig, Transform3DComponentTypes>,
          EmptyConfig,
          "transform3d-propagation",
          G,
          never,
          never,
      >

      const ecs = ECSpresso.create()
      .withPlugin(createTransform3DPlugin())
      .withComponentTypes<{ velocity: { x: number; y: number; z: number } }>()
      .build();

      ecs.spawn({
      ...createTransform3D(10, 5, -20),
      velocity: { x: 1, y: 0, z: 0 },
      });