GalaxyJS 3.3.0 "Deep Field" — a zero-dependency WebGL2 tier + 20 animations (60 → 80) - #5
Merged
Conversation
… the README badge pointed at nothing
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.
A WebGL2 tier, still zero dependencies
Canvas 2D remains the default renderer and the fallback.
registerAnimationnow acceptsrenderer: "webgl2", and a newregisterShader(name, { defaults, uniforms, fragment })helper compiles a full-screen fragment shader and hands it the same lifecycle every 2D animation already gets:ResizeObserversizinguMouse(xy in device pixels, y-up, z = inside)IntersectionObserversuspension while off-screenprefers-reduced-motionGeometry is a single full-screen triangle derived from
gl_VertexID— no vertex buffer is allocated and nothing leaks. When a browser cannot supply a WebGL2 context,glPosterFallbackpaints a static 2D poster from the animation's own palette rather than leaving an empty canvas.20 new animations (60 → 80)
lensing(Schwarzschild deflection + Einstein ring),accretionDisk(Doppler beaming + gravitational redshift),nBody,tidalStream,inspiralvolumetricNebula(Beer–Lambert + Henyey–Greenstein),starSurface(granulation, limb darkening, prominences),atmosphere(Rayleigh + Mie),dustLanes(self-shadowed),protoplanetaryspectrograph,transitCurve,waterfall,hrDiagram,pulsarTiminggravityWell,nebulaPaint,solarWind,starForge,relativisticJetsChanged
galaxy.d.tsdeclares all 80 names inAnimationType.test.mjsandtest-mcp.mjsasserted the literal60in four places, which fails on every addition and trains you to bump the number instead of reading the failure. A>= 80floor still catches accidental deletion.test.mjs:registerShaderpresent, a WebGL2 context requested, a 2D fallback available, and an assertion that the library never force-loses a WebGL context — a canvas returns the same context object on everygetContext, so losing it would poison any later mount on that canvas.index.htmlversion/cache-bust strings updated;galaxy.min.jsrebuilt (157.2 kB, 52.1 kB gzip).Verification
Every one of the 20 was rendered in a real browser (headless Chromium) and inspected, not just compiled. A harness reported blank / blown-out / not-actually-animating per animation with pixel statistics and screenshots. Four real bugs were found and fixed that way — including
solarWind, whose particles were launched upstream of a cull box that destroyed them on their first frame, so the scene silently froze.node test.mjsandnode test-mcp.mjspass; the manifest regenerates with no drift.