Log inGet started
World

Harbor Lanterns

Branchmain
Branchesmain
Commit71d689c1f5

README.md

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 } — hang count lanterns evenly between two points, sagging like a rope.
  • M.sway(lanterns, dt, windStrength) — advance every lantern's wind sway by dt seconds.

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)