<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);
const loader = new PIXI.Loader();
loader
.add([
'https://i.imgur.com/SkUNDOQ.jpg',
'https://i.imgur.com/S6sxipJ.jpg',
'https://i.imgur.com/a21wWFL.jpg',
])
.load((loader, resource)=> {
console.log('Done');
for (let prop in resource) {
const sprite = new PIXI.Sprite(resource[prop].texture);
container.addChild(sprite)
}
})
This Pen doesn't use any external CSS resources.