pixi.js
    Preparing search index...

    Interface CubeTextureSourceOptionsAdvanced

    Options for creating a CubeTextureSource.

    interface CubeTextureSourceOptions {
        _resourceId?: number;
        addressMode?: WRAP_MODE;
        addressModeU?: WRAP_MODE;
        addressModeV?: WRAP_MODE;
        addressModeW?: WRAP_MODE;
        antialias?: boolean;
        arrayLayerCount?: number;
        autoGarbageCollect?: boolean;
        autoGenerateMipmaps?: boolean;
        compare?: COMPARE_FUNCTION;
        destroyed?: boolean;
        dynamic?: boolean;
        faces: CubeTextureFaces<TextureSource<any>>;
        label?: string;
        lodMaxClamp?: number;
        lodMinClamp?: number;
        magFilter?: SCALE_MODE;
        maxAnisotropy?: number;
        minFilter?: SCALE_MODE;
        mipLevelCount?: number;
        mipmapFilter?: SCALE_MODE;
        scaleMode?: SCALE_MODE;
        transient?: boolean;
        wrapMode?: WRAP_MODE;
        destroy?(): void;
        update?(): void;
    }

    Hierarchy

    • Omit<
          TextureSourceOptions<any>,

              | "resource"
              | "width"
              | "height"
              | "dimensions"
              | "viewDimension"
              | "resolution"
              | "format"
              | "alphaMode",
      >
      • CubeTextureSourceOptions
    Index

    Properties

    _resourceId?: number
    addressMode?: WRAP_MODE

    setting this will set wrapModeU,wrapModeV and wrapModeW all at once!

    addressModeU?: WRAP_MODE

    specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.

    addressModeV?: WRAP_MODE

    specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.

    addressModeW?: WRAP_MODE

    Specifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.

    antialias?: boolean

    Only really affects RenderTextures. Should we use antialiasing for this texture. It will look better, but may impact performance as a Blit operation will be required to resolve the texture.

    arrayLayerCount?: number

    The number of array layers for this texture source.

    This maps to WebGPU's GPUTextureDescriptor.size.depthOrArrayLayers and is used for array-backed textures such as cube maps (6 layers).

    1
    @advanced
    autoGarbageCollect?: boolean

    If true, the Garbage Collector will unload this texture if it is not used after a period of time

    autoGenerateMipmaps?: boolean

    Should we auto generate mipmaps for this texture? This will automatically generate mipmaps for this texture when uploading to the GPU. Mipmapped textures take up more memory, but can look better when scaled down.

    For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame. If you do, make sure to call updateMipmaps after you update the texture.

    When provided the sampler will be a comparison sampler with the specified COMPARE_FUNCTION. Note: Comparison samplers may use filtering, but the sampling results will be implementation-dependent and may differ from the normal filtering rules.

    destroyed?: boolean = false

    Has the style been destroyed?

    dynamic?: boolean

    Used by RenderTexture.create to allow resizing. Not used by TextureSource itself.

    The 6 face sources that make up the cube texture.

    All faces must match in:

    • size (pixelWidth / pixelHeight)
    • resolution
    • format
    • alphaMode
    label?: string

    optional label, can be used for debugging

    lodMaxClamp?: number

    Specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.

    lodMinClamp?: number

    specifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.

    magFilter?: SCALE_MODE

    specifies the sampling behavior when the sample footprint is smaller than or equal to one texel.

    maxAnisotropy?: number

    Specifies the maximum anisotropy value clamp used by the sampler. Note: Most implementations support TextureStyle#maxAnisotropy values in range between 1 and 16, inclusive. The used value of TextureStyle#maxAnisotropy will be clamped to the maximum value that the platform supports.

    setting this to anything higher than 1 will set scale modes to 'linear'

    minFilter?: SCALE_MODE

    specifies the sampling behavior when the sample footprint is larger than one texel.

    mipLevelCount?: number

    The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true

    mipmapFilter?: SCALE_MODE

    specifies behavior for sampling between mipmap levels.

    scaleMode?: SCALE_MODE

    setting this will set magFilter,minFilter and mipmapFilter all at once!

    transient?: boolean

    Mark this texture as transient — its contents are scratch and do not need to persist beyond a single render pass. When the WebGPU backend sees this:

    • It uses storeOp: 'discard' on the attachment at end-of-pass, skipping the writeback to DRAM.
    • When the browser exposes GPUTextureUsage.TRANSIENT_ATTACHMENT, it adds that bit so the driver can keep contents in tile memory on TBDR mobile GPUs and never allocate DRAM at all.

    Only safe when no later render pass needs to load the prior contents back (loadOp: 'load' on a transient attachment is a spec violation, and discarding makes loaded contents undefined even without the bit set). Pixi sets this internally for the MSAA buffer attached to the canvas root, which is rendered as a single pass per frame. Set it yourself only on textures you know follow the same single-pass-then-discard pattern.

    false
    
    wrapMode?: WRAP_MODE

    Methods

    • Destroys the style

      Returns void

    • Returns void