Threejs toys

I found out a about threejs from seeing a react renderer for it. Here are some of the toys I made playing around whilst learning how to use it.

Basic Boids (View)

A first atempt at doing 3d boids. You can control with a mouse or by tapping the location of an attracting cube.

Basic Boider (View)

A slightly improved version of boids with many controls on settings. You can also zoom and rotate the camera.

Gpu Boids (View)

So I found this janky library that would convert javascript to glsl and run it on the gpu. Now, I have done a little shader code before so I thought it would be fun to try using this and see if it work.

After a rediculous amount of tinkering and finding all kinds of undocumented quirks, I got it working. It increased numbers of boids by like 4-8x. Not bad given this is all O(n^2).

Cubes (View)

Playing with instance rendering some "particles" that will stay in a sphere and move towards a cube you can control.

Hello Three (View)

Hello three js...