Rendering transparent lines in WebGL Render creates modern art
https://github.com/pixijs/pixi.js/issues/2046
HTML
<script src="https://cdn.rawgit.com/pixijs/pixi.js/master/bin/pixi.min.js"></script>
<body></body>
JavaScript
var renderer = new PIXI.CanvasRenderer(800, 600);
renderer.clearBeforeRender = false;
document.body.appendChild(renderer.view);
// create the root of the scene graph
var stage = new PIXI.Container();
// create a texture from an image path
var texture = PIXI.Texture.fromImage('http://pixijs.github.io/examples/_assets/basics/bunny.png');
// create a new Sprite using the texture
var bunny = new PIXI.Sprite(texture);
// center the sprite's anchor point
bunny.anchor.x = 0.5;
bunny.anchor.y = 0.5;
// move the sprite to the center of the screen
bunny.position.x = 0;
bunny.position.y = 150;
stage.addChild(bunny);
// start animating
animate();
function animate() {
requestAnimationFrame(animate);
// just for fun, let's rotate mr rabbit a little
bunny.x += 8;
// render the container
renderer.render(stage);
}