Skip to content

Instantly share code, notes, and snippets.

@sergi
Created August 15, 2013 12:34
Show Gist options
  • Save sergi/6240494 to your computer and use it in GitHub Desktop.
Save sergi/6240494 to your computer and use it in GitHub Desktop.
Test-case for issue #233 on pixi.js
<html>
<head>
<script src="pixi.js"></script>
</head>
<body>
<script>
var stage = new PIXI.Stage(0x66FF99, true);
var renderer = PIXI.autoDetectRenderer(500, 500);
var graphics = new PIXI.Graphics();
graphics.setInteractive(true);
graphics.beginFill(0xEEEEEE);
graphics.mouseover = function(e) {
console.log(e.global.x, e.global.y);
};
document.body.appendChild(renderer.view);
stage.addChild(graphics);
function animate() {
renderer.render(stage);
}
requestAnimFrame( animate );
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment