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
| <!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 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
| 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 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
| <!-- 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 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
| 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 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 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) |
OlderNewer