// rapier · glsl · javascript

A physics playground
you can script.

Rapier physics, GLSL shaders and per-frame JavaScript, live in a browser tab. No setup, and no account needed to start.

// runs every frame
// once a second, drop a sphere
if (time % 1 < delta) addObject('sphere');
// spin the object this script is bound to
if (self) applyTorque(self.id, 0, 2, 0);

// capabilities

Everything runs in a tab

// cloth

Cloth Simulation

Verlet integration with pins, wind, and tear thresholds.

// physics

Rigid Body Dynamics

|

// scripting

Per-Frame JavaScript

// fragment.glsl

Live GLSL Shaders

Write fragment and vertex shaders. Every keystroke updates the surface.

Procedural Mesh

0:00

GIF Recording

|
copied

Cloud Sharing

One-link sharing. Fork any scene.

// edit it

Edit it live.

Write shaders and build geometry with code. Drag to orbit, tweak sliders, and see changes instantly.

Live Preview
5.0
2.0
Open Full Playground
Fragment ShaderEditable - GLSL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
uniform float u_time;
uniform float u_scanSpeed;
uniform float u_rainbowScale;
varying vec2 vUv;
varying vec3 vNormal;
varying vec3 vPosition;
varying vec3 vViewDir;

vec3 hsv2rgb(vec3 c) {
  vec4 K = vec4(1.0, 2.0/3.0, 1.0/3.0, 3.0);
  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}

void main() {
  float fresnel = pow(1.0 - max(dot(vNormal, vViewDir), 0.0), 3.0);
  float hue = fract(vUv.y * u_rainbowScale + u_time * 0.2 + fresnel * 0.5);
  vec3 rainbow = hsv2rgb(vec3(hue, 0.8, 1.0));
  float scanline = sin(vUv.y * 80.0 + u_time * u_scanSpeed) * 0.5 + 0.5;
  scanline = smoothstep(0.3, 0.7, scanline) * 0.15;
  vec3 color = mix(rainbow * 0.6, vec3(1.0), fresnel * 0.7) + scanline;
  gl_FragColor = vec4(color, 1.0);
}

// pricing

Pick your tier

The studio is free forever, cloud saves included. Pay only if you need more space.

Free

The full studio, forever.

  • Every feature unlocked
  • 100 MB cloud saves
  • Private or link-shared scenes
  • Community support
$0forever
Open Studio
Recommended

Creator

More cloud space for people who save a lot, and a way to support the project.

  • Everything in Free
  • 5 GB cloud storage (50x Free)
  • Supports development of the studio

Coming soon

  • Mesh export (GLTF, OBJ)
  • Custom scene URLs
$5/month

Billed monthly. Cancel anytime.

Studio

For teams, classrooms, and research groups.

Coming soon

  • Shared team scene library
  • Classroom assignment links
  • Bulk export

Not on sale until these are built. Teachers can already share scenes with a class using link sharing on the Free plan.