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 svgNS = "http://www.w3.org/2000/svg"; | |
/** | |
* @description Not currently used. | |
* There are top level nodes which contain metadata, | |
* I'm not sure how many there are, but at least I've seen: | |
* memo, originalAuthorName, title | |
*/ | |
const getMetadataValue = (oripa, metadataKey) => { | |
const parentNode = Array.from(oripa.children) | |
.filter(el => el.attributes.length && Array.from(el.attributes) |
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
class Ring { | |
a: number; | |
b: number; | |
c: number; | |
constructor(a: number, b: number, c:number) { | |
this.a = a; | |
this.b = b; | |
this.c = c; | |
} | |
}; |
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
<!-- 2 terminal windows | |
one running ngrok | |
one running localhost server | |
php -S localhost:8000 --> | |
<!DOCTYPE html> | |
<head> | |
<title>three js</title> | |
<style> |
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
var degtorad = Math.PI / 180; | |
function makeRotationMatrix(alpha, beta, gamma) { | |
var _x = beta ? beta * degtorad : 0; | |
var _y = gamma ? gamma * degtorad : 0; | |
var _z = alpha ? alpha * degtorad : 0; | |
var cX = Math.cos( _x ); | |
var cY = Math.cos( _y ); |
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
<!DOCTYPE html> | |
<head> | |
<title>three js</title> | |
<style> | |
/*css goes here*/ | |
html, body { | |
margin: 0; | |
overflow: hidden; /*nice to not use this*/ | |
} | |
</style> |
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
<!DOCTYPE html> | |
<title>.</title> | |
<script> | |
// must instantiate with "new" | |
var Point = function (x, y) { | |
this.x = x; | |
this.y = y; | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<input type="file"> | |
</body> | |
<script> |
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
#N canvas 100 128 450 324 12; | |
#X obj 230 291 dac~; | |
#X obj 230 267 osc~; | |
#X obj 41 13 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 | |
; | |
#X obj 39 65 i; | |
#X obj 76 66 + 1; | |
#X obj 324 158 expr $f1 * 3 / 2; | |
#X obj 151 239 f; | |
#X obj 203 219 f; |
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
#N canvas 100 128 450 324 12; | |
#X obj 230 291 dac~; | |
#X obj 230 267 osc~; | |
#X obj 41 13 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 | |
; | |
#X obj 39 65 i; | |
#X obj 76 66 + 1; | |
#X obj 324 158 expr $f1 * 3 / 2; | |
#X obj 151 239 f; | |
#X obj 203 219 f; |
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
<!DOCTYPE html> | |
<head> | |
<title>three js</title> | |
<style> | |
/*css goes here*/ | |
html, body { | |
margin: 0; | |
overflow: hidden; /*nice to not use this*/ | |
} | |
</style> |
NewerOlder