Skip to content

Documentation / device / Texture3D

Interface: Texture3D<T> ​

Defined in: libs/device/src/gpuobject.ts:1408

Abstract interface for 3D texture

Extends ​

Type Parameters ​

T ​

T = unknown

Properties ​

[EventMapType]? ​

readonly optional [EventMapType]?: object

Defined in: libs/base/dist/index.d.ts:585

Type-only event map marker.

dispose ​

dispose: []

Inherited from ​

BaseTexture.[EventMapType]


device ​

readonly device: AbstractDevice

Defined in: libs/device/src/gpuobject.ts:1271

The object was created by which device

Inherited from ​

BaseTexture.device


object ​

readonly object: T

Defined in: libs/device/src/gpuobject.ts:1273

The internal GPU object

Inherited from ​

BaseTexture.object


uid ​

readonly uid: number

Defined in: libs/device/src/gpuobject.ts:1275

unique id

Inherited from ​

BaseTexture.uid


cid ​

readonly cid: number

Defined in: libs/device/src/gpuobject.ts:1276

Inherited from ​

BaseTexture.cid


disposed ​

readonly disposed: boolean

Defined in: libs/device/src/gpuobject.ts:1277

Inherited from ​

BaseTexture.disposed


name ​

name: string

Defined in: libs/device/src/gpuobject.ts:1278

Inherited from ​

BaseTexture.name


restoreHandler ​

restoreHandler: (tex) => void

Defined in: libs/device/src/gpuobject.ts:1279

Parameters ​

tex ​

GPUObject

Returns ​

void

Inherited from ​

BaseTexture.restoreHandler


target ​

readonly target: TextureType

Defined in: libs/device/src/gpuobject.ts:1320

Inherited from ​

BaseTexture.target


width ​

readonly width: number

Defined in: libs/device/src/gpuobject.ts:1321

Inherited from ​

BaseTexture.width


height ​

readonly height: number

Defined in: libs/device/src/gpuobject.ts:1322

Inherited from ​

BaseTexture.height


depth ​

readonly depth: number

Defined in: libs/device/src/gpuobject.ts:1323

Inherited from ​

BaseTexture.depth


format ​

readonly format: TextureFormat

Defined in: libs/device/src/gpuobject.ts:1324

Inherited from ​

BaseTexture.format


mipLevelCount ​

readonly mipLevelCount: number

Defined in: libs/device/src/gpuobject.ts:1325

Inherited from ​

BaseTexture.mipLevelCount


memCost ​

readonly memCost: number

Defined in: libs/device/src/gpuobject.ts:1326

Inherited from ​

BaseTexture.memCost


samplerOptions ​

samplerOptions: Nullable<Immutable<SamplerOptions>>

Defined in: libs/device/src/gpuobject.ts:1327

Inherited from ​

BaseTexture.samplerOptions

Methods ​

on() ​

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:592

Sets up a function that will be called whenever the specified event is delivered to the target

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type to listen for

listener ​

EventListener<{ dispose: []; }, K>

The callback function

context? ​

unknown

Context object of the listener function

Returns ​

void

Inherited from ​

BaseTexture.on


once() ​

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:599

Sets up a function that will be called only once when the specified event is delivered to the target

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type to listen for

listener ​

EventListener<{ dispose: []; }, K>

The callback function

context? ​

unknown

Context object of the listener function

Returns ​

void

Inherited from ​

BaseTexture.once


off() ​

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:605

Removes an event listener function previously registered.

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type for which to remove an event listener

listener? ​

EventListener<{ dispose: []; }>

The callback function to be removed

context? ​

unknown

Returns ​

void

Inherited from ​

BaseTexture.off


dispatchEvent() ​

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:611

Synchronously invoke the affected event listeners with an event object

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

args ​

...object[K]

Returns ​

void

false if the event was canceled, otherwise true

Inherited from ​

BaseTexture.dispatchEvent


isVertexLayout() ​

isVertexLayout(): this is VertexLayout<unknown>

Defined in: libs/device/src/gpuobject.ts:1280

Returns ​

this is VertexLayout<unknown>

Inherited from ​

BaseTexture.isVertexLayout


isFramebuffer() ​

isFramebuffer(): this is FrameBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1281

Returns ​

this is FrameBuffer<unknown>

Inherited from ​

BaseTexture.isFramebuffer


isSampler() ​

isSampler(): this is TextureSampler<unknown>

Defined in: libs/device/src/gpuobject.ts:1282

Returns ​

this is TextureSampler<unknown>

Inherited from ​

BaseTexture.isSampler


isTexture() ​

isTexture(): this is BaseTexture<unknown>

Defined in: libs/device/src/gpuobject.ts:1283

Returns ​

this is BaseTexture<unknown>

Inherited from ​

BaseTexture.isTexture


isTexture2D() ​

isTexture2D(): this is Texture2D<unknown>

Defined in: libs/device/src/gpuobject.ts:1284

Returns ​

this is Texture2D<unknown>

Inherited from ​

BaseTexture.isTexture2D


isTexture2DArray() ​

isTexture2DArray(): this is Texture2DArray<unknown>

Defined in: libs/device/src/gpuobject.ts:1285

Returns ​

this is Texture2DArray<unknown>

Inherited from ​

BaseTexture.isTexture2DArray


isTexture3D() ​

isTexture3D(): this is Texture3D<unknown>

Defined in: libs/device/src/gpuobject.ts:1286

Returns ​

this is Texture3D<unknown>

Inherited from ​

BaseTexture.isTexture3D


isTextureCube() ​

isTextureCube(): this is TextureCube<unknown>

Defined in: libs/device/src/gpuobject.ts:1287

Returns ​

this is TextureCube<unknown>

Inherited from ​

BaseTexture.isTextureCube


isTextureVideo() ​

isTextureVideo(): this is TextureVideo<unknown>

Defined in: libs/device/src/gpuobject.ts:1288

Returns ​

this is TextureVideo<unknown>

Inherited from ​

BaseTexture.isTextureVideo


isProgram() ​

isProgram(): this is GPUProgram<unknown>

Defined in: libs/device/src/gpuobject.ts:1289

Returns ​

this is GPUProgram<unknown>

Inherited from ​

BaseTexture.isProgram


isBuffer() ​

isBuffer(): this is GPUDataBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1290

Returns ​

this is GPUDataBuffer<unknown>

Inherited from ​

BaseTexture.isBuffer


isBindGroup() ​

isBindGroup(): this is BindGroup

Defined in: libs/device/src/gpuobject.ts:1291

Returns ​

this is BindGroup

Inherited from ​

BaseTexture.isBindGroup


dispose() ​

dispose(): void

Defined in: libs/device/src/gpuobject.ts:1292

Returns ​

void

Inherited from ​

BaseTexture.dispose


reload() ​

reload(): void

Defined in: libs/device/src/gpuobject.ts:1293

Returns ​

void

Inherited from ​

BaseTexture.reload


destroy() ​

destroy(): void

Defined in: libs/device/src/gpuobject.ts:1294

Returns ​

void

Inherited from ​

BaseTexture.destroy


restore() ​

restore(): void

Defined in: libs/device/src/gpuobject.ts:1295

Returns ​

void

Inherited from ​

BaseTexture.restore


init() ​

init(): void

Defined in: libs/device/src/gpuobject.ts:1328

Returns ​

void

Inherited from ​

BaseTexture.init


generateMipmaps() ​

generateMipmaps(): void

Defined in: libs/device/src/gpuobject.ts:1329

Returns ​

void

Inherited from ​

BaseTexture.generateMipmaps


isSRGBFormat() ​

isSRGBFormat(): boolean

Defined in: libs/device/src/gpuobject.ts:1330

Returns ​

boolean

Inherited from ​

BaseTexture.isSRGBFormat


isFloatFormat() ​

isFloatFormat(): boolean

Defined in: libs/device/src/gpuobject.ts:1331

Returns ​

boolean

Inherited from ​

BaseTexture.isFloatFormat


isIntegerFormat() ​

isIntegerFormat(): boolean

Defined in: libs/device/src/gpuobject.ts:1332

Returns ​

boolean

Inherited from ​

BaseTexture.isIntegerFormat


isSignedFormat() ​

isSignedFormat(): boolean

Defined in: libs/device/src/gpuobject.ts:1333

Returns ​

boolean

Inherited from ​

BaseTexture.isSignedFormat


isCompressedFormat() ​

isCompressedFormat(): boolean

Defined in: libs/device/src/gpuobject.ts:1334

Returns ​

boolean

Inherited from ​

BaseTexture.isCompressedFormat


isFilterable() ​

isFilterable(): boolean

Defined in: libs/device/src/gpuobject.ts:1335

Returns ​

boolean

Inherited from ​

BaseTexture.isFilterable


isDepth() ​

isDepth(): boolean

Defined in: libs/device/src/gpuobject.ts:1336

Returns ​

boolean

Inherited from ​

BaseTexture.isDepth


getDefaultSampler() ​

getDefaultSampler(comparison): TextureSampler

Defined in: libs/device/src/gpuobject.ts:1337

Parameters ​

comparison ​

boolean

Returns ​

TextureSampler

Inherited from ​

BaseTexture.getDefaultSampler


readPixels() ​

readPixels(x, y, w, h, faceOrLayer, mipLevel, buffer): Promise<void>

Defined in: libs/device/src/gpuobject.ts:1338

Parameters ​

x ​

number

y ​

number

w ​

number

h ​

number

faceOrLayer ​

number

mipLevel ​

number

buffer ​

TypedArray

Returns ​

Promise<void>

Inherited from ​

BaseTexture.readPixels


readPixelsToBuffer() ​

readPixelsToBuffer(x, y, w, h, faceOrLayer, mipLevel, buffer): void

Defined in: libs/device/src/gpuobject.ts:1347

Parameters ​

x ​

number

y ​

number

w ​

number

h ​

number

faceOrLayer ​

number

mipLevel ​

number

buffer ​

GPUDataBuffer

Returns ​

void

Inherited from ​

BaseTexture.readPixelsToBuffer


update() ​

update(data, xOffset, yOffset, zOffset, width, height, depth): void

Defined in: libs/device/src/gpuobject.ts:1409

Parameters ​

data ​

TypedArray

xOffset ​

number

yOffset ​

number

zOffset ​

number

width ​

number

height ​

number

depth ​

number

Returns ​

void


createWithMipmapData() ​

createWithMipmapData(data, creationFlags?): void

Defined in: libs/device/src/gpuobject.ts:1418

Parameters ​

data ​

TextureMipmapData

creationFlags? ​

number

Returns ​

void

Released under the MIT License.