Skip to content

Instantly share code, notes, and snippets.

View AGoblinKing's full-sized avatar
🐢
INFRASTRUCTURE

a Goblin King AGoblinKing

🐢
INFRASTRUCTURE
View GitHub Profile
var TimeTraveler = (function() {
var time,
def = function(value) {
var values = {},
timeTraveler = {
get value() {
var lastTime = Object.keys(values)
.filter(function(pastTime) {
return pastTime < def.time;
})
is4v0g7hw43x47vi
@AGoblinKing
AGoblinKing / gist:7409677
Created November 11, 2013 08:21
private glsl
precision mediump float;
varying vec2 position;
uniform sampler2D webcam;
float wave(float x, float amount) {
return (sin(x * amount) + 1.) * .5;
}
void main() {
<!DOCTYPE html>
<html>
<head>
<script src="vendor/polymer/polymer.js" debug></script>
<link rel="import" href="elements/three-scene.html"/>
<style type="text/css">
html, body {
margin: 0px;
padding: 0px;
width: 100%;
<html>
<head>
<script src="vendor/polymer/polymer.js" debug></script>
<link rel="import" href="elements/three-scene.html"/>
</head>
<body>
<three-scene width="100%" height="100%">
<three-camera x="1" y="1" z="1" />
<three-material type="MeshLambert" color="0xCC0000" id="sphereMaterial" />
<three-geometry type="Sphere" radius="5" segements="16" rings="16"/>
<polymer-element name="three-object3d" attributes="x y z">
<script>
(function() {
function bindAttrib(from, target, name) {
from[name] && (target[name] = from[name]);
Object.defineProperty(from, name, {
enumerable: true,
set: function(value) {
<polymer-element name="three-object3d" attributes="x y z">
<script>
(function() {
function bindAttrib(from, target, name) {
from[name] && (target[name] = from[name]);
Object.defineProperty(from, name, {
enumerable: true,
set: function(value) {
<three-scene>
<three-object id="someCube">
<geometry-cube width="20" height="20 x="1" y="2" z="3"/>
<material>
<texture src="woo.png"/>
</material>
</three-object>
</three-scene>
define(function (require, exports, module) {
"use strict";
var DocumentManager = brackets.getModule("document/DocumentManager");
brackets.getModule("utils/AppInit").appReady(function () {
var p4 = require("p4");
$(DocumentManager)
.on("dirtyFlagChange", function (e, doc) {