stagexl_flump 0.3.2 copy "stagexl_flump: ^0.3.2" to clipboard
stagexl_flump: ^0.3.2 copied to clipboard

outdatedDart 1 only

The Flump runtime for the StageXL library.

example/example.dart

library example01;

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

void main() {

  var stage = new Stage(html.querySelector('#stage'), webGL: true);
  var renderLoop = new RenderLoop();
  renderLoop.addStage(stage);

  FlumpLibrary.load('images/flumpLibrary.json').then((flumpLibrary) {

    var idle = new FlumpMovie(flumpLibrary, 'idle');
    idle.x = 150;
    idle.y = 250;
    stage.addChild(idle);
    stage.juggler.add(idle);

    var walk = new FlumpMovie(flumpLibrary, 'walk');
    walk.x = 400;
    walk.y = 250;
    stage.addChild(walk);
    stage.juggler.add(walk);

    var attack = new FlumpMovie(flumpLibrary, 'attack');
    attack.x = 650;
    attack.y = 250;
    stage.addChild(attack);
    stage.juggler.add(attack);

    var defeat = new FlumpMovie(flumpLibrary, 'defeat');
    defeat.x = 400;
    defeat.y = 550;
    stage.addChild(defeat);
    stage.juggler.add(defeat);
  });

}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

The Flump runtime for the StageXL library.

Homepage

License

unknown (LICENSE)

Dependencies

browser, stagexl

More

Packages that depend on stagexl_flump