Skip to content

Documentation / scene / TextureFetchOptions

Type Alias: TextureFetchOptions<T>

TextureFetchOptions<T> = BaseFetchOptions & object

Defined in: libs/scene/src/asset/assetmanager.ts:81

Options for texture fetching.

Controls how a texture is loaded, converted, and optionally uploaded into an existing texture object.

Type Declaration

mimeType?

optional mimeType?: string

Explicit MIME type hint. If omitted, the type is inferred from file extension via VFS.

linearColorSpace?

optional linearColorSpace?: boolean

If true, load the image as linear data. If false or omitted, load as sRGB (when supported).

Note: For WebGL targets, non-power-of-two or sRGB textures may be repacked based on constraints.

texture?

optional texture?: T

Optional target texture to upload into. If provided, loader data will be copied/blitted into this texture instead of creating a new one.

samplerOptions?

optional samplerOptions?: SamplerOptions

Optional sampler options for the loaded texture. May be used by loaders for mip generation or by blit paths when repacking textures on constrained backends.

Type Parameters

T

T extends BaseTexture

Texture type to be returned, extending BaseTexture.

Released under the MIT License.