stagexl_particle 0.3.8

  • Example
  • Installing
  • Versions
  • 0

The StageXL Particle library is an extension to the StageXL Library to show particle effects. You can use particle effects to simulate fire, smoke, explosions or similar things. Often those effects will make your game visually more appealing.

Particle Emitter

The particle emitter is a DisplayObject you can add to the display list. It is also the origin where all particles are emitted. Use the particle designer on the StageXL homepage to configure all the parameters necessary to get a great looking particle emitter.


The StageXL library is intended for Flash developers who want to migrate their projects as well as their skills to HTML5. Therefore the library provides the familiar Flash API built on open web standards.

How To

The StageXL Particle repository on GitHub contains an example how to use the Particle Emitter and how to add it to the Stage. Start with the Particle Designer to configure the particle effect as desired. Then copy the generated JSON string to your Dart project and simply create the ParticleEmitter as shown in the example. Don't forget to add the ParticleEmitter to the Juggler for the animation.


Build Status


This file contains highlights of what changes on each version of the StageXL_Particle package. This file is normally updated whenever we push a new version to pub.

Pub version 0.3.8

  • Added support for strong mode

Pub version 0.3.7

  • Updated to StageXL 1.0.0

Pub version 0.3.7

  • Updated to StageXL 0.13.0

Pub version 0.3.6

  • Updated to StageXL 0.12.0

Pub version 0.3.5+1

  • Updated to StageXL 0.11.0

Pub version 0.3.4

  • Updated to StageXL 0.10.2

Pub version 0.3.3

  • Updated to StageXL 0.10.0

Pub version 0.3.2

  • Updated pubspec package versions.

Pub version 0.3.1

  • Added dedicated Canvas2D and WebGL renderer

Pub version 0.3.0

  • Support for WebGL renderer in StageXL

Pub version 0.2.0

  • Set version of dependencies according to Dart 1.0 release.

Pub version 0.1.1

  • Some minor changes to align with the latest Dart changes.

Pub version 0.1.0

  • Moved Particle emitter runtime from StageXL to StageXL_Particle.


library example01;

import 'dart:html' as html;
import 'package:stagexl/stagexl.dart';
import 'package:stagexl_particle/stagexl_particle.dart';

void main() {

  StageXL.stageOptions.renderEngine = RenderEngine.WebGL;
  StageXL.stageOptions.backgroundColor = Color.Black;

  var stage = new Stage(html.querySelector('#stage'));
  var renderLoop = new RenderLoop();


  var particleConfig = {
    "lifeSpan":0.7, "lifespanVariance":0.2,
    "startSize":16, "startSizeVariance":10,
    "finishSize":53, "finishSizeVariance":11,
    "location":{"x":0, "y":0},
    "locationVariance":{"x":5, "y":5},
    "speed":100, "speedVariance":33,
    "angle":0, "angleVariance":360,
    "gravity":{"x":0, "y":0},
    "radialAcceleration":20, "radialAccelerationVariance":0,
    "tangentialAcceleration":10, "tangentialAccelerationVariance":0,
    "minRadius":0, "maxRadius":100, "maxRadiusVariance":0,
    "rotatePerSecond":0, "rotatePerSecondVariance":0,
    "startColor":{"red":1, "green":0.74, "blue":0, "alpha":1},
    "finishColor":{"red":1, "green":0, "blue":0, "alpha":0}

  var particleEmitter = new ParticleEmitter(particleConfig);
  particleEmitter.setEmitterLocation(400, 300);


  var mouseEventListener = (MouseEvent me) {
    if (me.buttonDown) particleEmitter.setEmitterLocation(me.localX, me.localY);

  var glassPlate = new GlassPlate(800, 600);


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  stagexl_particle: ^0.3.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:stagexl_particle/stagexl_particle.dart';
Version Uploaded Documentation Archive
0.3.8 Jun 27, 2017 Go to the documentation of stagexl_particle 0.3.8 Download stagexl_particle 0.3.8 archive
0.3.7 Nov 21, 2015 Go to the documentation of stagexl_particle 0.3.7 Download stagexl_particle 0.3.7 archive
0.3.6 Jun 22, 2015 Go to the documentation of stagexl_particle 0.3.6 Download stagexl_particle 0.3.6 archive
0.3.5+1 Mar 25, 2015 Go to the documentation of stagexl_particle 0.3.5+1 Download stagexl_particle 0.3.5+1 archive
0.3.5 Mar 25, 2015 Go to the documentation of stagexl_particle 0.3.5 Download stagexl_particle 0.3.5 archive
0.3.4 Nov 29, 2014 Go to the documentation of stagexl_particle 0.3.4 Download stagexl_particle 0.3.4 archive
0.3.3 Sep 6, 2014 Go to the documentation of stagexl_particle 0.3.3 Download stagexl_particle 0.3.3 archive
0.3.2 May 23, 2014 Go to the documentation of stagexl_particle 0.3.2 Download stagexl_particle 0.3.2 archive
0.3.1 Mar 3, 2014 Go to the documentation of stagexl_particle 0.3.1 Download stagexl_particle 0.3.1 archive
0.3.0+2 Feb 1, 2014 Go to the documentation of stagexl_particle 0.3.0+2 Download stagexl_particle 0.3.0+2 archive

All 15 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.0 <2.0.0