Skip to content

Instantly share code, notes, and snippets.

View bumbeishvili's full-sized avatar
🏠
Working from home

David Bumbeishvili bumbeishvili

🏠
Working from home
View GitHub Profile
@bumbeishvili
bumbeishvili / .block
Created March 2, 2018 12:01 — forked from mbostock/.block
Percentage Change II
license: gpl-3.0
@bumbeishvili
bumbeishvili / geometry.js
Created March 2, 2018 11:53 — forked from 1wheel/geometry.js
two line intersection
//creates new point
function P(x, y, color){
var rv = {x: x, y: y, color: color || 'black'}
rv.toString = function(){ return rv.x + ',' + rv.y }
return rv
}
//dist
@bumbeishvili
bumbeishvili / geometry.js
Created March 2, 2018 11:48 — forked from 1wheel/geometry.js
line-intersection
//creates new point
function P(x, y, color){
var rv
if (x.map){
rv = {x: x[0], y: x[1], color: 'black'}
} else{
rv = {x: x, y: y, color: color || 'black'}
}
rv.toString = function(){ return rv.x + ',' + rv.y }
rv.type = 'point'
@bumbeishvili
bumbeishvili / README.md
Created March 2, 2018 11:23 — forked from 1wheel/README.md
intersection-multi-line
@bumbeishvili
bumbeishvili / README.md
Created March 2, 2018 11:17 — forked from 1wheel/README.md
hex-fall

Electoral hexagrams as snowfall.

Would be nice if the floating block was in the shape of the US, but didn't make it that far. Mouseover to adjust speed.

@bumbeishvili
bumbeishvili / README.md
Created March 2, 2018 11:03 — forked from 1wheel/README.md
heat-histogram
@bumbeishvili
bumbeishvili / README.md
Created March 2, 2018 11:02 — forked from 1wheel/README.md
area-flow
@bumbeishvili
bumbeishvili / README.md
Created March 2, 2018 10:56 — forked from 1wheel/README.md
conventions-layers

d3-jetpack's d3.conventions can now create canvas and html elements. Here d3.conventions({layers: 'csd'}) makes an canvas ctx, svg and div with a shared coordinate system. Yellow shapes are drawn on canvas, cyan on svg and purple on html.

Layers are position absolutely on top of each other in the order listed in the layer string. To create an svg with two canvas elements on top:

var {layers: [svg, bg_ctx, fg_ctx]} = d3.conventions({layers: 'scc'})

Hurricane How-To describes using multiple renders for something more practical than bouncing circles.

@bumbeishvili
bumbeishvili / .block
Created March 1, 2018 13:56 — forked from TennisVisuals/.block
reusable updateable global mashup
license: mit