• Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    Kristiyan reacted to ivan.popelyshev in Place Sprite Over All Other Sprites?   
    There're simple ways like
    class DContainer extends Container { addChildZ(container, zOrder) { container.zOrder = zOrder || 0; container.arrivalOrder = this.children.length; this.addChild(container); this.sortChildren(); } sortChildren() { const _children = this.children; let len = _children.length, i, j, tmp; for (i = 1; i < len; i++) { tmp = _children[i]; j = i - 1; while (j >= 0) { if (tmp.zOrder < _children[j].zOrder) { _children[j + 1] = _children[j]; } else if (tmp.zOrder === _children[j].zOrder && tmp.arrivalOrder < _children[j].arrivalOrder) { _children[j + 1] = _children[j]; } else { break; } j--; } _children[j + 1] = tmp; } }; } If you need sort inside the container, use it.
    If you need to move one element, just swap it with last element in container, there's swapChildren or something like that in docs. Or remove/add it again.
    If you need sort through the tree, use pixi-display, I recommend latest version: , its called "pixi-layers" instead.
    That's why I like gradual approach - choose the solution that corresponds to the scale of your problem. No one will call you stupid if you use just simple things for simple problems  There are people who think "why dont you use complex solution like webpack, too stupid for it?" but seriously, just ignore them.
  2. Like
    Kristiyan reacted to Exca in PIXI - many filters cause fps drop   
    Depending on filters and the area they are applied to it they can be really expensive. What kind of filter you have?
  3. Like
    Kristiyan reacted to jonforum in PIXI - many filters cause fps drop   
    yes glow filters are very bad 
    huge cpu computing

    You can maybe try to create a new cache textures with your [sprites+filters], it a solution if you not need to anime the grow filters.
    ~~ 18% cpu on the pixi filter demo
  4. Like
    Kristiyan reacted to ivan.popelyshev in PIXI - many filters cause fps drop   
    Pre-render glow in photoshop, add sprites instead of filters.