MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Image Morph

Create dissolving pixel-by-pixel transition animations when changing sprite images or background scenes.

morph image

Problem it solves

You want your player or enemy to power up and transform into a new appearance with a dissolving pixel animation instead of instantly snapping to the new image.

What this block does

Gradually transforms a sprite's current image into a new image by swapping random pixels over time until the full new graphic is visible.

The block

Block ID: spritemorphimage

morph %sprite(mySprite) image to %img=screen_image_picker block

Parameters

NameTypeDefaultMeaning
mySpriteSpritemySpriteThe sprite that will transform into the new image.
new_imageImageThe new image the sprite will morph into.

Example

let mySprite = sprites.create(img`.`, SpriteKind.Player)
imagemorph.morph(mySprite, img`.`)

Add the extension

Add github:UnicycleDumpTruck/pxt-image-morph to your project, or open: Import pxt-image-morph.