Daylight Ledger
- Lab Skill
- v0.1.2
- Interactive 3D
A year of daylight on one plate — closed-form solar declination feeding the half-day-arc formula to paint daylight and three twilight bands across latitude and date.
示例
Daylight Ledger
该示例在沙盒化的框架中运行,无法访问此页面。
在线运行
在 SandBase sandbox 中运行,并在 Lab 中查看结果。
在 Lab 中打开 ↗你将获得什么
Bring a latitude and the year to chart. The Skill returns a downloadable Skill and a runnable daylight plate.
工作原理
- 01
Build the desk or lamp brief
Daylight Ledger builds from a brief in assets/briefs/: npm run build writes dist/index.html with the English desk brief, and npm run build:zh writes the Chinese lamp brief. Open dist/index.html directly or through any static server. The page runs offline in the browser, uses no location services and makes no model calls; latitude is chosen, never detected.
- 02
Compute declination and twilight bands
decl(d) uses the J2000 approximation, from mean anomaly to ecliptic longitude to obliquity tilt, peaking at ±23.44 degrees. half(lat, δ, sinAlt) applies the half-day-arc formula at −0.833, −6, −12 and −18 degrees for daylight and civil, nautical and astronomical twilight. Almanac.sample fills four tables over 731 samples, and isolines draws 6, 9, 12, 15 and 18 hour contours.
- 03
Shoot and read a day
npm run shoot serves dist/ with all network blocked and asserts the mechanism semantics. Then set a latitude with the meridian-arc dial or a city chip, and drag across the chart, the date rail or the arrow keys to move the hairline. Check that solstices land near day 171 and day 354 and that a polar latitude shows a midnight-sun or polar-night run label.
常见问题
What does Daylight Ledger chart?
Daylight Ledger charts a whole year of light for one latitude on a single almanac plate. Navy night with stars sits under three twilight bands and a daylight band in a sun gradient, with solstice and equinox rules. A hairline on the selected day reads its sunrise and sunset.
Are the Daylight Ledger solstice dates hardcoded?
No. Daylight Ledger derives solstices and equinoxes from decl() itself: extrema fall near day 171 and day 354 and zero crossings at the equinoxes. The events row is computed from the declination formula rather than read from a table.
How does Daylight Ledger detect midnight sun and polar night?
Daylight Ledger finds them in the band data. In the half-arc formula, a cosine of 1 or more means the sun never rises, and minus 1 or less means it never sets. run(k, test) then finds the longest such run, which gets a midnight-sun or polar-night label.
Does Daylight Ledger use my location?
No. Daylight Ledger uses no network and no location services, so you pick the latitude with the meridian dial or city chips. Latitudes are clamped to ±89.99 so the pole never divides by zero.
What are the Daylight Ledger date limits?
Daylight Ledger pins the year at construction with new Almanac(year) and uses a 365-day year. Its heat field evaluates the same formula on a 365 by 361 grid of day and latitude.
Is Daylight Ledger free to use?
Yes. Daylight Ledger computes every band in the browser from closed-form formulas in src/almanac.js and makes no model calls at runtime. Building only fills the ledger template with the chosen brief's copy.
更多 Skills
所有 Interactive 3D Skills →
Resin Diorama
Live 3D resin-block dioramas in your browser: send a little tram across a clear turquoise sea, or ripple the bay of a cliff island. Synthesized sound, and every scene can be tuned.

3D Vehicle Worlds
Explore interactive 3D vehicle worlds in your browser, with varied terrain, camera controls and driving effects. Choose a playable example to begin.

3D Firefly Terrariums
Turn a thick glass miniature, scatter glowing fireflies and open its brass lid. Actual particles leave through the neck and return before it seals. A moonlit cabin, forest and real local lights in one offline HTML.

Jelly Candy: Fruit Bears
Six translucent fruit gummies on a white table. Grab any part and pull, lift a head until the neck stretches thin, press one flat until it springs back, flick one across the pile or pour in more. Fixed-step soft-body physics and a marching-cubes skin in one offline HTML.

WebGPU Soft-Body Gummy Bears
Four translucent gummy bears on an ivory floor, rendered with native WebGPU. A deterministic 36-second choreography stretches, presses, flips and tumbles them before they settle back to the exact rest pose. Drag any bear to stretch, squish or toss it. A fixed-step tetrahedral XPBD solver in one offline HTML.

Stone Stars: 3D Miniature Landmark City
Turn a city into a storybook 3D island around one landmark, with chapters, a daylight-to-starlight slider, street life and a matching scored 24-second film. Sample: a Gaudí-style basilica.

