Answer the question
In order to leave comments, you need to log in
How to write json keys in function parameters in PixiJS in webpack?
Hello ! Installed Pixi Js in webpacke (I took create-react-app as the webpack version)
Wrote the following code
loader.add('hunter',"./images/dng.json").load(setup);
function setup() {
const texture = PIXI.Texture.from('blob_1.png') // blob_1.png -один из ключей в dng.json
console.log(texture)
const sprt = new Sprite(texture)
sprt.position.set(50,50)
console.log(sprt)
app.stage.addChild(sprt)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question