Module for displaying outlines.

Hierarchy (view full)

Constructors

Properties

config: Config = ...

Default config.

outlineDict: {
    [key: string]: Uniforms;
} = {}

Mapping outline collection name with corresponding uniforms.

pixiOverlay: pixiOverlayBase

Function for pixi overlay.

root: Container<DisplayObject>

Root container for layer.

scaling: ((zoom: number) => number)
spawned: Mesh<MeshMaterial>[] = []

Graphic elements currently existing in world space.

state: State = ...
visibility: boolean = true

True if layer is currently visible.

fragmentShader: string

Fragment shader for the outlines.

vertexShader: string

Vertex shader for the outlines.

Methods

  • Set collection of outlines to display. Clears previous content on execution.

    Parameters

    • data: OutlineData[]

      Outlines to draw

    Returns void

  • Set visibility of the root PIXI container to a given value.

    Parameters

    • visible: boolean

      Should layer be visible?

    Returns boolean

    True if new visibility was set

  • Set visibility for outline layers.

    Parameters

    • names: string[]

      Names of collections to modify

    Returns void

    setVisibleLayers(['OWC', 'GOC']);