@NeillBlomkamp: I should check that out- what I am attempting to do is communicate/ interact with and make films for the audience with no middle man #
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2018 Gordon Brander | |
// Released under MIT License https://opensource.org/licenses/MIT | |
const closest = (el, selector) => | |
el.closest ? el.closest(selector) : null; | |
/** | |
* Delegate event handling to a parent element. | |
* @arg {Element} el - the parent element that we will be delegating handling to. | |
* @arg {string} selector - CSS selector of elements that should receive events. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Schema, string, bool, number, listOf, optional, cssUnit4} from './ruleset.js'; | |
const parse = Schema({ | |
title: string, | |
isHidden: optional(bool, false), | |
numbers: listOf(number) | |
}); | |
parse("title: 8 Beautiful Notes; numbers: 1, 2, 3, 4, 5, 6, 7, 8") | |
// > {title: "8 Beautiful Notes", numbers: [1, 2, 3...], isHidden: false} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// D3-style select-baed DOM updating. | |
// | |
// Rather than relying on jQuery-style method-chaining to update the DOM, | |
// we use a "view" object, an ordinary object that contains the following | |
// functions: | |
// | |
// - `enter(datum) -> Element` returns a DOM node for new elements. | |
// Element will be appended to parent. | |
// - `update(el, datum, old)` handles mutating an element in response to | |
// changes in data. `old` is the last-known data for this element. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tip: use with await. | |
// const preloaded = await preloadAll(['img1.jpg', 'img2.jpg']) | |
export const preload = src => new Promise((resolve, reject) => { | |
const img = new Image() | |
img.onload = resolve | |
img.onerror = reject | |
img.src = src | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Promise for an animation frame. | |
// Tip: use with `await`. | |
export const frame = () => new Promise(requestAnimationFrame) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dom = ({tag='div', attributes={}, styles={}, classes=[], text=null, children=null}) => { | |
const el = document.createElement(tag) | |
el.className = classes.join(' ') | |
for (let [key, value] of Object.entries(attributes)) { | |
if (value) { | |
el.setAttribute(key, value) | |
} | |
} |
How to get WebVR working with your brand-new Daydream View & Pixel.
- Update Daydream app to latest (Play Store)
- Update Chrome app to latest (Play Store)
- Tip: if you're feeling brave, download Chrome Canary instead. Better perf and new features.
- Update Google VR Services (Play Store)
- Open chrome://flags/#enable-webvr
- Click "Enable"
- Open chrome://flags/#enable-vr-shell
- Set dropdown to "Enabled"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script fetches the latest master of all of the openag firmware repositories, then removes the `.git`, etc. | |
""" | |
import subprocess | |
import argparse | |
from os import path | |
LIBS = set(( | |
"https://github.com/OpenAgInitiative/openag_firmware_module.git", | |
"https://github.com/OpenAgInitiative/rosserial_arduino_libs.git", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": "general_greens", | |
"recipe_format": "phased", | |
"version": "1.0", | |
"optimization": [ | |
"general purpose" | |
], | |
"date_created": "2017-02-08", | |
"author": "openag", | |
"stages": [ |