Utility class to create primitive objects

Example

const cube = ObjectUtils.createPrimitive("Cube", { name: "Cube", position: { x: 0, y: 0, z: 0 } });

Constructors

Methods

  • Creates an occluder object that only render depth but not color

    Parameters

    • type: "Quad" | "Cube" | "Sphere" | "RoundedCube"

      The type of primitive to create

    Returns Mesh

    The created object

  • Creates a primitive object like a Cube or Sphere

    Parameters

    • type: "ShaderBall"

      The type of primitive to create

    • Optional opts: ObjectOptions

      Options to create the object

    Returns Group

    The created object

  • Parameters

    • type: PrimitiveType | "Quad" | "Cube" | "Sphere" | "RoundedCube"
    • Optional opts: ObjectOptions

    Returns Mesh

  • Creates a Sprite object

    Parameters

    Returns Sprite

    The created object

  • Creates a 3D text object

    Parameters

    • text: string

      The text to display

    • Optional opts: TextOptions

      Options to create the object

    Returns Mesh

Generated using TypeDoc