• Content count

  • Joined

  • Last visited

  • Days Won


xerver last won the day on September 16 2016

xerver had the most liked content!


About xerver

  • Rank
    Pixi.js Moderator

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3,033 profile views
  1. xerver

    Dispatch Events

    Depends on what you want to test. If you want to test your code and assume the interaction manager works, then dispatch events from the interaction manager. If you want to test that the interaction manager works, and that your code works using it, then dispatch mouse events onto the canvas. The second is also more similar to what "a user would do".
  2. xerver

    Memory leak when loading json files

    XHR caches do not consume memory in your application space. Are you calling loader.reset() to have it clear the leader.resources object when you no longer need it to keep them? If not anything you load through the loader will be hanging around until you do because we can't know when you are done with it.
  3. xerver

    Smaller textures help with performance?

    Smaller textures take less time to upload to the GPU, and use less memory while there. The performance of *how fast* something renders is not related directly to the texture size, but instead to *what you are rendering*. For example, rendering a screen with 1024x1024 pixels is faster than a screen with 2048x2048 pixels because the fragment shader runs on less pixels. Its all about the shaders, and the viewport size, not necessarily the texture you use.
  4. I generally use that strategy, load some very small resources very quickly. Then use those to display a load screen while I download the rest of what will be needed.
  5. xerver

    Why the ticker is not redrawing the stage?

    All the ticker does is run the function you give it on some interval. To render the scene you need to create a renderer and call the render method on it, passing in the scene you wish to render. Application does this for you. I'd expect your OP to render a circle that does not move. Is that what you get?
  6. xerver

    help with splitting an application

    You added a resource to a loader that was already running, as the error states.
  7. xerver

    PIXI loader error (loader is running)

    Video on mobile is weird, you can't load/play video until the user interacts with the page. I have no idea what the issue is without debugging it live, and I don't own any of those devices If you figure it out, feel free to open an issue!
  8. xerver

    PIXI loader error (loader is running)

    Keep in mind that the .fromX() methods in PIXI do not use the resource-loader library.
  9. xerver

    PIXI loader error (loader is running)

    Not what you mean "they don't have a loader"? Resource-loader supports loading audio/video, and you can pass an array of urls that will each be added as sources. You can also pass an array of parallel mimeTypes to `metadata.mimeType` so that each URL has a mime associated. You can even create and prepare your own <video/> element if you have some complex setup that is required and pass it into the loader as `metadata.loadElement` and set `metadata.skipSource` to true so it just tracks the loading of the element and doesn't create a new one. The event that resource-loader waits for is the `load` or `canplaythrough` event, whichever comes first.
  10. xerver

    PIXI loader error (loader is running)

    Even once loading is complete, you must call reset() before starting a new load. Each loader is really meant to be a one-time-use object, where it collects resources, loads them, then the lifetime ends. The reset() method is there for you to be able to use a single instance again rather than allocating a new one. It is best if you think of the lifetime of a loader as over as soon as it completes a load, with reset() acting as a "revive" that brings the loader back to life for another use. It is a state machine that only marches forward, and can restart if you explicitly tell it to.
  11. xerver

    PIXI loader error (loader is running)

    If you are in the process of loading any resources, you must specify a parentResource for any resources you add in (usually these are adding via a middleware). Otherwise, loading a new root resource during an active load is an error. You will need to call .reset() before you can add root resources again. If there is active loading then reset will abort all active loading and reset the loader to be used for new resources.
  12. xerver

    pixi js documentation crashed???

    Should be back up now, sorry about that!
  13. xerver

    PIXI Loader handling failed loads

    Depends on the asset. For example, if you need to load a map; and it fails, you can't play the game. Generally what I've done in the past is catch all asset errors and if the errors were ones that a retry might fix (like a timeout, or 503, or some such) then retry those at the end. If I get a fatal error like a 404, I just show an error to the user and exit.
  14. We upload the texture to the GPU, we never draw to your canvas or even open a context on it.
  15. It works fine when you call sprite.update(). You just forgot to clear your canvas when you drew to the canvas in your lightenGradient function. Working pen: https://codepen.io/anon/pen/mxyezY