Skip to content

Instantly share code, notes, and snippets.

@natebates
natebates / index.html
Last active December 24, 2015 09:18
Pokemon Color Packing
<!DOCTYPE html>
<meta charset="utf-8">
<style>
html, body {
margin: 0;
padding: 0;
text-align: center;
}
.states {
@natebates
natebates / d3.layout.image-cloud.js
Last active April 26, 2016 07:45
Packed NBA Logos
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
text = cloudText,
image = cloudImage,
imageScale = cloudImageScale,
font = cloudFont,
fontSize = cloudFontSize,
@natebates
natebates / README.md
Last active November 11, 2016 21:36
CSS Cheeseburger

Received a McDonald's flyer and thought the simple cheeseburger could be easily CSS'd.

Perhaps I'll update it to be bulletproof cross-browser, but for now the cheese drips look best in Chrome.

@natebates
natebates / README.md
Last active February 1, 2023 02:12 — forked from natebates/README.md
Bounded Rect Collision
@natebates
natebates / README.md
Last active March 17, 2024 03:18 — forked from mbostock/.block
Rect Collision

Adaptation of Mike Bostock's Collision Detection with rectangular elements.

Got most of the way there myself but needed this example by Ilya Boyandin to clean it up.