Module: particles

Particle system API. Please note that particle emission itself is controlled by the module:animation module.

Summary

Methods

Detailed Description

Methods

set_factor(obj, psys_name, factor)

Set particle number factor.
Parameters:
Name Type Description
obj Object3D Emitter object.
psys_name string Particle system name.
factor number Particle number factor. A coefficient defining the number of particles to be emitted. 1 - all particles, 0 - none.
Source:
Example
var m_particles = require("particles");
var m_scenes = require("scenes");

var cube = m_scenes.get_object_by_name("Cube");
m_particles.set_factor(cube, "MyParticleSystem", 0.3);

set_normal_factor(obj, psys_name, nfactor)

Set particle normal factor.
Parameters:
Name Type Description
obj Object3D Emitter object.
psys_name string Particle system name.
nfactor number Particle normal factor.
Source:
Example
var m_particles = require("particles");
var m_scenes = require("scenes");

var cube = m_scenes.get_object_by_name("Cube");
m_particles.set_normal_factor(cube, "MyParticleSystem", 15);

set_size(obj, psys_name, size)

Set particle size.
Parameters:
Name Type Description
obj Object3D Emitter object.
psys_name string Particle system name.
size number Particle size.
Source:
Example
var m_particles = require("particles");
var m_scenes = require("scenes");

var cube = m_scenes.get_object_by_name("Cube");
m_particles.set_size(cube, "MyParticleSystem", 2.4);