feat(landing): real-time sun-lit Earth globe hero#5
Merged
Conversation
…support Replaces the apple hero on the landing with a compact ASCII Earth globe rasterised from ETOPO1 elevation data (120x60 grid, ~7.2k polygons, ~95 KB raw / ~30 KB gzipped via shared-vertex indexed format + 4-sig-fig truncation). Adds to GlyphDemo / glyph-runtime: - polygonsUrl: load pre-baked indexed-format polygon data instead of a mesh file. Lighter than shipping a GLB for static decorative meshes. - invertDrag: grab-and-spin sign convention (drag right rotates the visible face east). - noClampPitch: lets the user tumble the model past either pole. - realSunLight: directional light tracks the actual subsolar point computed from current UTC + day-of-year. Refreshed every 30s. - autoRotate now pauses while the user is dragging (was a bare RAF loop that fought direct input). Adds to createGlyphOrbitControls a clampPitch?: boolean option (default true; backward-compatible). Mirrored in React, Vue, and the <glyph-orbit-controls> custom element per cross-package discipline. bake-globe.mjs is the source-to-mesh tool; pulls ETOPO1 from a local etopo/ folder (gitignored), parses NetCDF-3 by hand to avoid OOM on the ~930 MB uncompressed grid, emits the indexed format consumed by the landing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the apple GLB on the landing page with an ASCII Earth globe rasterized from NOAA ETOPO1 elevation data. The lit hemisphere tracks the real subsolar point computed from current UTC.
Numbers
landing-earth.json— 95 KB raw / ~30 KB gzippedNew GlyphDemo props
polygonsUrlinvertDragnoClampPitchrealSunLightautoRotatenow also pauses while the user is dragging (was a bare RAF that fought direct input).Cross-package surface change
createGlyphOrbitControlsgainsclampPitch?: boolean(defaulttrue, backward-compatible). Mirrored in:packages/react/.../GlyphOrbitControls.tsxpackages/vue/.../GlyphOrbitControls.tspackages/glyphcss/.../GlyphOrbitControlsElement.ts(newclamp-pitchattribute)Bake pipeline
website/scripts/bake-globe.mjsparses ETOPO1 NetCDF-3 by hand (netcdfjs OOMs on the ~933 MB uncompressed grid; a typed-array view + custom header parser sidesteps it) and emits the indexed JSON. ETOPO1 source data is git-ignored — runnode website/scripts/bake-globe.mjs --landingto regenerate after dropping the .grd.gz intoetopo/.Test plan