• Public
  • Public/Protected
  • All

Interface ParticleEmitterArgs

Constructor Arguments

In Excalibur there are option bag constructors available on most types. These support any public property or member, methods are not supported. The API documentation does not provide an exhaustive list of possible properties but a list of commonly used properties.

For example instead of doing this:

const actor = new ex.Actor(1, 2, 100, 100, ex.Color.Red);
actor.body.collider.type = ex.CollisionType.Active;

This is possible:

const options: IActorArgs = {
   pos: new ex.Vector(1,2);
   width: 100,
   height: 100,
   color: ex.Color.Red,

const actor = new ex.Actor(options);
actor.body.collider.type = ex.CollisionType.Active;

In fact you can create a duplicate this way

const actor = new ex.Actor({
  pos: new ex.Vector(1, 2)
const actorClone = new ex.Actor(actor);

expect(actor.pos).toBe(actorClone.pos); // true;

Types that support option bags can have their properties mass assigned using the assign method.

const actor = new ex.Actor(options);

  pos: new ex.Vector(100, 100),
  width: 1000,
  color: ex.Color.Red



  • object
    • ParticleEmitterArgs



Optional acceleration

acceleration: Vector

Optional beginColor

beginColor: Color

Optional emitRate

emitRate: number

Optional emitterType

emitterType: EmitterType

Optional endColor

endColor: Color

Optional endSize

endSize: number

Optional fadeFlag

fadeFlag: boolean

Optional focus

focus: Vector

Optional focusAccel

focusAccel: number

Optional height

height: number

Optional isEmitting

isEmitting: boolean

Optional maxAngle

maxAngle: number

Optional maxSize

maxSize: number

Optional maxVel

maxVel: number

Optional minAngle

minAngle: number

Optional minSize

minSize: number

Optional minVel

minVel: number

Optional opacity

opacity: number

Optional particleLife

particleLife: number

Optional particleRotationalVelocity

particleRotationalVelocity: number

Optional particleSprite

particleSprite: Sprite

Optional radius

radius: number

Optional random

random: Random

Optional randomRotation

randomRotation: boolean

Optional startSize

startSize: number

Optional width

width: number