AndreasLoew

PixiJS: SpriteSheet Tutorial

Recommended Posts

PixiJS tutorial: How to create sprite sheets and animations

I've just created a short tutorial for PixiJS that explains

  • How to create & use sprite sheets with a few mouse clicks
  • Use animations from sprite sheets (much easier than enumerating all sprites manually....)
  • Optimize sprite sheets for smaller size and faster loading (up to 50%)
  • Visually edit pivot points

The full tutorial including source code is available from here: How to create sprite sheets and animations for PixiJS

 

 

 

Share this post


Link to post
Share on other sites

 

On 3/13/2019 at 4:59 PM, johnnycash said:

What if I want to have multiple different color characters?

How can I change the color of the character in this case with PIXI?

You can use tint (there is doubletint implementation in pixi-heaven), or multiple sprite-variants, or custom Filter with colors replacements behaviour. 

https://github.com/gameofbombs/pixi-heaven

Share this post


Link to post
Share on other sites
On 3/13/2019 at 4:59 PM, johnnycash said:

What if I want to have multiple different color characters?

How can I change the color of the character in this case with PIXI?

if you know how to work with canvas2d, you can just use plain old getImageData to get pixels, change the color with FOR cycle and use pixijs v5 BufferResource to create it to texture. Or putImageData to canvas and BaseTexture.from() in v4/v5

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.