Hi,
I'm trying to create a game with Easeljs and jade (preprocesseur HTML), but the exemple in getting started:
http://www.createjs.com/getting-started/easeljs
with the onload attribute method doesn't work in Jade with the parentheses?
body(onload='init()') return init is not define
my html:
Quotedoctype html
html(lang='en')
head
meta(charset='UTF-8')
meta(name='viewport', content='width=device-width, initial-scale=1')
+style('style.css')
title Xavier
body
canvas#myCanvas(height=200, width=500)
| fallback
script file
Quotefunction init() {
var stage = new createjs.Stage("myCanvas");
var circle = new createjs.Shape();
circle.graphics.beginFill("red").drawCircle(0, 0, 50);
circle.x = 100;
circle.y = 100;
stage.addChild(circle);
stage.update();
}
init()