pxlParticles/FloatingDust

pxlParticles/FloatingDust

Class representing floating dust particles in the environment. Extends the ParticleBase class.

Access at - pxlNav.pxlEffects.pxlParticles.FloatingDust

Extends - ParticleBase

Constructor

new pxlParticles/FloatingDust(room, systemNameopt)

Description:
  • Creates an instance of FloatingDust.

Source:
Properties:
Name Type Description
room Object

The room object.

name string

The name of the particle system.

material Object

The material for the particle system.

shaderSettings Object

The shader settings for the particle system.

knownKeys Array.<string>

Known keys for shader settings.

Examples
this.shaderSettings = {
  "vertCount" : 1000,
  "pScale" : 7,
  "pOpacity" : 1.0,
  "proxDist" : 200,
  "atlasRes" : 4,
  "atlasPicks" : [],
  "randomAtlas" : false,
  "additiveBlend" : false,

  "windDir" : new Vector3( 0, 0, 1 ),
  "offsetPos" : new Vector3( 0, 0, 0 ),

  "hasLights" : false,
  "fadeOutScalar" : 1.59 , 
  "wanderInf" : 1.0 , 
  "wanderRate" : 1.0 , 
  "wanderFrequency" : 2.85 
}
// Floating Dust Particle System for pxlNav
import { pxlEffects } from "pxlNav.esm.js";
const FloatingDust = pxlEffects.pxlParticles.FloatingDust; 

// You can put this in yuor `fbxPostLoad()` or `build()` function
fbxPostLoad(){

  let floatingDustSystem = new FloatingDust( room, 'floatingDust' );
 
  let curShaderSettings = floatingDustSystem.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

  floatingDustSystem.build( curShaderSettings );
}
Parameters:
Name Type Attributes Default Description
room Object null

The room object where the particles will be added.

systemName string <optional>
'floatingDust'

The name of the particle system.

Methods

(static) FloatingDust#build(curShaderSettingsopt)

Description:
  • Builds the floating dust particle system with the given shader settings.

Source:
Parameters:
Name Type Attributes Default Description
curShaderSettings Object <optional>
{}

Current shader settings to override the default settings.