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

    A specialized subclass of RenderedEffectSource which represents a source of point-based vision.

    Hierarchy

    • any
      • PointVisionSource
    Index

    Constructors

    Properties

    _visionModeActivated: boolean = false

    The vision mode activation flag for handlers

    blinded: Record<string, boolean> = {}

    Records of blinding strings with a boolean value. By default, if any of this record is true, the source is blinded.

    light: PointSourcePolygon

    The polygon of light perception.

    los: PointSourcePolygon

    The unconstrained LOS polygon.

    visionMode: any = null

    The vision mode linked to this VisionSource

    visionModeOverrides: object = {}

    Data overrides that could happen with blindness vision mode.

    _initializeShaderKeys: string[] = ...
    _refreshUniformsKeys: string[] = ...
    defaultData: any = ...
    EDGE_OFFSET: number = -2
    effectsCollection: string = "visionSources"
    sourceType: string = "sight"
    _brightLightingLevel: number = LIGHTING_LEVELS.BRIGHT

    The corresponding lighting levels for bright light.

    _dimLightingLevel: number = LIGHTING_LEVELS.DIM

    The corresponding lighting levels for dim light.

    Accessors

    • get fov(): any

      An alias for the shape of the vision source.

      Returns any

    • get isAnimated(): boolean

      Is the rendered source animated?

      Returns boolean

    • get isBlinded(): boolean

      Is this source temporarily blinded?

      Returns boolean

    • get lightRadius(): number

      Light perception radius of this vision source, taking into account if the source is blinded.

      Returns number

    • get preferred(): boolean

      If this vision source background is rendered into the lighting container.

      Returns boolean

    • get radius(): any

      Returns any

    • get _layers(): {
          background: {
              blendMode: string;
              defaultShader: typeof BackgroundVisionShader;
          };
          coloration: {
              blendMode: string;
              defaultShader: typeof ColorationVisionShader;
          };
          illumination: {
              blendMode: string;
              defaultShader: typeof IlluminationVisionShader;
          };
      }

      Returns {
          background: {
              blendMode: string;
              defaultShader: typeof BackgroundVisionShader;
          };
          coloration: {
              blendMode: string;
              defaultShader: typeof ColorationVisionShader;
          };
          illumination: {
              blendMode: string;
              defaultShader: typeof IlluminationVisionShader;
          };
      }

    Methods

    • Parameters

      • changes: any

      Returns void

    • Parameters

      • layer: any
      • layerId: any

      Returns void

    • Returns {}

    • Returns void

    • Returns any

    • Parameters

      • data: any

      Returns void

    • Returns void

    • Returns void

    • Parameters

      • shader: any

      Returns void

    • Returns void

    • Protected

      Creates the polygon that represents light perception. If the light perception radius is unconstrained, no new polygon instance is created; instead the LOS polygon of this vision source is returned.

      Returns PointSourcePolygon

      The new polygon or this.los.

    • Protected

      Create a restricted FOV polygon by limiting the radius of the unrestricted LOS polygon. If the vision radius is unconstrained, no new polygon instance is created; instead the LOS polygon of this vision source is returned.

      Returns PointSourcePolygon

      The new polygon or this.los.

    • Protected

      Responsible for assigning the Vision Mode and calling the activation and deactivation handlers.

      Returns void

    • Protected

      Update layer uniforms according to vision mode uniforms, if any.

      Parameters

      • shader: AdaptiveVisionShader

        The shader being updated.

      • vmUniforms: Record<string, any>

        The targeted layer.

      Returns void