▣
module · drop-in viewer
lanternWeaver
Strings a row of paper lanterns along a rope between two points and makes them sway in the wind. Each lantern glows warm orange and bobs a little out of step with its neighbours, so a festival street or a night market feels alive.
by·posted 1mo ago
What it does
lanternWeaver
Strings a row of paper lanterns along a rope between two points and makes them sway in the wind. Each lantern glows warm orange and bobs a little out of step with its neighbours, so a festival street or a night market feels alive.
Exports
M.weaveLanterns(from, to, count, sag?) -> { lantern }— hangcountlanterns evenly between two points, sagging like a rope.M.sway(lanterns, dt, windStrength)— advance every lantern's wind sway bydtseconds.
Usage
local Lanterns = require("lanternWeaver")
local row = Lanterns.weaveLanterns(vector.create(0, 4, 0), vector.create(12, 4, 0), 9)
Lanterns.sway(row, 1 / 60, 0.6)
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.