Skip to content

Instantly share code, notes, and snippets.

@JMStewart
JMStewart / index.html
Last active August 29, 2015 14:04
Pure D3 Force
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<script>
@JMStewart
JMStewart / index.html
Last active August 29, 2015 14:05
Canvas + D3 Force
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<script>
@JMStewart
JMStewart / index.html
Last active August 29, 2015 14:07
Canvas + D3 Force 2
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.js" charset="utf-8"></script>
</head>
<body>
<script>
@JMStewart
JMStewart / README.md
Last active December 22, 2015 06:39
LEAP: Target Shooter

A simple target shooter for the Leap Motion.

@JMStewart
JMStewart / index.html
Created September 5, 2013 02:35
LEAP: Simple movement
<!DOCTYPE html>
<html>
<head>
<script src="//js.leapmotion.com/0.2.0/leap.min.js"></script>
</head>
<body>
<div id="canvas">
<svg height="100%" width="100%">
@JMStewart
JMStewart / README.md
Last active December 22, 2015 09:59
Animate along a path

This is an example of animating an object to move along a defined path. The path must be an existing SVG path object, but can be hidden if you want.

@JMStewart
JMStewart / README.md
Last active December 22, 2015 11:38
LEAP: Pinch grab

This example uses two fingers to move the cursor, and a pinch motion to grab objects. Using your pointer and middle fingers like chopsticks seems to work a bit better than pinching with your thumb and pointer finger.

@JMStewart
JMStewart / index.html
Created September 6, 2013 17:44
LEAP: Pinch grab + zoom
<!DOCTYPE html>
<html>
<head>
<script src="//js.leapmotion.com/0.2.0/leap.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<div id="canvas">
<svg height="100%" width="100%">
@JMStewart
JMStewart / index.html
Created September 9, 2013 16:54
LEAP: Full hand grab
<!DOCTYPE html>
<html>
<head>
<script src="//js.leapmotion.com/0.2.0/leap.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<div id="canvas">
@JMStewart
JMStewart / index.html
Created September 9, 2013 20:13
Zip Code Map
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.land {
fill: none;
stroke: #000;
}
.county-boundary {