Login
Community
DARK THEME

Micro 2D Animations

Is there a way to load animations in M2D?

Since M2D is based on Pixi and Pixi can manage animations I suspect you can.

One for the Pixi Experts :)

@TinkerSmith I am starting to think it is more valuable to learn Pixi haha

It has its perks. But dang, hard for to wrap my old brain around it, LOL

Regarding PIXI animations, I found a way to get specific frame data from a sprite animation:

// assuming your sprite is named "sprite1"
// set framenumber to whatever frame you want from your sprite animation

pixiSprite=PIXI.Sprite.from(sprites.sprite1.frames[framenumber].canvas.toDataURL())

stage.addChild(pixiSprite)

...


Here is my go at it in PIXI. Once done I will create a M2D variant. Still early tinker stage, more proof of concept ;)

https://microstudio.dev/i/TinkerSmith/pixianim/

Here you go MrBoi, the M2d version. Improved frame reader thanks to JIMB007.
Details are on the discord (also why the Y scale has to be negative).

:embed https://microstudio.io/TinkerSmith/m2danim/

https://microstudio.io/i/TinkerSmith/m2danim/

Thanks TinkerShmith, This is going to be very helpfull!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community