Added SDK 0.28.0
The ParticleView object is used to render a view onto a ParticleSystem. If using the ParticleRenderable object, then views will be created automatically.
Note
This is a low-level particle system API.
Summary
Create a new ParticleView.
Syntax
var view = ParticleView.create({
graphicsDevice: graphicsDevice,
sharedRenderContext: sharedRenderContext
system: particleSystem,
});
A SharedRenderContext object from which to allocate texture regions for particle mapping tables on the GPU when viewing a z-sorted system. If unspecified then a per-view set of textures and render targets will be created instead if required, and destroyed along with the view. Otherwise on destruction of the view the allocated region will be released back to the shared render context.
If the system is not z-sorted, then no textures will be required for a ParticleView and you need not set a shared render context either.
Note
The same SharedRenderContext cannot be used for both a ParticleSystem, and a view onto that system as this would involve both reading from, and writing to the same Texture during sorting on the GPU which is not possible.
Summary
Destroy this view, the view cannot be used following this call.
Syntax
view.destroy();
Summary
Set the ParticleSystem to be rendered by this view.
This will be called automatically if using a ParticleRenderable.
Syntax
view.setSystem(system);
Summary
Update the view onto the current ParticleSystem.
This will be called automatically if using a ParticleRenderable.
Syntax
view.update(modelView, projection);
Summary
Render the view onto the current system to the screen.
This will be called automatically if using a ParticleRenderable.
Syntax
view.render();