Popular Content

Showing content with the highest reputation on 05/19/20 in all areas

  1. 2 points

    pixi-layers : PIXI is not defined

    @charlie_says thank you for your answer, even though it didn't work in my case, it putted me on the way to what @bubamara said, I had actually found the solution but a bad config in my webpack conf was compiling the code in the wrong location 🤦‍♂️ So yes: simply providing PIXI through the webpack config is the way, thanks everyone for your help.
  2. 1 point

    pixi-layers : PIXI is not defined

    Really should be mentioned in Pixi wiki as it's frequent question.. Add this to you webpack config file: plugins: [ new webpack.ProvidePlugin({ PIXI: 'pixi.js' }) ] ..and then only import pixi layers, spine, whatever.
  3. 1 point

    pixi-layers : PIXI is not defined

    I had a similar issue, I was (and am) using webpack - but I'm not sure I'm working in the same way as you (I'm not using require in my project) I hope this helps:
  4. 1 point

    Hangman - Pixijs and Effector

    Hey there, It is for beginners that's right. I just checked the first article and I linked to the source right there. Here's the exact sentence. Don’t worry though, here is the public Github repository, so that you can clone it and run it locally to play around with, or use as a starter for your own projects.
  5. 1 point

    Get the real width of an image

    When you're not using a preloader... the width is 1 until the image had been loaded. We can't know the true width of something if it's not been loaded yet. When it has, an event on the texture is fired and the true value can be known. If using a loader, then it'll give you the references to things it loads which you can pass in elsewhere. The built in loader will add textures loaded into PIXI.utils.TextureCache that you can reference from anywhere.