Class FluidRenderingObjectCustomParticles
Hierarchy (View Summary)
- FluidRenderingObject
- FluidRenderingObjectCustomParticles
Constructors
constructor
-
new FluidRenderingObjectCustomParticles(
scene: Scene,
buffers: { [key: string]: FloatArray },
numParticles: number,
shaderLanguage?: any,
): FluidRenderingObjectCustomParticlesCreates a new instance of the class
Parameters
- scene: Scene
The scene the particles should be rendered into
- buffers: { [key: string]: FloatArray }
The list of buffers (must contain at least one "position" buffer!). Note that you don't have to pass all (or any!) buffers at once in the constructor, you can use the addBuffers method to add more later.
- numParticles: number
Number of vertices to take into account from the buffers
OptionalshaderLanguage: anyThe shader language to use
Returns FluidRenderingObjectCustomParticles
- scene: Scene
Properties
on Particle Size Changed
Observable triggered when the size of the particle is changed
particle Thickness Alpha
Defines the alpha value of a particle
priority
Defines the priority of the object. Objects will be rendered in ascending order of priority
StaticUse Per Particle Size Attribute
Uses each particle's own "size" vertex attribute instead of a single uniform size for all particles (default: false, opt-in).
Accessors
index Buffer
-
get indexBuffer(): Nullable<DataBuffer>
Gets the index buffer (or null if the object is using instancing)
Returns Nullable<DataBuffer>
num Particles
-
get numParticles(): number
Gets the number of particles in this object
Returns number
The number of particles
particle Size
-
get particleSize(): number
Gets or sets the size of the particle
Returns number
-
set particleSize(size: number): void
Parameters
- size: number
Returns void
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used in this object
Returns ShaderLanguage
use Instancing
-
get useInstancing(): boolean
Indicates if the object uses instancing or not
Returns boolean
use Velocity
-
get useVelocity(): boolean
Indicates if velocity of particles should be used when rendering the object. The vertex buffer set must contain a "velocity" buffer for this to work!
Returns boolean
-
set useVelocity(use: boolean): void
Parameters
- use: boolean
Returns void
vertex Buffers
-
get vertexBuffers(): { [key: string]: VertexBuffer }
Gets the vertex buffers
Returns { [key: string]: VertexBuffer }
Methods
add Buffers
-
Add some new buffers
Parameters
- buffers: { [key: string]: FloatArray }
List of buffers
Returns void
- buffers: { [key: string]: FloatArray }
dispose
-
Releases the resources used by the class
Returns void
get Class Name
-
Returns string
the name of the class
is Ready
-
Indicates if the object is ready to be rendered
Returns boolean
True if everything is ready for the object to be rendered, otherwise false
render Depth Texture
-
Render the depth texture for this object
Returns void
render Diffuse Texture
-
Render the diffuse texture for this object
Returns void
render Thickness Texture
-
Render the thickness texture for this object
Returns void
set Num Particles
-
Sets the number of particles in this object
Parameters
- num: number
The number of particles to take into account
Returns void
- num: number
Defines a rendering object based on a list of custom buffers The list must contain at least a "position" buffer!