Add high-performance 2D Boids simulation with WebGPU + Svelte 5, deploy via GitHub Pages#1
Merged
Merged
Conversation
Owner
|
@copilot This should be set up to deploy via GitHub actions/GitHub pages |
- Svelte 5 + Vite 6 project scaffold - WebGPU compute pipeline (binning → boid-logic → render) - Ping-pong boid storage buffers with toroidal topology - Spatial grid binning shader (atomicAdd, 64 boids/cell max) - Boid logic shader: separation, cohesion, alignment, predator avoidance, goal seeking, SDF obstacle avoidance, MIC toroidal distances - Render shader: velocity-oriented triangles, blue boids / red predators - WebGL2 + CPU fallback (spatial hash, instanced rendering) - App.svelte: full-screen canvas, 2D overlay for grid/goals/obstacles, pointer events for goal/obstacle placement and drag - ControlPanel.svelte: all sliders, toolbox, FPS display, GPU status Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: LowWeiLin <3910365+LowWeiLin@users.noreply.github.com> Agent-Logs-Url: https://github.com/LowWeiLin/Boids/sessions/89c0fa34-980e-4f1b-b44f-0a5ac0bf916a
Copilot
AI
changed the title
[WIP] Create high-performance 2D Boids simulation with agents
Add high-performance 2D Boids simulation with WebGPU + Svelte 5, deploy via GitHub Pages
Mar 24, 2026
Contributor
Author
Already set up in commit ee29821:
One-time repo setup needed: Settings → Pages → Source → GitHub Actions. |
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.
Implements a 10,000+ agent Boids simulation targeting 60 FPS using WebGPU compute shaders (WGSL), with a Svelte 5 UI and automatic GitHub Pages deployment.
Simulation Engine
WebGLFallback.js) using a JS spatial hash + instanced rendering for browsers without WebGPUUI (Svelte 5 runes)
Deployment
.github/workflows/deploy.yml: builds on push tomain, uploadsdist/viaactions/upload-pages-artifact, deploys withactions/deploy-pagesvite.config.jssetsbase: '/Boids/'to match the Pages subdirectoryOriginal prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.