Skip to content

Instantly share code, notes, and snippets.

{
"trips": [
{
"path": [
[
-0.1299916771,
51.5182884732
],
[
-0.1300327361,
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Trip animation – sequences (deck.gl + MapLibre)</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link href="https://unpkg.com/[email protected]/dist/maplibre-gl.css" rel="stylesheet" />
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> -->
<script src="https://unpkg.com/[email protected]/dist/maplibre-gl.js"></script>
@akre54
akre54 / renderer.ts
Created February 1, 2023 21:39
TheatreJS keyframes and WebMMuxer video encoding
import { createRafDriver, ISheet, val } from '@theatre/core'
import WebMMuxer from 'webm-muxer'
export const rafDriver = createRafDriver({ name: 'Hubble rAF driver' })
export const useRenderer = ({
sheet,
fps = 30,
bitrate = 1e6,
}: {
@akre54
akre54 / clean_svg.js
Last active November 29, 2025 11:53
TouchDesigner SVG to SOP and After Effects Bodymovin / Lottie to TD-friendly SVG
const fs = require('node:fs');
const cp = require('node:child_process');
const path = require('node:path');
const { optimize } = require('svgo');
const renderSvg = require('lottie-to-svg');
const paper = require('paper');
const { JSDOM } = require('jsdom');
const svgFlatten = require('svg-flatten');
@akre54
akre54 / .gitignore
Last active September 27, 2021 14:18
Alert me when my car is towed
.env
node_modules/
*.png
@akre54
akre54 / index.js
Last active October 4, 2017 05:52
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const React = require('react');
const ReactDOM = require('react-dom');
let interval
const COUNT = 20
import supercluster from 'supercluster'
import tilebelt from 'tilebelt'
import { max } from 'd3-array'
import db from './db'
import getMarkers from './markers'
const MIN_ZOOM = 1
const MAX_STATE_ZOOM = 7
const MAX_COUNTY_ZOOM = 9
@akre54
akre54 / README.md
Created July 8, 2015 15:27
Reflux REST mixin

Call actions on stores RESTfully:

// C
BotActions.save(null, {name: 'Curly', age: 26}); // POST a model without an id

// R
BotActions.fetch(); // GET the whole Collection

BotActions.fetch(2); // GET a single model by id
@akre54
akre54 / .gitignore
Last active October 27, 2015 13:23
Backbone deps test
node_modules
out.js*
@akre54
akre54 / typing.coffee
Created April 3, 2015 20:00
Get a notification when a user starts and stops typing on the passed-in `el`.
# Get a notification when a user starts and stops typing on the passed-in `el`.
#
# Based on https://github.com/narfdotpl/jquery-typing
module.exports = (el, {delay, start, stop}) ->
delay ||= 400
typing = false
timeout = null