This file contains 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
w = 3; | |
h = 4; | |
thick=19/32; // Thickness of plywood. | |
lift = 4+1/32; | |
//lift = height-(h+1)*thick-h*vspace; | |
width = 12*w; // outer width of shelves | |
hspace = (width-(thick*(w+1)))/w; | |
vspace = 12; | |
height = lift + thick*(h+1)+vspace*h; // outer height of shelves. | |
deep = 19.5; // depth of shelves |
This file contains 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 locks = {}; | |
async function protect(fn, name, ...args) { | |
while (locks[name]) await locks[name] | |
return (locks[name] = new Promise(async (resolve) => { | |
const ret = await fn(name, ...args); | |
delete locks[name]; | |
resolve(ret); | |
})); | |
} |
This file contains 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 locks = {}; | |
/** | |
* @param {string} name the thing we want to have access to | |
*/ | |
async function getLock(name) { | |
while (locks[name]) await locks[name] | |
let release; | |
locks[name] = new Promise(resolve => { | |
release = () => { |
This file contains 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
// For golden ratio rectangles | |
phi = (1 + sqrt(5)) / 2; | |
echo("phi",phi); | |
// dihedral angle of icosahedron | |
dih = acos(sqrt(5) / -3); | |
echo("dih",dih); | |
model="low_poly_person_by_Rochus.stl"; | |
modelHeight=14.274; |
This file contains 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 'magic-script-polyfills'; | |
import lumin from 'lumin'; | |
import uv from 'uv'; | |
import ssl from 'ssl'; | |
import egl from 'egl'; | |
import gl from 'gl'; | |
import png from 'png'; | |
import jpeg from 'jpeg'; |
This file contains 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
a = cos(60); | |
b = sin(60); | |
z = 0.25; // inset to connections, larger is looser. 0.2 | |
w = 7; | |
hex_tile = [ | |
[(-1+z)*a,(2*w-1-z)*b], | |
[w+(-1-z)*a,(2*w-1-z)*b], | |
[w+(-2)*a,(2*w-2)*b], | |
[w-z-1+(-2)*a,(2*w-2)*b], | |
[w-1+(w-2-z)*a,(w-2-z)*b], |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
____________________________ __ | |
/ [__ZL__] [__ZR__] \ | | |
/ [__ TL __] [__ TR __] \ | Front Triggers | |
__/________________________________\__ __| | |
/ _ \ | | |
/ /\ __ (N) \ | | |
/ || __ |MO| __ _ _ \ | Main Pad | |
| <===DP===> |SE| |ST| (W) -|- (E) | | | |
\ || ___ ___ _ / | | |
/\ \/ / \ / \ (S) /\ __| |
This file contains 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
(module | |
(type (;0;) (func (param i32 i32) (result i32))) | |
(func $add (type 0) (param i32 i32) (result i32) | |
local.get 1 | |
local.get 0 | |
i32.add) | |
(table (;0;) 1 1 funcref) | |
(memory (;0;) 2) | |
(global (;0;) (mut i32) (i32.const 66560)) | |
(export "memory" (memory 0)) |
This file contains 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 std = @import("std"); | |
const File = std.fs.File; | |
const InputEvent = packed struct { | |
sec: u64, | |
usec: u64, | |
type: u16, | |
code: u16, | |
value: i32, | |
}; |