webani - v1.0.0
    Preparing search index...

    Represents a skybox for a WebGL-based scene, including PBR-related maps like irradiance, prefiltered environment maps, and BRDF LUTs.

    Index

    Constructors

    • Creates a skybox with the given cube map images and optional roughness for PBR.

      Parameters

      • canvas: WebaniCanvas

        The canvas context used for rendering and texture creation.

      • images: ImageBitmap[]

        Array of 6 ImageBitmap objects representing cube map faces.

      • roughness: number = 1.0

        Optional roughness value (default is 1.0).

      Returns WebaniSkybox

    Properties

    cameraModelMatrices: Matrix4[]

    View matrices for each face of the cube map.

    cubeMapTexture: WebGLTexture

    WebGL cube texture representing the skybox.

    cubeVertices: Float32Array

    Vertex positions used to render a cube for environment mapping.

    faces: number[]

    Internal reference to cube map face enums used in rendering.

    images: ImageBitmap[]

    Input cube map images for the skybox. One per face.

    irradianceTexture: WebGLTexture

    Cube texture storing irradiance map for diffuse lighting.

    normalMapTexture: WebGLTexture

    Normal map texture used in IBL (if needed).

    prefilteredTexture: WebGLTexture

    Cube texture storing prefiltered environment map for specular IBL.

    projectionMatrix: Matrix4

    Projection matrix used to render the cube faces.

    quadVertices: Float32Array

    Vertex positions used to render a full-screen quad.

    roughness: number

    Surface roughness used in specular reflection calculations.

    textureSize: number

    Width and height (in pixels) of the cube map textures.

    brdfLUTTexture: WebGLTexture

    Static texture used for BRDF LUT (shared across instances).

    Methods