Small World Engine API Reference - v0.46.1
    Preparing search index...

    Class RenderTargetCube

    A specialized cube texture that can be rendered to by a Renderer. Represents an environment probe map with 6 faces.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    depth: boolean

    Whether this render target includes a depth buffer.

    generateMipmaps: boolean

    Whether mipmaps should be generated.

    height: number

    The height of each face in pixels.

    images: (ImageBitmap | HTMLImageElement)[] = []

    The six images comprising the cube map.

    isLoaded: boolean = false

    Whether the texture is fully loaded.

    mipmaps: (ImageBitmap | HTMLImageElement)[][] = []

    Explicitly pre-baked mipmap levels. Each entry is an array of 6 images.

    uuid: string = ...

    The unique identifier of the texture.

    width: number

    The width of each face in pixels.

    Methods

    • Loads the cube map from one or more URLs.

      Parameters

      • urls: string | string[]

        A single URL or an array of URLs.

      • Optionallayout: CubeLayout

        Optional layout hint for single images (e.g. 6x1 strip, 3x2 grid, or crosses).

      Returns Promise<void>

    • Loads explicit mipmap levels for this CubeTexture. Useful for prefiltered IBL maps (e.g. mip0, mip1, mip2...).

      Parameters

      • urls: string[]

        Array of URLs, one per mip level (typically horizontal cross maps).

      • Optionallayout: CubeLayout

        Optional layout hint.

      Returns Promise<void>

    • Resizes the render target cube.

      Parameters

      • width: number

        The new width.

      • height: number

        The new height.

      Returns void