Skip to content

Ground creatures and props with contact and cast shadows - #7

Merged
vaprdev merged 3 commits into
mainfrom
shadows
Oct 10, 2026
Merged

vaprdev merged 3 commits into
mainfrom
shadows

Conversation

@vaprdev

@vaprdev vaprdev commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

Creatures and props floated on the ground. A new src/shadow.ts grounds them with a soft contact shadow and a cast shadow away from the light.

+shade = sunShade(time, look.orb, weather.covered)
 draw creature / prop
+  groundShadow(hdr, W, H, shade, x, y, w, h, tip?, lift?)   before drawing it

Shadows are short by day, long and spreading at sunset, faint at night and contact-only under cloud; lift fades them for hops. They multiply the ground toward a sky-tinted color so they never gray it. Used in beach, city, desert, farm, jungle, prehistoric, tundra and zen; exported from the API, shown in the template and documented.

Evidence

Before (main) on the left, after on the right.

shadows

Sunset
shadows sunset

Verification: bun run typecheck passes; CI's check job runs dev/check.ts on this branch.

Merge Danger

Door: two-way

Blast Radius: visuals

Eight wallpapers; overlapping shadows stacking darker is fixed during integration in #1.

Merged together with the other visual improvements in #1; this PR's CI screenshot check fails by design because screenshots are regenerated there.

@vaprdev
vaprdev merged commit a553b85 into main Oct 10, 2026
1 of 2 checks passed
@vaprdev
vaprdev deleted the shadows branch October 10, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant