DeadZone Community Packages
    Preparing search index...

    Class OverlayItem3DBuilder

    Builder class for creating 3D overlay items with a fluent API. Allows configuring various properties such as NPCs, game objects, highlights, and text labels.

    var item = OverlayItem3D.builder()
    .addWorldPoint(wp)
    .highlightTile("#ad1010")
    .addText("DANGER!")
    .build();
    Index

    Constructors

    Methods

    • Adds a game object to the overlay.

      Parameters

      • gameObject: any

        The game object to overlay.

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Adds an NPC to the overlay by its index.

      Parameters

      • index: number

        The index of the NPC to overlay.

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Adds a player to the overlay.

      Parameters

      • player: any

        The player object to overlay.

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Adds text to display with the overlay.

      Parameters

      • text: string

        The text label to display.

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Builds and activates the 3D overlay with the configured properties. Generates a unique UUID for the overlay and registers it with the overlay system.

      Returns OverlayItem3DBuilder

      The current builder instance, allowing access to the remove method.

    • Highlights the hull (model outline) with the specified color.

      Parameters

      • color: string

        The color to use for highlighting the hull (e.g., "#00FF00").

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Highlights the tile with the specified color.

      Parameters

      • color: string

        The color to use for highlighting the tile (e.g., "#FF0000").

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.

    • Removes the 3D overlay from the game world. Call this method when the overlay is no longer needed.

      Returns void

    • Sets the lifetime of the overlay in game ticks. If not set, the overlay will persist indefinitely until removed.

      Parameters

      • ticks: number

        The number of game ticks the overlay should remain active.

      Returns OverlayItem3DBuilder

      The current builder instance for method chaining.