Options used to create this DOMTexture

interface DOMTextureOptions {
    generateMips?: boolean;
    flipY?: boolean;
    premultipliedAlpha?: boolean;
    format?: GPUTextureFormat;
    placeholderColor?: [number, number, number, number];
    useExternalTextures?: boolean;
    viewDimension?: GPUTextureViewDimension;
    visibility?: MaterialShadersType[];
    cache?: boolean;
    label?: string;
    name?: string;
    fromTexture?: DOMTexture;
    source: string | OffscreenCanvas | ImageBitmap | VideoFrame | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageData;
    sourceType: TextureSourceType;
}

Hierarchy (view full)

Properties

generateMips?: boolean

Whether to generate mips. Default to false.

flipY?: boolean

Whether to flip the source along the Y axis. Default to false.

premultipliedAlpha?: boolean

Whether this texture should be premultiplied or not. Default to false.

format?: GPUTextureFormat

The GPUTextureFormat | texture format to use. Default to 'rgba8unorm'.

placeholderColor?: [number, number, number, number]

Solid color used by temporary texture to display while loading the source. Default to [0, 0, 0, 255] (solid black).

useExternalTextures?: boolean

Whether video textures should use GPUExternalTexture or not. Default to true.

viewDimension?: GPUTextureViewDimension

The GPUTextureViewDimension | texture view dimension to use. Default to '2d'.

visibility?: MaterialShadersType[]

The texture shaders visibility sent to the texture binding. Default to 'fragment'.

cache?: boolean

Whether to keep the texture in the renderer cache when a Material tries to destroy it. Default to true.

label?: string

The label of the DOMTexture, used to create various GPU objects for debugging purpose

name?: string

Name of the DOMTexture to use in the binding

fromTexture?: DOMTexture

Optional DOMTexture to use as a copy source input

source: string | OffscreenCanvas | ImageBitmap | VideoFrame | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageData

DOMTexture source

sourceType: TextureSourceType

DOMTexture source type