MakeCode Games!

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

← Back to extensions

Lantern

Create dark levels with dynamic lighting effects like circular lanterns, glowing torches, and directional flashlights.

band width of

Problem it solves

A bonfire sprite in your scene needs a much wider glow radius than a tiny handheld candle sprite.

What this block does

Changes the light radius and band thickness for a specific sprite that already has a circle light attached in the multi-light system.

The block

true block

Parameters

NameTypeDefaultMeaning
spriteSpritemySpriteThe sprite whose light size you want to adjust.
bandWidthnumber4The new thickness in pixels of the light bands.

Example

let torch = sprites.create(img`.`, SpriteKind.Player)
multilights.addLightSource(torch, 4)
multilights.bandWidthOf(torch, 10)

Add the extension

Add github:felixtsu/pxt-lantern to your project, or open: Import pxt-lantern.