Skip to content

Instantly share code, notes, and snippets.

@alexmacy
alexmacy / .block
Created September 18, 2016 06:34
Rotating Shape Transitions
license: mit
@phillipweston
phillipweston / .block
Last active September 17, 2016 09:18
animated zoomed multi line chart
license: mit
@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
@veltman
veltman / README.md
Last active September 25, 2020 06:12
Voronoi relaxation
@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.

@tonyhschu
tonyhschu / .block
Last active September 13, 2019 12:46
Antibiotic Resistance Simulation
license: mit
@cmgiven
cmgiven / .block
Last active October 27, 2019 19:52
Interactive General Update Pattern
license: mit
height: 640
@monfera
monfera / .block
Last active September 6, 2016 13:23
Brownian motion with elastic collisions
license: gpl-3.0
@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 January 26, 2026 17:41
SVG heat shimmer
license: mit
border: no
height: 420