View on GitHub

arcade-lego

Fun utilities to build LEGO from MakeCode Arcade pixel art

Open this page at https://pelikhan.github.io/arcade-lego/

Renders an image in 2D brick like LEGOs, which makes it easier to rebuild the image with real bricks. It reuses colors from the LEGO Mouliding Colors.

lego.setMouldingColorsPalette()
lego.showCursor()
lego.showBricks(img`
    . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . .
    . . . . . . . . . 1 5 5 1 . . .
    . . . . . . 1 1 1 1 1 1 . . . .
    . . . . . 1 1 5 5 5 5 5 1 . . .
    . 1 1 1 1 1 5 5 5 5 5 5 5 1 . .
    . 1 2 5 1 5 5 5 5 5 5 5 5 1 . .
    . . 1 5 5 1 5 2 1 f 5 2 2 f . .
    . . 1 2 5 5 1 1 f f 5 2 2 c . .
    1 1 2 1 5 5 5 2 f 2 2 2 2 2 1 .
    1 2 2 c 2 5 5 1 5 2 2 2 2 2 2 1
    8 2 2 2 c c 1 5 5 5 5 5 5 5 1 .
    8 1 2 2 2 2 2 5 5 5 5 5 5 5 1 .
    . 8 2 2 2 2 2 2 5 5 5 5 5 2 1 .
    . . 8 1 2 2 2 2 2 5 5 5 1 1 . .
    . . . 8 8 8 8 8 8 8 8 1 1 . . .
`)

Use as Extension

This repository can be added as an extension in MakeCode.

Edit this project Build status badge

To edit this repository in MakeCode.

Blocks preview

This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.

A rendered view of the blocks

Metadata (used for search, rendering)