Constructor
new pxlParticles/EmberWisps(room, systemNameopt)
- Description:
Create an EmberWisps instance.
- Source:
Properties:
Name | Type | Description |
---|---|---|
room |
Object | The room object. |
name |
string | The name of the particle system. |
shaderSettings |
Object | The shader settings for the particle system. |
knownKeys |
Array.<string> | Known keys for shader |
Examples
this.shaderSettings = {
"vertCount" : 600,
"pScale" : 7,
"pOpacity" : 1.0,
"proxDist" : 200,
"atlasRes" : 4,
"atlasPicks" : [],
"randomAtlas" : true,
"additiveBlend" : false,
"windDir" : new Vector3( 0, 0, 1 ),
"offsetPos" : new Vector3( 0, 0, 0 ),
}
// Floating Dust Particle System for pxlNav
import { pxlEffects } from "pxlNav.esm.js";
const EmberWisps = pxlEffects.pxlParticles.EmberWisps;
// You can put this in yuor `fbxPostLoad()` or `build()` function
fbxPostLoad(){
let emberWispsSystem = new EmberWisps( room, 'emberWisps' );
let curShaderSettings = emberWispsSystem.getSettings();
curShaderSettings["vertCount"] = 1200; // Number of particles
curShaderSettings["pScale"] = 9; // Scale of the particles
curShaderSettings["pOpacity"] = 0.8; // Opacity of the particles
curShaderSettings["proxDist"] = 400; // Proximity distance
curShaderSettings["additiveBlend"] = true; // Additive blending for the particles
emberWispsSystem.build( curShaderSettings );
}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
room |
Object |
null
|
The room object where the particle system will be added. |
|
systemName |
string |
<optional> |
'emberWisps'
|
The name of the particle system. |
Methods
(static) EmberWisps#build(curShaderSettingsopt)
- Description:
Build the EmberWisps particle effect with the given shader settings.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
curShaderSettings |
Object |
<optional> |
{}
|
Current shader settings to override the default settings. |