MrBurda

Members
  • Content Count

    2
  • Joined

  • Last visited


Reputation Activity

  1. Thanks
    MrBurda reacted to ivan.popelyshev in Proper way to animate sprites   
    tutorial for pixi https://github.com/kittykatattack/learningPixi

    example of animated sprite: http://pixijs.io/examples/#/basics/spritesheet.js

    pixi animated sprite sources: https://github.com/pixijs/pixi.js/blob/dev/src/extras/AnimatedSprite.js , its `PIXI.extras.AnimatedSprite`

    proposition to automatically change textures array: https://github.com/pixijs/pixi.js/pull/4433 , you can view source in "Files" tab

    I suggest you make your  own animation class based on AnimatedSprite. Pixi vanilla animation is very limited, just because there are so many ways how to animate sprites, we just keep it simple. Try AnimatedSprite , then try to make your own. 

    You also have to learn how pixi ticker works , there are always problems with ticking, for example you can just forget that you removeChild on sprite, but not stopped it from ticking.
    SUMMARY: there's no "proper way" of animating sprites. there are many formats for animations like Spine or GAF, and simple implementations that just change the texture. Its up to you to choose one or make your own.
  2. Thanks
    MrBurda reacted to ivan.popelyshev in Using Pixi for procedural image drawing.   
    The only interface in PixiJS that gives advantages for pixel manipulations is called TextureResource, it was introduced in v5. I didnt see anything like that in other renderers, but if you use it right, you can make your own Bitmap. There're no articles on it, only one example https://pixijs.io/examples/#/textures/gradient-resource.js and one hack: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#pixisprite . If have to know what "subTexImage2D" is and how to do manipulations with html5 canvas getImageData/putImageData.
    I use pixel manipulation a lot and in a few months ill be ready to make Bitmap plugin that allows to do it.
    However, you might be intereseted in manipulations with RenderTexture, shaders and filters - it allows to create your own lighting and other effects.