Skip to content

Instantly share code, notes, and snippets.

View evejweinberg's full-sized avatar
💘
Hola

Eve Weinberg evejweinberg

💘
Hola
View GitHub Profile
@evejweinberg
evejweinberg / ImgTracerTest1.js
Created April 16, 2016 15:08
image tracer to svg to bezier
var path = '../images/Faces_0.png'
ImageTracer.loadImage(
path, function(canvas) {
// Getting ImageData from canvas with the helper function getImgdata().
var imgd = ImageTracer.getImgdata(canvas);
// Synchronous tracing to SVG string
var svgstr = ImageTracer.imagedataToSVG(imgd, { pathomit: 152, lcpr: 0, scale: 1, numberofcolors: 12, blurradius: 10 });
@evejweinberg
evejweinberg / runner.dae
Created April 16, 2016 20:35
The .dae file that WILL display
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset><contributor><author>Mixamo</author><authoring_tool>COLLADA Mixamo exporter</authoring_tool><comments></comments></contributor><created>2016-04-09T17:32:12Z</created><modified>2016-04-09T17:32:12Z</modified><revision></revision><title></title><unit meter="0.010000"/><up_axis>Y_UP</up_axis></asset>
<library_geometries>
<geometry id="unamed-lib" name="unamedMesh">
<mesh>
<source id="unamed-lib-Position" name="position">
<float_array id="unamed-lib-Position-array" count="834"> 0.331414 1.648893 0.099504 0.191342 1.648893 -0.040568 0.000000 1.648893 -0.091838 -0.191342 1.648893 -0.040568 -0.331414 1.648893 0.099504 -0.382683 1.648893 0.290845 -0.331414 1.648893 0.482187 -0.191342 1.648893 0.622259 0.000000 1.648893 0.673529 0.191342 1.648893 0.622259 0.331414 1.648893 0.482187 0.382683 1.648893 0.290845 0.612372 1.865665 -0.062708 0.353553 1.865665 -0.321527
@evejweinberg
evejweinberg / untitled.js
Created April 16, 2016 20:38
.dae file that won't load, from mixamo through blender
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 2.77.0 commit date:2016-04-05, commit time:18:12, hash:abf6f08</authoring_tool>
</contributor>
<created>2016-04-16T15:59:31</created>
<modified>2016-04-16T15:59:31</modified>
<unit name="meter" meter="1"/>
@evejweinberg
evejweinberg / loadStorage.js
Created April 18, 2016 18:02
working loadStorage example
var sceneNum = 0;
var scenesTotal = [1, 2, 3, 4];
var allScenes = []
function init() {
// createFr1()
createScenes();
@evejweinberg
evejweinberg / v12.js
Created April 18, 2016 23:41
version 12
////////////////////////////////////////////////////////////
// SET_UP_VARIABLES
////////////////////////////////////////////////////////////
var scene1, scene2;
var headspin;
var scene3count;
var scene4ready;
var headZstart;
var loadingOvervid;
var videoSources;
@evejweinberg
evejweinberg / flashlight.js
Created October 27, 2016 20:21
3js flashlight/spotlight
//SpotLight( color, intensity, distance, angle, penumbra, decay )
var flashlight = new THREE.SpotLight(0xffffff,.5,200,80);
camera.add(flashlight);
flashlight.castShadow = true;
flashlight.position.set(0,0,1);
flashlight.target = camera;
@evejweinberg
evejweinberg / addHelper.js
Created October 27, 2016 20:23
3js add helpers
function addHelpers(grid_width,dims,light_name) {
if (light_name){
var directionalLightHelper = new THREE.DirectionalLightHelper(light_name, 50);
scene.add(directionalLightHelper)
}
var axes = new THREE.AxisHelper(200);
scene.add(axes);
var gridXY = new THREE.GridHelper(grid_width, dims, 0xff0000, 0xffffff);
@evejweinberg
evejweinberg / gitinit.md
Created October 27, 2016 23:55
git init

$ cd Foo
$ touch README.md
$ git init
$ git add . $ git commit -m "Initial commit"

Link your repo between local & remote, then push to remote:

$ git remote add origin git@github.com:<your_username>/Foo.git $ git push -u origin master

@evejweinberg
evejweinberg / hel.json
Created November 1, 2016 16:20
3js font file
{
"glyphs": {
"ο": {
"x_min": 30,
"x_max": 741,
"ha": 774,
"o": "m 395 683 q 645 587 550 683 q 741 337 741 492 q 646 79 741 173 q 385 -15 552 -15 q 127 78 225 -15 q 30 333 30 172 q 129 590 30 498 q 395 683 228 683 m 269 174 q 305 85 275 119 q 386 52 335 52 q 464 85 436 52 q 503 172 491 119 q 510 237 506 194 q 515 336 515 279 q 510 431 515 391 q 503 494 506 472 q 464 581 491 548 q 385 615 436 615 q 291 563 315 615 q 261 459 267 512 q 256 333 256 407 q 269 174 256 248 "
},
"S": {
"x_min": 55,
@evejweinberg
evejweinberg / webcam.html
Created November 4, 2016 13:59
3js webcam
<!doctype html>
<html>
<head>
<title>learningthree.js boiler plate for three.js</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="vendor/three.js/Three.js"></script>
<script src="vendor/three.js/Detector.js"></script>