No description
- JavaScript 68.7%
- GLSL 22.5%
- CSS 5.2%
- HTML 2.9%
- TypeScript 0.7%
| src | ||
| static | ||
| .env | ||
| .gitignore | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| readme.md | ||
| vite.config.js | ||
Attribution — this is a faithful community port. Upstream: https://github.com/franky-adl/threejs-fish-simulation Author: franky-adl · License: MIT · Ported from commit
3d9e364Changes: build glue only (Genex embed-SDK boot + this notice). All credit for the code and idea goes to the original author.
Fish(Boids) Simulation in Three.js
This project is a fish schooling behavior simulation using the Boids algorithm implemented in Three.js, using GPGPU technique and instanced mesh. Code structure heavily inspired by Three.js Journey course.
Inspirations/References
- Flocking Simulation: Boids (JavaScript) by SimonDev [https://www.youtube.com/watch?v=LltugBg4dtk] | Code: [https://github.com/simondevyoutube/FlockingSimulation_Space/blob/master/fish.js]
- Coding Adventure: Boids by Sebastian Lague [https://www.youtube.com/watch?v=bqtqltqcQhw]
Setup
Download Node.js, and install pnpm package manager. Run this followed commands:
# Install dependencies (only the first time)
pnpm install
# Run the local server at localhost:5173
pnpm dev
# Build for production in the dist/ directory
pnpm build