TSL API for Animation
Run TSL Synthesis from your browser:
1. Press "Run Synthesis"
2. Change the spec, rinse and repeat!
TSL x Three.js Documentation
shapes
- cube
- sphere
- polygon
Three.js shape properties
- shape.rotation: default THREE.Euler(0, 0, 0)
- shape.scale: default THREE.Vector3(1, 1, 1)
- shape.position: default THREE.Vector3(2, 2, 0)
- cubeColor: default THREE.Color(255, 255, 255)
- sphereColor: default THREE.Color(255, 255, 255)
- polyColor: default THREE.Color(255, 255, 255)
functions
- sin(x): sin wave of x in radians
- saw(x): saw wave of x in radians
- color(r, g, b): THREE.Color(r, g, b)
primitives
- t: increments by 1 every timestep
- count: default at 0
- rand: random number between 0 and 1 at every timestep
events
- pressL(e): left arrow press
- pressR(e): right arrow press
- pressUp(e): up arrow press
- pressDown(e): down arrow press
- pressSpace(e): space bar press