Engine API Reference - v2.20.0-beta.0
    Preparing search index...

    Class Sky

    Implementation of the sky.

    Index

    Properties

    Accessors

    Properties

    node: GraphNode = ...

    A graph node with a transform used to render the sky mesh. Adjust the position, rotation and scale of this node to orient the sky mesh. Ignored for SKYTYPE_INFINITE.

    Accessors

    • get center(): Vec3

      Gets the center of the sky.

      Returns Vec3

    • set center(value: Vec3): void

      Sets the center of the sky. Ignored for SKYTYPE_INFINITE. Typically only the y-coordinate is used, representing the tripod height. Defaults to (0, 1, 0).

      Parameters

      Returns void

    • get depthWrite(): boolean

      Gets whether depth writing is enabled for the sky.

      Returns boolean

    • set depthWrite(value: boolean): void

      Sets whether depth writing is enabled for the sky. Defaults to false.

      Writing a depth value for the skydome is supported when its type is not SKYTYPE_INFINITE. When enabled, the depth is written during a prepass render pass and can be utilized by subsequent passes to apply depth-based effects, such as Depth of Field.

      Note: For the skydome to be rendered during the prepass, the Sky Layer must be ordered before the Depth layer, which is the final layer used in the prepass.

      Parameters

      • value: boolean

      Returns void

    • get fisheye(): number

      Gets the fisheye projection strength for the sky.

      Returns number

    • set fisheye(value: number): void

      Sets the fisheye projection strength for the sky. The value is in the range [0, 1]:

      • 0: Standard rectilinear (perspective) projection.
      • (0, 1]: Increasing barrel distortion, producing a wider field of view.

      Only supported with SKYTYPE_INFINITE. Has no effect on dome or box sky types, and has no effect with orthographic cameras. Defaults to 0.

      Parameters

      • value: number

      Returns void

    • get type(): string

      Gets the type of the sky.

      Returns string

    • set type(value: string): void

      Sets the type of the sky. Can be:

      Defaults to SKYTYPE_INFINITE.

      Parameters

      • value: string

      Returns void