[Chrome v32]用pixi.js繪製一個矩形
如何用PIXI.js庫繪製一個基本的RED矩形?
我想這(不工作)
var stage = new PIXI.Stage(0xFFFFFF);
var renderer = PIXI.autoDetectRenderer(400, 300);
document.body.appendChild(renderer.view);
renderer.render(stage);
var rect = new PIXI.Rectangle(100, 150, 50, 50);
stage.addChild(rect);
錯誤:
Uncaught TypeError: Object [object Object] has no method 'setStageReference'