Skip to main content

createObjectParticles

Create a particle effect attached to an object.

Syntax

engine.effects.createObjectParticles(object, options, withId);

Parameters

NameTypeDescription
objectstring or ObjectManagerThe object to attach the particles effect to.
options (optional)ParticlesOptionsThe options for the particles effect.
withId (optional)stringThe ID of the particles effect to create.

Returns

Example

const particles = engine.effects.createObjectParticles(object, {
position: [0, 2, 0],
amount: 50,
});

Available on: Client