Skip to content

Documentation / device / TextureCube

Interface: TextureCube<T>

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

Abstract interface for cube texture

Extends

Type Parameters

T

T = unknown

Properties

[EventMapType]?

readonly optional [EventMapType]?: object

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

Type-only event map marker.

dispose

dispose: []

Inherited from

BaseTexture.[EventMapType]


device

readonly device: AbstractDevice

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

The object was created by which device

Inherited from

BaseTexture.device


object

readonly object: T

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

The internal GPU object

Inherited from

BaseTexture.object


uid

readonly uid: number

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

unique id

Inherited from

BaseTexture.uid


cid

readonly cid: number

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

Inherited from

BaseTexture.cid


disposed

readonly disposed: boolean

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

Inherited from

BaseTexture.disposed


name

name: string

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

Inherited from

BaseTexture.name


restoreHandler

restoreHandler: (tex) => void

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

Parameters

tex

GPUObject

Returns

void

Inherited from

BaseTexture.restoreHandler


target

readonly target: TextureType

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

Inherited from

BaseTexture.target


width

readonly width: number

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

Inherited from

BaseTexture.width


height

readonly height: number

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

Inherited from

BaseTexture.height


depth

readonly depth: number

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

Inherited from

BaseTexture.depth


format

readonly format: TextureFormat

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

Inherited from

BaseTexture.format


mipLevelCount

readonly mipLevelCount: number

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

Inherited from

BaseTexture.mipLevelCount


memCost

readonly memCost: number

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

Inherited from

BaseTexture.memCost


samplerOptions

samplerOptions: Nullable<Immutable<SamplerOptions>>

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

Inherited from

BaseTexture.samplerOptions

Methods

on()

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

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

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:563

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:569

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:575

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:1271

Returns

this is VertexLayout<unknown>

Inherited from

BaseTexture.isVertexLayout


isFramebuffer()

isFramebuffer(): this is FrameBuffer<unknown>

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

Returns

this is FrameBuffer<unknown>

Inherited from

BaseTexture.isFramebuffer


isSampler()

isSampler(): this is TextureSampler<unknown>

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

Returns

this is TextureSampler<unknown>

Inherited from

BaseTexture.isSampler


isTexture()

isTexture(): this is BaseTexture<unknown>

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

Returns

this is BaseTexture<unknown>

Inherited from

BaseTexture.isTexture


isTexture2D()

isTexture2D(): this is Texture2D<unknown>

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

Returns

this is Texture2D<unknown>

Inherited from

BaseTexture.isTexture2D


isTexture2DArray()

isTexture2DArray(): this is Texture2DArray<unknown>

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

Returns

this is Texture2DArray<unknown>

Inherited from

BaseTexture.isTexture2DArray


isTexture3D()

isTexture3D(): this is Texture3D<unknown>

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

Returns

this is Texture3D<unknown>

Inherited from

BaseTexture.isTexture3D


isTextureCube()

isTextureCube(): this is TextureCube<unknown>

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

Returns

this is TextureCube<unknown>

Inherited from

BaseTexture.isTextureCube


isTextureVideo()

isTextureVideo(): this is TextureVideo<unknown>

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

Returns

this is TextureVideo<unknown>

Inherited from

BaseTexture.isTextureVideo


isProgram()

isProgram(): this is GPUProgram<unknown>

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

Returns

this is GPUProgram<unknown>

Inherited from

BaseTexture.isProgram


isBuffer()

isBuffer(): this is GPUDataBuffer<unknown>

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

Returns

this is GPUDataBuffer<unknown>

Inherited from

BaseTexture.isBuffer


isBindGroup()

isBindGroup(): this is BindGroup

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

Returns

this is BindGroup

Inherited from

BaseTexture.isBindGroup


dispose()

dispose(): void

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

Returns

void

Inherited from

BaseTexture.dispose


reload()

reload(): void

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

Returns

void

Inherited from

BaseTexture.reload


destroy()

destroy(): void

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

Returns

void

Inherited from

BaseTexture.destroy


restore()

restore(): void

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

Returns

void

Inherited from

BaseTexture.restore


init()

init(): void

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

Returns

void

Inherited from

BaseTexture.init


generateMipmaps()

generateMipmaps(): void

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

Returns

void

Inherited from

BaseTexture.generateMipmaps


isSRGBFormat()

isSRGBFormat(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isSRGBFormat


isFloatFormat()

isFloatFormat(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isFloatFormat


isIntegerFormat()

isIntegerFormat(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isIntegerFormat


isSignedFormat()

isSignedFormat(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isSignedFormat


isCompressedFormat()

isCompressedFormat(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isCompressedFormat


isFilterable()

isFilterable(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isFilterable


isDepth()

isDepth(): boolean

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

Returns

boolean

Inherited from

BaseTexture.isDepth


getDefaultSampler()

getDefaultSampler(comparison): TextureSampler

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

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:1329

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:1338

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, width, height, face): void

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

Parameters

data

TypedArray

xOffset

number

yOffset

number

width

number

height

number

face

CubeFace

Returns

void


updateFromElement()

updateFromElement(data, xOffset, yOffset, face, x, y, width, height): void

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

Parameters

data

TextureImageElement

xOffset

number

yOffset

number

face

number

x

number

y

number

width

number

height

number

Returns

void


createWithMipmapData()

createWithMipmapData(data, sRGB, creationFlags?): void

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

Parameters

data

TextureMipmapData

sRGB

boolean

creationFlags?

number

Returns

void

Released under the MIT License.