我使用PIXI V5,但无法添加到图像容器中...
const app = new PIXI.Application({
view: document.getElementById('main'),});
const container = new PIXI.Container();
app.stage.addChild(container);
const loader = new PIXI.Loader();
loader
.add('imgtest','https://fakeimg.pl/100/')
.load((loader,resources) => {
const sprite = new PIXI.Sprite(loader.resources.imgtest.texture);
container.addChild(sprite);
});
我尝试console.log(loader.resources.imgtest.texture)
不确定...