Documentation / device / IndexBuffer
Interface: IndexBuffer<T>
Defined in: libs/device/src/gpuobject.ts:1466
Abstract interface for index buffer
Extends
Type Parameters
T
T = unknown
Properties
[EventMapType]?
readonlyoptional[EventMapType]?:object
Defined in: libs/base/dist/index.d.ts:549
Type-only event map marker.
dispose
dispose: []
Inherited from
device
readonlydevice:AbstractDevice
Defined in: libs/device/src/gpuobject.ts:1262
The object was created by which device
Inherited from
object
readonlyobject:T
Defined in: libs/device/src/gpuobject.ts:1264
The internal GPU object
Inherited from
uid
readonlyuid:number
Defined in: libs/device/src/gpuobject.ts:1266
unique id
Inherited from
cid
readonlycid:number
Defined in: libs/device/src/gpuobject.ts:1267
Inherited from
disposed
readonlydisposed:boolean
Defined in: libs/device/src/gpuobject.ts:1268
Inherited from
name
name:
string
Defined in: libs/device/src/gpuobject.ts:1269
Inherited from
restoreHandler
restoreHandler: (
tex) =>void
Defined in: libs/device/src/gpuobject.ts:1270
Parameters
tex
Returns
void
Inherited from
byteLength
readonlybyteLength:number
Defined in: libs/device/src/gpuobject.ts:1452
Inherited from
usage
readonlyusage:number
Defined in: libs/device/src/gpuobject.ts:1453
Inherited from
indexType
readonlyindexType:PBPrimitiveTypeInfo
Defined in: libs/device/src/gpuobject.ts:1467
length
readonlylength:number
Defined in: libs/device/src/gpuobject.ts:1468
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
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
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
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
isVertexLayout()
isVertexLayout():
this is VertexLayout<unknown>
Defined in: libs/device/src/gpuobject.ts:1271
Returns
this is VertexLayout<unknown>
Inherited from
isFramebuffer()
isFramebuffer():
this is FrameBuffer<unknown>
Defined in: libs/device/src/gpuobject.ts:1272
Returns
this is FrameBuffer<unknown>
Inherited from
isSampler()
isSampler():
this is TextureSampler<unknown>
Defined in: libs/device/src/gpuobject.ts:1273
Returns
this is TextureSampler<unknown>
Inherited from
isTexture()
isTexture():
this is BaseTexture<unknown>
Defined in: libs/device/src/gpuobject.ts:1274
Returns
this is BaseTexture<unknown>
Inherited from
isTexture2D()
isTexture2D():
this is Texture2D<unknown>
Defined in: libs/device/src/gpuobject.ts:1275
Returns
this is Texture2D<unknown>
Inherited from
isTexture2DArray()
isTexture2DArray():
this is Texture2DArray<unknown>
Defined in: libs/device/src/gpuobject.ts:1276
Returns
this is Texture2DArray<unknown>
Inherited from
GPUDataBuffer.isTexture2DArray
isTexture3D()
isTexture3D():
this is Texture3D<unknown>
Defined in: libs/device/src/gpuobject.ts:1277
Returns
this is Texture3D<unknown>
Inherited from
isTextureCube()
isTextureCube():
this is TextureCube<unknown>
Defined in: libs/device/src/gpuobject.ts:1278
Returns
this is TextureCube<unknown>
Inherited from
isTextureVideo()
isTextureVideo():
this is TextureVideo<unknown>
Defined in: libs/device/src/gpuobject.ts:1279
Returns
this is TextureVideo<unknown>
Inherited from
isProgram()
isProgram():
this is GPUProgram<unknown>
Defined in: libs/device/src/gpuobject.ts:1280
Returns
this is GPUProgram<unknown>
Inherited from
isBuffer()
isBuffer():
this is GPUDataBuffer<unknown>
Defined in: libs/device/src/gpuobject.ts:1281
Returns
this is GPUDataBuffer<unknown>
Inherited from
isBindGroup()
isBindGroup():
this is BindGroup
Defined in: libs/device/src/gpuobject.ts:1282
Returns
this is BindGroup
Inherited from
dispose()
dispose():
void
Defined in: libs/device/src/gpuobject.ts:1283
Returns
void
Inherited from
reload()
reload():
void
Defined in: libs/device/src/gpuobject.ts:1284
Returns
void
Inherited from
destroy()
destroy():
void
Defined in: libs/device/src/gpuobject.ts:1285
Returns
void
Inherited from
restore()
restore():
void
Defined in: libs/device/src/gpuobject.ts:1286
Returns
void
Inherited from
bufferSubData()
bufferSubData(
dstByteOffset,data,srcOffset?,srcLength?):void
Defined in: libs/device/src/gpuobject.ts:1454
Parameters
dstByteOffset
number
data
TypedArray
srcOffset?
number
srcLength?
number
Returns
void
Inherited from
getBufferSubData()
getBufferSubData(
dstBuffer?,offsetInBytes?,sizeInBytes?):Promise<Uint8Array<ArrayBuffer>>
Defined in: libs/device/src/gpuobject.ts:1455
Parameters
dstBuffer?
Uint8Array<ArrayBuffer>
offsetInBytes?
number
sizeInBytes?
number
Returns
Promise<Uint8Array<ArrayBuffer>>