I hereby claim:
- I am rolyatmax on github.
- I am taylorbaldwin (https://keybase.io/taylorbaldwin) on keybase.
- I have a public key whose fingerprint is CE47 D1B8 F780 6573 314C 68FE C193 4BA8 2C85 BD34
To claim this, I am signing this object:
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
I hereby claim:
To claim this, I am signing this object:
/* | |
Usage: | |
const regl = createRegl() | |
const data = [{position: [2, 5]}, {position: [3, 6]}, {position: [4, 1]}] | |
const {tick, getStateTexture, getStateIndexes} = createStateTransitioner(regl, data) | |
// call tick({isBrushing, brushRadius, brushPosition}) on every frame to update the animating values | |
// call getStateTexture() to retrieve the latest animating values, stored in a texture | |
// call getStateIndexes() to get a list of vec2 indexes into the animating values texture |
const { Deck } = require('@deck.gl/core') | |
const fit = require('canvas-fit') | |
const mapboxgl = require('mapbox-gl') | |
module.exports = function setupDeck (mapboxToken, center, zoom, bearing, pitch, mapStyle = 'dark', container = window) { | |
mapboxgl.accessToken = mapboxToken | |
const parentElement = container === window ? document.body : container | |
const mapContainer = parentElement.appendChild(document.createElement('div')) | |
mapContainer.style.width = '100vw' |
// <www.shadertoy.com/view/XsX3zB> | |
// by Nikita Miropolskiy | |
/* discontinuous pseudorandom uniformly distributed in [-0.5, +0.5]^3 */ | |
vec3 random3(vec3 c) { | |
float j = 4096.0*sin(dot(c,vec3(17.0, 59.4, 15.0))); | |
vec3 r; | |
r.z = fract(512.0*j); | |
j *= .125; | |
r.x = fract(512.0*j); |
const vec3 = require('gl-vec3') | |
const convexHull = require('convex-hull') | |
const earcut = require('earcut') | |
const normal = require('get-plane-normal') | |
function clipMeshWithPlane (triangles, planeNormal, pointOnPlane) { | |
const mesh1 = [] | |
const mesh2 = [] | |
const newPoints = [] | |
for (const points of triangles) { |
/* | |
Here are some ideas for how you might get file sizes and load times down when working | |
with large datasets in the browser. | |
*/ | |
// 1. Create the TypedArrays you pass to THREE's BufferGeometry on the server and write the binary output to a file: | |
// in Node | |
const vertices = new Float32Array([ 0, 0, 0, 1, 1, 1, 1, 0 ]) | |
process.stdout.write(Buffer.from(vertices.buffer)) |
/* | |
Binary Data format: | |
// buildingID int32 | |
// Vertex Offset vec3<int32> | |
// Vertex ByteSize uint8 (1 or 2 - representing the number of bytes used for the vertex X, Y, & Z) | |
// Vertex Count uint16 | |
// vertex1 X uint8 or uint16 depending on Vertex ByteSize | |
// vertex1 Y | |
// vertex1 Z | |
// vertex2 X |
const path = require('path') | |
const fetch = require('node-fetch') | |
const ProtoBuf = require('protobufjs') | |
const API_KEY = require('./api-key') | |
const API_URL = 'https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2F' | |
const FEED_IDS = [ | |
'gtfs-ace', |