A container group which contains the primary canvas group and the effects canvas group.

Hierarchy

  • any
    • EnvironmentCanvasGroup

Properties

colors: {
    darkness: any;
    halfdark: any;
    background: any;
    dim: any;
    bright: any;
    ambientBrightest: any;
    ambientDaylight: any;
    ambientDarkness: any;
    sceneBackground: any;
    fogExplored: any;
    fogUnexplored: any;
} = ...

Colors exposed by the manager.

Type declaration

  • darkness: any
  • halfdark: any
  • background: any
  • dim: any
  • bright: any
  • ambientBrightest: any
  • ambientDaylight: any
  • ambientDarkness: any
  • sceneBackground: any
  • fogExplored: any
  • fogUnexplored: any
weights: {
    dark: any;
    halfdark: any;
    dim: any;
    bright: any;
} = ...

Weights used by the manager to compute colors.

Type declaration

  • dark: any
  • halfdark: any
  • dim: any
  • bright: any
#darknessLevel: number

The scene darkness level.

#eventBoundary: EventBoundary

Contains a list of subscribed function for darkness handler.

groupName: string = "environment"
tearDownChildren: boolean = false
#fallbackColors: {
    darknessColor: number;
    daylightColor: number;
    brightestColor: number;
    backgroundColor: number;
    fogUnexplored: number;
    fogExplored: number;
} = ...

Fallback colors.

Type declaration

  • darknessColor: number
  • daylightColor: number
  • brightestColor: number
  • backgroundColor: number
  • fogUnexplored: number
  • fogExplored: number

Accessors

  • get darknessLevel(): number
  • Get the darkness level of this scene.

    Returns number

Methods

  • Parameters

    • options: any

    Returns Promise<void>

  • Initialize the scene environment options.

    Parameters

    • Optional config: {
          backgroundColor: ColorSource;
          brightestColor: ColorSource;
          darknessColor: ColorSource;
          daylightColor: ColorSource;
          fogExploredColor: ColorSource;
          fogUnexploredColor: ColorSource;
          environment: SceneEnvironmentData;
      } = {}
      • backgroundColor: ColorSource

        The background canvas color

      • brightestColor: ColorSource

        The brightest ambient color

      • darknessColor: ColorSource

        The color of darkness

      • daylightColor: ColorSource

        The ambient daylight color

      • fogExploredColor: ColorSource

        The color applied to explored areas

      • fogUnexploredColor: ColorSource

        The color applied to unexplored areas

      • environment: SceneEnvironmentData

        The scene environment data

    Returns void

    Fires

    PIXI.FederatedEvent type: "darknessChange" - event: {environmentData: {darknessLevel, priorDarknessLevel}}

  • Configure all colors pertaining to a scene.

    Parameters

    • Optional options: {
          fogExploredColor: ColorSource;
          fogUnexploredColor: ColorSource;
          backgroundColor: ColorSource;
      } = {}

      Preview options.

      • fogExploredColor: ColorSource

        A preview fog explored color.

      • fogUnexploredColor: ColorSource

        A preview fog unexplored color.

      • backgroundColor: ColorSource

        The background canvas color.

    Returns void

  • Configure the ambience filter for scene ambient lighting.

    Parameters

    • Optional environment: SceneEnvironmentData = {}

      The scene environment data object.

    Returns void

  • Configure the ambience filter.

    Parameters

    • environment: SceneEnvironmentData

    Returns void

  • Configure the global light.

    Parameters

    • environment: SceneEnvironmentData

    Returns void