MCPcopy Index your code
hub / github.com/ULuIQ12/webgpu-tsl-linkedparticles

github.com/ULuIQ12/webgpu-tsl-linkedparticles @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
72 symbols 121 edges 18 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Linked particles

Linked particles

More experimentation with TSL.

Simple Particles and associated geometry handled in a compute shader with TSL.

And a lot of post processing with the provided nodes

Website

Visit https://ulucode.com/random/webgputests/linked/ to play! Requires a browser with WebGPU support.

Where to look

The important code, regarding TSL /src/lib/elements/LinkedParticles.ts The file is commented and uses mostly descriptive variable names.

Getting Started

To start the development environment for this project, follow these steps:

  1. Clone the repository to your local machine:

bash git clone https://github.com/ULuIQ12/webgpu-tsl-linkedparticles.git

  1. Navigate to the project directory:

bash cd webgpu-tsl-linkedparticles

  1. Install the dependencies:

bash npm install

  1. Start the development server:

bash npm run dev

This will start the development server and open the project in your default browser.

Building the Project

  1. Edit the base path in vite.config.ts

  2. To build the project for production, run the following command:

npm run build

This will create an optimized build of the project in the dist directory.

Acknowledgements

  • Uses Three.js https://threejs.org/
  • Built with Vite https://vitejs.dev/
  • UI Management uses LilGui and a bit of React https://react.dev/
  • SDF functions and other utilities from Inigo Quilez https://iquilezles.org/

Resources

  • Three.js WebGPU examples : https://threejs.org/examples/?q=webgpu
  • Three.js TSL documentation : https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language

Extension points exported contracts — how you extend this code

IAnimatedElement (Interface)
(no doc) [4 implementers]
src/lib/interfaces/IAnimatedElement.ts
ILargeCollapsableProps (Interface)
(no doc)
src/components/LargeCollapsable.tsx
ISliderProps (Interface)
(no doc)
src/components/Slider.tsx
IInfoModalProps (Interface)
(no doc)
src/components/InfoModal.tsx
ICollapsableProps (Interface)
(no doc)
src/components/Collapsable.tsx
IIntroModalProps (Interface)
(no doc)
src/components/IntroModal.tsx

Core symbols most depended-on inside this repo

updateScreenPointer
called by 4
src/lib/utils/Pointer.ts
registerAnimatedElement
called by 2
src/lib/Root.ts
init
called by 2
src/lib/Root.ts
onResize
called by 2
src/lib/Root.ts
update
called by 2
src/lib/interfaces/IAnimatedElement.ts
closeCross
called by 1
src/components/GFX.tsx
uluLogo
called by 1
src/components/GFX.tsx
globeIcon
called by 1
src/components/GFX.tsx

Shape

Function 33
Method 27
Class 6
Interface 6

Languages

TypeScript100%

Modules by API surface

src/components/GFX.tsx15 symbols
src/lib/Root.ts14 symbols
src/lib/elements/LinkedParticles.ts10 symbols
src/lib/utils/Pointer.ts8 symbols
src/App.tsx6 symbols
src/components/LargeCollapsable.tsx3 symbols
src/components/IntroModal.tsx3 symbols
src/components/InfoModal.tsx3 symbols
src/components/Collapsable.tsx3 symbols
src/lib/interfaces/IAnimatedElement.ts2 symbols
src/components/threeroot.tsx2 symbols
src/components/Slider.tsx2 symbols

For agents

$ claude mcp add webgpu-tsl-linkedparticles \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact