Skip to content

Class: ParticleBuffer

Basic class of particle memory data

Hierarchy

  • GPUBufferBase

    ParticleBuffer

Constructors

Properties

Methods

Constructors

constructor

new ParticleBuffer(size, data?)

Parameters

NameType
sizenumber
data?Float32Array

Overrides

GPUBufferBase.constructor

Defined in

packages/particle/buffer/ParticleBuffer.ts:8

Properties

bufferType

bufferType: GPUBufferType

Inherited from

GPUBufferBase.bufferType

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:20


buffer

buffer: GPUBuffer

Inherited from

GPUBufferBase.buffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:21


memory

memory: MemoryDO

Inherited from

GPUBufferBase.memory

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:22


memoryNodes

memoryNodes: Map<string | number, MemoryInfo>

Inherited from

GPUBufferBase.memoryNodes

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:23


seek

seek: number

Inherited from

GPUBufferBase.seek

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:24


outFloat32Array

outFloat32Array: Float32Array

Inherited from

GPUBufferBase.outFloat32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:25


byteSize

byteSize: number

Inherited from

GPUBufferBase.byteSize

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:26


usage

usage: number

Inherited from

GPUBufferBase.usage

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:27


visibility

visibility: number

Inherited from

GPUBufferBase.visibility

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:28

Methods

alloc

alloc(name, byte): MemoryInfo

Parameters

NameType
namestring
bytenumber

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:15


allocInt8

allocInt8(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:24


allocUint8

allocUint8(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:28


allocInt16

allocInt16(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:32


allocUint16

allocUint16(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:36


allocInt32

allocInt32(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:40


allocUint32

allocUint32(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:44


allocFloat32

allocFloat32(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:48


allocVec2

allocVec2(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:52


allocVec3

allocVec3(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:56


allocVec4

allocVec4(name): MemoryInfo

Parameters

NameType
namestring

Returns

MemoryInfo

Defined in

packages/particle/buffer/ParticleBuffer.ts:60


debug

debug(): void

Returns

void

Inherited from

GPUBufferBase.debug

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:41


reset

reset(clean?, size?, data?): void

Parameters

NameTypeDefault value
cleanbooleanfalse
sizenumber0
data?Float32Arrayundefined

Returns

void

Inherited from

GPUBufferBase.reset

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:44


setBoolean

setBoolean(name, v): void

Parameters

NameType
namestring
vboolean

Returns

void

Inherited from

GPUBufferBase.setBoolean

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:52


setFloat

setFloat(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setFloat

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:61


setInt8

setInt8(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:70


setInt16

setInt16(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:79


setInt32

setInt32(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:88


setUint8

setUint8(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:97


setUint16

setUint16(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:106


setUint32

setUint32(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:115


setVector2

setVector2(name, v2): void

Parameters

NameType
namestring
v2Vector2

Returns

void

Inherited from

GPUBufferBase.setVector2

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:124


setVector3

setVector3(name, v3): void

Parameters

NameType
namestring
v3Vector3

Returns

void

Inherited from

GPUBufferBase.setVector3

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:133


setVector4

setVector4(name, v4): void

Parameters

NameType
namestring
v4Quaternion | Vector4

Returns

void

Inherited from

GPUBufferBase.setVector4

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:142


setVector4Array

setVector4Array(name, v4Array): void

Parameters

NameType
namestring
v4ArrayVector4[] | Quaternion[]

Returns

void

Inherited from

GPUBufferBase.setVector4Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:151


setColor

setColor(name, color): void

Parameters

NameType
namestring
colorColor

Returns

void

Inherited from

GPUBufferBase.setColor

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:160


setColorArray

setColorArray(name, colorArray): void

Parameters

NameType
namestring
colorArrayColor[]

Returns

void

Inherited from

GPUBufferBase.setColorArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:169


setMatrix

setMatrix(name, mat): void

Parameters

NameType
namestring
matMatrix4

Returns

void

Inherited from

GPUBufferBase.setMatrix

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:178


setMatrixArray

setMatrixArray(name, mats): void

Parameters

NameType
namestring
matsMatrix4[]

Returns

void

Inherited from

GPUBufferBase.setMatrixArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:187


setArray

setArray(name, data): void

Parameters

NameType
namestring
datanumber[]

Returns

void

Inherited from

GPUBufferBase.setArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:199


setFloat32Array

setFloat32Array(name, data): void

Parameters

NameType
namestring
dataFloat32Array

Returns

void

Inherited from

GPUBufferBase.setFloat32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:208


setInt32Array

setInt32Array(name, data): void

Parameters

NameType
namestring
dataInt32Array

Returns

void

Inherited from

GPUBufferBase.setInt32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:217


setUint32Array

setUint32Array(name, data): void

Parameters

NameType
namestring
dataUint32Array

Returns

void

Inherited from

GPUBufferBase.setUint32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:227


setStruct

setStruct<T>(c, index, data, property?): void

Type parameters

NameType
Textends Struct<T>

Parameters

NameType
c() => T
indexnumber
dataany
property?string

Returns

void

Inherited from

GPUBufferBase.setStruct

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:236


setStructArray

setStructArray<T>(c, dataList, property?): void

Type parameters

NameType
Textends Struct<T>

Parameters

NameType
c() => T
dataListany[]
property?string

Returns

void

Inherited from

GPUBufferBase.setStructArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:292


clean

clean(): void

Returns

void

Inherited from

GPUBufferBase.clean

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:305


apply

apply(): void

Returns

void

Inherited from

GPUBufferBase.apply

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:310


mapAsyncWrite

mapAsyncWrite(mapAsyncArray, len): void

Parameters

NameType
mapAsyncArrayFloat32Array
lennumber

Returns

void

Inherited from

GPUBufferBase.mapAsyncWrite

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:315


destroy

destroy(force?): void

Parameters

NameType
force?boolean

Returns

void

Inherited from

GPUBufferBase.destroy

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:355


resizeBuffer

resizeBuffer(size, data?): void

Parameters

NameType
sizenumber
data?ArrayBufferData

Returns

void

Inherited from

GPUBufferBase.resizeBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:412


readBuffer

readBuffer(): Float32Array

Returns

Float32Array

Inherited from

GPUBufferBase.readBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:460

Released under the MIT License