Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Variable CanvasConst

    Canvas: {
        blurQuality: number;
        blurStrength: number;
        brightestColor: number;
        chatBubblesClass: typeof ChatBubbles;
        darknessAnimations: DarknessSourceAnimationConfig;
        darknessColor: number;
        darknessLightPenalty: number;
        darknessSourceClass: typeof PointDarknessSource;
        darknessSourcePaddingMultiplier: number;
        darknessToDaylightAnimationMS: number;
        daylightColor: number;
        daylightToDarknessAnimationMS: number;
        dispositionColors: {
            CONTROLLED: number;
            FRIENDLY: number;
            HOSTILE: number;
            INACTIVE: number;
            NEUTRAL: number;
            PARTY: number;
            SECRET: number;
        };
        doorControlClass: typeof DoorControl;
        dragSpeedModifier: number;
        elevationSnappingPrecision: number;
        exploredColor: number;
        fogManager: typeof FogManager;
        globalLightSourceClass: typeof GlobalLightSource;
        gridStyles: {
            dashedLines: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
            diamondPoints: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
            dottedLines: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
            roundPoints: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
            solidLines: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
            squarePoints: {
                label: string;
                shaderClass: typeof GridShader;
                shaderOptions: { style: number };
            };
        };
        groups: {
            effects: { groupClass: typeof EffectsCanvasGroup; parent: string };
            environment: { groupClass: typeof EnvironmentCanvasGroup; parent: string };
            hidden: { groupClass: typeof HiddenCanvasGroup; parent: string };
            interface: {
                groupClass: typeof InterfaceCanvasGroup;
                parent: string;
                zIndexDrawings: number;
                zIndexScrollingText: number;
            };
            overlay: { groupClass: typeof OverlayCanvasGroup; parent: string };
            primary: { groupClass: typeof PrimaryCanvasGroup; parent: string };
            rendered: { groupClass: typeof RenderedCanvasGroup; parent: string };
            visibility: { groupClass: typeof CanvasVisibility; parent: string };
        };
        hoverFade: object;
        layers: {
            controls: { group: string; layerClass: typeof ControlsLayer };
            drawings: { group: string; layerClass: typeof DrawingsLayer };
            grid: { group: string; layerClass: typeof GridLayer };
            lighting: { group: string; layerClass: typeof LightingLayer };
            notes: { group: string; layerClass: typeof NotesLayer };
            regions: { group: string; layerClass: typeof RegionLayer };
            sounds: { group: string; layerClass: typeof SoundsLayer };
            tiles: { group: string; layerClass: typeof TilesLayer };
            tokens: { group: string; layerClass: typeof TokenLayer };
            walls: { group: string; layerClass: typeof WallsLayer };
            weather: { group: string; layerClass: typeof WeatherEffects };
        };
        lightAnimations: LightSourceAnimationConfig;
        lightLevels: {
            bright: number;
            dark: number;
            dim: number;
            halfdark: number;
        };
        lightSourceClass: typeof PointLightSource;
        managedScenes: Record<string, typeof SceneManager | SceneManager>;
        maxZoom: undefined;
        minZoom: undefined;
        objectBorderThickness: number;
        pings: {
            pullSpeed: number;
            styles: {
                alert: {
                    class: typeof AlertPing;
                    color: string;
                    duration: number;
                    size: number;
                };
                arrow: { class: typeof ArrowPing; duration: number; size: number };
                chevron: { class: typeof ChevronPing; duration: number; size: number };
                pulse: { class: typeof PulsePing; duration: number; size: number };
            };
            types: { ALERT: string; ARROW: string; PULL: string; PULSE: string };
        };
        polygonBackends: {
            darkness: typeof ClockwiseSweepPolygon;
            light: typeof ClockwiseSweepPolygon;
            move: typeof ClockwiseSweepPolygon;
            sight: typeof ClockwiseSweepPolygon;
            sound: typeof ClockwiseSweepPolygon;
        };
        rulerClass: typeof Ruler;
        sceneTransitions: Record<string, SceneTransitionDefinition>;
        soundSourceClass: typeof PointSoundSource;
        targeting: { size: number };
        unexploredColor: number;
        vfx: {
            animations: Record<string, VFXComponentAnimation>;
            components: Record<string, typeof VFXComponent>;
            enabled: boolean;
            paths: Record<string, VFXPathGenerator>;
        };
        visibilityFilter: typeof VisibilityFilter;
        visionSourceClass: typeof PointVisionSource;
        visualEffectsMaskingFilter: typeof VisualEffectsMaskingFilter;
        get detectionModes(): Record<string, DetectionMode>;
        get visionModes(): Record<string, VisionMode>;
    } = ...

    Configuration settings for the Canvas and its contained layers and objects

    Type Declaration

    • blurQuality: number
    • blurStrength: number
    • brightestColor: number
    • chatBubblesClass: typeof ChatBubbles
    • darknessAnimations: DarknessSourceAnimationConfig
    • darknessColor: number
    • darknessLightPenalty: number
    • darknessSourceClass: typeof PointDarknessSource
    • darknessSourcePaddingMultiplier: number
    • darknessToDaylightAnimationMS: number
    • daylightColor: number
    • daylightToDarknessAnimationMS: number
    • dispositionColors: {
          CONTROLLED: number;
          FRIENDLY: number;
          HOSTILE: number;
          INACTIVE: number;
          NEUTRAL: number;
          PARTY: number;
          SECRET: number;
      }
    • doorControlClass: typeof DoorControl

      The class used to render door control icons.

    • dragSpeedModifier: number
    • elevationSnappingPrecision: number
    • exploredColor: number
    • fogManager: typeof FogManager
    • globalLightSourceClass: typeof GlobalLightSource
    • gridStyles: {
          dashedLines: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
          diamondPoints: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
          dottedLines: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
          roundPoints: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
          solidLines: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
          squarePoints: {
              label: string;
              shaderClass: typeof GridShader;
              shaderOptions: { style: number };
          };
      }
    • groups: {
          effects: { groupClass: typeof EffectsCanvasGroup; parent: string };
          environment: { groupClass: typeof EnvironmentCanvasGroup; parent: string };
          hidden: { groupClass: typeof HiddenCanvasGroup; parent: string };
          interface: {
              groupClass: typeof InterfaceCanvasGroup;
              parent: string;
              zIndexDrawings: number;
              zIndexScrollingText: number;
          };
          overlay: { groupClass: typeof OverlayCanvasGroup; parent: string };
          primary: { groupClass: typeof PrimaryCanvasGroup; parent: string };
          rendered: { groupClass: typeof RenderedCanvasGroup; parent: string };
          visibility: { groupClass: typeof CanvasVisibility; parent: string };
      }
    • hoverFade: object

      The hover-fading configuration.

    • layers: {
          controls: { group: string; layerClass: typeof ControlsLayer };
          drawings: { group: string; layerClass: typeof DrawingsLayer };
          grid: { group: string; layerClass: typeof GridLayer };
          lighting: { group: string; layerClass: typeof LightingLayer };
          notes: { group: string; layerClass: typeof NotesLayer };
          regions: { group: string; layerClass: typeof RegionLayer };
          sounds: { group: string; layerClass: typeof SoundsLayer };
          tiles: { group: string; layerClass: typeof TilesLayer };
          tokens: { group: string; layerClass: typeof TokenLayer };
          walls: { group: string; layerClass: typeof WallsLayer };
          weather: { group: string; layerClass: typeof WeatherEffects };
      }
    • lightAnimations: LightSourceAnimationConfig
    • lightLevels: { bright: number; dark: number; dim: number; halfdark: number }
    • lightSourceClass: typeof PointLightSource
    • managedScenes: Record<string, typeof SceneManager | SceneManager>

      A registry of Scenes which are managed by a specific SceneManager class or instance.

    • maxZoom: undefined
    • minZoom: undefined
    • objectBorderThickness: number
    • pings: {
          pullSpeed: number;
          styles: {
              alert: {
                  class: typeof AlertPing;
                  color: string;
                  duration: number;
                  size: number;
              };
              arrow: { class: typeof ArrowPing; duration: number; size: number };
              chevron: { class: typeof ChevronPing; duration: number; size: number };
              pulse: { class: typeof PulsePing; duration: number; size: number };
          };
          types: { ALERT: string; ARROW: string; PULL: string; PULSE: string };
      }
    • polygonBackends: {
          darkness: typeof ClockwiseSweepPolygon;
          light: typeof ClockwiseSweepPolygon;
          move: typeof ClockwiseSweepPolygon;
          sight: typeof ClockwiseSweepPolygon;
          sound: typeof ClockwiseSweepPolygon;
      }
    • rulerClass: typeof Ruler
    • sceneTransitions: Record<string, SceneTransitionDefinition>
    • soundSourceClass: typeof PointSoundSource
    • targeting: { size: number }
    • unexploredColor: number
    • vfx: {
          animations: Record<string, VFXComponentAnimation>;
          components: Record<string, typeof VFXComponent>;
          enabled: boolean;
          paths: Record<string, VFXPathGenerator>;
      }

      Configuration for the foundry.canvas.vfx module. This configuration is used to register named components, animations, and presets which can be invoked within VFXEffect instances.

      • animations: Record<string, VFXComponentAnimation>

        Named animations that may be called as part of a component.

      • components: Record<string, typeof VFXComponent>

        Named VFXComponent subclasses which can be used to orchestrate different types of visual effects.

      • enabled: boolean

        The Foundry VTT version 14 VFX framework is EXPERIMENTAL. Its classes, functions, and configuration are likely to change over coming releases. The entire VFX module should be treated as non-stable regardless of the stability designation of the release build that contains it. You may use this experimental framework by enabling it via CONFIG.Canvas.vfx.enabled.

      • paths: Record<string, VFXPathGenerator>

        Named path generator functions that may be called as part of a component.

    • visibilityFilter: typeof VisibilityFilter
    • visionSourceClass: typeof PointVisionSource
    • visualEffectsMaskingFilter: typeof VisualEffectsMaskingFilter
    • get detectionModes(): Record<string, DetectionMode>

      The set of DetectionMode definitions which are available to be used for visibility detection.

    • get visionModes(): Record<string, VisionMode>

      The set of VisionMode definitions which are available to be used for Token vision.