Skip to content

Instantly share code, notes, and snippets.

@monfera
monfera / .block
Last active March 5, 2018 10:38
Mixing drinks on Tralfamadore
license: none
scrolling: no
border: yes
@alexmacy
alexmacy / .block
Last active February 23, 2017 13:00
United States of Voronoi Tweening
license: gpl-3.0
@monfera
monfera / .block
Last active January 26, 2026 17:41
SVG heat shimmer
license: mit
border: no
height: 420
@monfera
monfera / .block
Last active January 26, 2026 17:40
Generative elevation map with SVG filters
license: mit
border: yes
height: 500
@monfera
monfera / .block
Last active September 6, 2016 13:23
Brownian motion with elastic collisions
license: gpl-3.0
@cmgiven
cmgiven / .block
Last active October 27, 2019 19:52
Interactive General Update Pattern
license: mit
height: 640
@tonyhschu
tonyhschu / .block
Last active September 13, 2019 12:46
Antibiotic Resistance Simulation
license: mit
@tafsiri
tafsiri / README.md
Last active October 21, 2016 03:59

Tangram Interactive Shader

Driving shaders params via mouse interaction.

Notes

Use requestRender rather than updateConfig and you can set scene properties (e.g. uniforms) directly.

To interact with uniforms, declare them in the scene file then directly manipulate them from the scene object (not the config) in the JS api.

@veltman
veltman / README.md
Last active September 25, 2020 06:12
Voronoi relaxation
@veltman
veltman / README.md
Last active November 25, 2019 20:16
Smoother polygon transitions

Smooth transitioning US tour in the same vein as this example. Steps:

  1. Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
  2. Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs

Some possible improvements:

  • Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
  • Tweaking the placement of added points with simulated annealing
  • Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled