Piximental
by paulftw
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/3.0.9/pixi.min.js"></script>
<title>pixi.js example 1</title>
CSS
body {
margin: 0;
padding: 0;
background-color: #000000;
}
JavaScript
// create a renderer instance.
var renderer = PIXI.autoDetectRenderer(400, 300);
// add the renderer view element to the DOM
document.body.appendChild(renderer.view);
requestAnimationFrame( animate );
var stage = new PIXI.Container();
var texture = PIXI.Texture.fromImage("//designmodo.github.io/Flat-UI/docs/assets/img/demo/logo-mask.png");
// create a new Sprite using the texture
var bunny = new PIXI.Sprite(texture);
// center the sprites anchor point
bunny.anchor.x = 0.5;
bunny.anchor.y = 0.5;
// move the sprite t the center of the screen
bunny.position.x = 200;
bunny.position.y = 150;
stage.addChild(bunny);
console.log('bun');
function animate() {
requestAnimationFrame( animate );
bunny.rotation += 0.01;
//bunny.scale += 0.001;
// render the stage
renderer.render(stage);
};