<canvas id="main"></canvas>
* {padding: 0; margin: 0}
const app = new PIXI.Application({
  view: document.getElementById('main'),
  width: 200,
  height: 200,
  antialias: true,
  transparent: false,
  backgroundColor: 0x00CC99,
});

const container = new PIXI.Container();
app.stage.addChild(container);


PIXI.Loader.shared
  .add('fakeimg1','https://i.imgur.com/SkUNDOQ.jpg')
  .load((loader, resource)=> {
    console.log('Done');
      const sprite = new PIXI.Sprite(resource.fakeimg1.texture);
      container.addChild(sprite)
  })

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.1.3/pixi.min.js