stagexl 0.13.9+1 stagexl: ^0.13.9+1 copied to clipboard
A fast and universal 2D rendering engine for HTML5 and Dart.
import 'dart:html' as html;
import 'package:stagexl/stagexl.dart';
void main() {
// StageXL.stageOptions.renderEngine = RenderEngine.Canvas2D;
var canvas = html.querySelector('#stage');
var stage = new Stage(canvas, width: 800, height: 600);
var renderLoop = new RenderLoop();
renderLoop.addStage(stage);
var sprite = new Sprite();
sprite.graphics.moveTo(0, 0);
sprite.graphics.lineTo(240, 0);
sprite.graphics.lineTo(240, 534);
sprite.graphics.lineTo(12, 534);
sprite.graphics.arcTo(12, 534, 0, 522, 12);
sprite.graphics.closePath();
sprite.graphics.fillColor(0xFF8D307E);
sprite.graphics.beginPath();
sprite.graphics.circle(100, 100, 40);
sprite.graphics.fillColor(Color.Green);
//sprite.graphics.lineTo(0,200);
//sprite.graphics.strokeColor(Color.Red, 5);
sprite.addTo(stage);
}