Options
All
  • Public
  • Public/Protected
  • All
Menu

A singleton class dedicated to manage the color spaces associated with the scene and the canvas.

Hierarchy

  • CanvasColorManager

Index

Constructors

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.

#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 darknessPenalty(): number
  • Returns the darkness penalty for the actual scene configuration.

    Returns number

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

    Returns number

Methods

  • initialize([colors={}]?: { backgroundColor: string | number | typeof utils.Color; brightestColor: string | number | typeof utils.Color; darknessColor: string | number | typeof utils.Color; darknessLevel: number; daylightColor: string | number | typeof utils.Color; fogExploredColor: number; fogUnexploredColor: number }): void
  • Initialize color space pertaining to a specific scene.

    Parameters

    • [colors={}]: { backgroundColor: string | number | typeof utils.Color; brightestColor: string | number | typeof utils.Color; darknessColor: string | number | typeof utils.Color; darknessLevel: number; daylightColor: string | number | typeof utils.Color; fogExploredColor: number; fogUnexploredColor: number } = {}
      • backgroundColor: string | number | typeof utils.Color
      • brightestColor: string | number | typeof utils.Color
      • darknessColor: string | number | typeof utils.Color
      • darknessLevel: number
      • daylightColor: string | number | typeof utils.Color
      • fogExploredColor: number
      • fogUnexploredColor: number

    Returns void

  • #configureColors(scene: Scene, [options={}]?: { fogExploredColor: number; fogUnexploredColor: number; backgroundColor: number }): void
  • Configure all colors pertaining to a scene.

    Parameters

    • scene: Scene

      The scene document for which colors are configured.

    • [options={}]: { fogExploredColor: number; fogUnexploredColor: number; backgroundColor: number } = {}

      Preview options.

      • fogExploredColor: number
      • fogUnexploredColor: number
      • backgroundColor: number

    Returns void