{"id":42166019,"url":"https://github.com/demskie/webgpu-galaxy-simulator","last_synced_at":"2026-01-26T21:02:46.600Z","repository":{"id":317272286,"uuid":"1020600807","full_name":"demskie/webgpu-galaxy-simulator","owner":"demskie","description":"Interactive, GPU-accelerated galaxy simulator built with TypeScript and WebGPU","archived":false,"fork":false,"pushed_at":"2025-12-15T07:50:53.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-18T05:34:53.947Z","etag":null,"topics":["gpgpu","simulation","typescript","webgpu"],"latest_commit_sha":null,"homepage":"https://demskie.github.io/webgpu-galaxy-simulator/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/demskie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-16T05:56:49.000Z","updated_at":"2025-12-15T07:50:57.000Z","dependencies_parsed_at":"2025-12-15T11:11:12.970Z","dependency_job_id":null,"html_url":"https://github.com/demskie/webgpu-galaxy-simulator","commit_stats":null,"previous_names":["demskie/webgpu-galaxy-simulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/demskie/webgpu-galaxy-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demskie%2Fwebgpu-galaxy-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demskie%2Fwebgpu-galaxy-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demskie%2Fwebgpu-galaxy-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demskie%2Fwebgpu-galaxy-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/demskie","download_url":"https://codeload.github.com/demskie/webgpu-galaxy-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demskie%2Fwebgpu-galaxy-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28788082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpgpu","simulation","typescript","webgpu"],"created_at":"2026-01-26T21:02:45.516Z","updated_at":"2026-01-26T21:02:46.591Z","avatar_url":"https://github.com/demskie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebGPU Galaxy Simulator\r\n\r\nAn interactive GPU-accelerated galaxy simulator built with TypeScript and WebGPU. Tweak astrophysical and rendering parameters live, explore presets, and profile performance.\r\n\r\n[![Watch the video](https://img.youtube.com/vi/EqLCjZXcEWg/hqdefault.jpg)](https://www.youtube.com/embed/EqLCjZXcEWg)\r\n\r\n## Features\r\n\r\n- Real-time particle-based galaxy rendering with WebGPU\r\n- Temporal accumulation with 16-slice ring buffer for smooth visuals\r\n- Post-processing: HDR, bloom, tone mapping, exposure/saturation controls\r\n- Overdraw limiting and optional overdraw heatmap\r\n- Extensive UI with live sliders and preset management (create, save, rename, delete, export)\r\n- Built-in CPU/GPU timing and VRAM usage estimates (advanced options)\r\n\r\n## Browser requirements\r\n\r\n- A browser with WebGPU support (https://caniuse.com/webgpu)\r\n  - Chrome 113+ recommended\r\n  - Safari 26+\r\n  - Firefox 141+ (behind flag)\r\n- If the app reports “WebGPU not supported,” switch to a supported browser and ensure the page loads over HTTPS.\r\n\r\n## Quick start (local)\r\n\r\n```\r\nnpm install\r\nnpm run dev\r\nVisit http://localhost:8080\r\n```\r\n\r\n## Scripts\r\n\r\n- Start local dev server with `npm run dev`\r\n- Dev build to `public/` with `npm run build`\r\n- Prod build to `public/` with `npm run prod`\r\n\r\n## Using the app\r\n\r\n- The canvas auto-scales and the simulator starts on load.\r\n- Use the left/right control panels to tune:\r\n  - Galaxy shape and distribution (radius, spiral parameters, densities, counts)\r\n  - Star/dust sizing and brightness\r\n  - Temperature and color response\r\n  - Rendering parameters (exposure, saturation, bloom, tone map curve)\r\n  - Performance controls (temporal accumulation, framerate limit, overdraw)\r\n- Presets\r\n  - Backed by `localStorage` under key `galaxy-presets`\r\n  - Buttons let you Save/Reset/Create/Rename/Delete/Export\r\n  - Default presets come from `src/galaxy-presets.json`\r\n- Advanced options\r\n  - Toggle shows GPU timings, VRAM estimates, and debug tools\r\n  - Setting is saved in `localStorage` as `showAdvancedOptions`\r\n\r\n## Project structure (key parts)\r\n\r\n```\r\npublic/\r\n  index.html, styles.css, galaxy-simulator-bundle.js (build output)\r\nsrc/\r\n  index.ts                  # App entry; bootstraps GalaxySimulator\r\n  GalaxySimulator.ts        # Orchestrates managers, main loop\r\n  entities/Galaxy.ts        # Galaxy model, presets, localStorage\r\n  managers/                 # Camera, FPS, Resource, Rendering, UI, Accumulation\r\n  compute/Particles.ts      # Compute pipeline populating particle buffer\r\n  resources/                # GPU resource managers (MSAA, HDR, Bloom, ToneMap, etc.)\r\n  shaders/                  # WGSL shaders (core, compute, postprocessing)\r\n  utils/                    # Packing, math, helpers\r\n```\r\n\r\n## Troubleshooting\r\n\r\n- “WebGPU not supported”\r\n  - Use a recent Chrome/Edge, ensure HTTPS, or enable WebGPU in your browser flags/preferences\r\n- Black screen or no stars\r\n  - Ensure your GPU/driver supports WebGPU; try lowering star count and enabling performance mode\r\n- Sudden dimming/ghosting after changing presets\r\n  - Accumulation ring buffers are cleared automatically; one frame may appear darker as weights reset\r\n- GPU timing shows N/A\r\n  - `timestamp-query` isn’t available on your device; CPU timing still works\r\n\r\n## Development notes\r\n\r\n- TypeScript + webpack 5; bundles to `public/galaxy-simulator-bundle.js`\r\n- Uniform packing shared via `src/utils/GalaxyUniformPacker.ts` and `src/constants/uniformLayout.ts`\r\n- Temporal accumulation ring uses 16 RGBA16F layers blended via `postprocessing/accum.average.frag.wgsl`\r\n- Switching presets forces a clear of the 16 layers to avoid ghosting from stale data\r\n- Overdraw counting uses an atomic buffer and can be visualized with the debug shader\r\n- `Max Overdraw = 4096` disables overdraw buffers and overdraw debug (performance mode)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemskie%2Fwebgpu-galaxy-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemskie%2Fwebgpu-galaxy-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemskie%2Fwebgpu-galaxy-simulator/lists"}