Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Dale lifeinchords

View GitHub Profile
@lifeinchords
lifeinchords / debugdraw.js
Created Mar 23, 2019 — forked from cbranch/debugdraw.js
An implementation of the Box2D debug draw functionality for pixi.js
View debugdraw.js
// Gets a JSDraw instance which renders to a PIXI graphics object.
// graphics: an instance of PIXI.Graphics
// scale: the scaling factor to convert from Box2D coordinates to screen pixels
function getPIXIDebugDraw(graphics, scale) {
function getColorFromDebugDrawCallback(color) {
var col = Box2D.wrapPointer(color, Box2D.b2Color);
var red = (col.get_r() * 255 * 255 * 255)|0;
var green = (col.get_g() * 255 * 255)|0;
var blue = (col.get_b() * 255)|0;
return red + green + blue;
@lifeinchords
lifeinchords / js
Last active Jul 11, 2016
Kinetic rollage study with P5.js
View js
// From: https://github.com/parallelsio/processing-studies/blob/master/middleman/source/js/sketch.js
// Part of a series of studies for parallels.io project
// Later versions: http://codepen.io/lifeinchords/pen/avGBoL
// DEPENDS ON: http://p5js.org
var sourceOne;
var sourceTwo;
var dest;
@lifeinchords
lifeinchords / makehub
Last active Aug 29, 2015 — forked from mrvolta/makehub
DIY Microscope
View makehub
# Title
DIY Microscope
# Picture
media: http://s14.postimg.org/5d0apb39t/Photo0292.jpg
# Objective
To use a simple usb webcam as a microscope, only a few modifications are needed. Also, A Software That Control The Focus Of Specimen Using Small Servo Motor.
# Duration
4 Day
# Age Group
all
You can’t perform that action at this time.