-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converts project to being bundled by webpack
some of the current files in node_modules will be moved to static_node_modules so they can continue to be used
- Loading branch information
Kurt Hutten
committed
Jan 22, 2021
1 parent
8f9f787
commit ef2a708
Showing
188 changed files
with
8,921 additions
and
196,025 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
] | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"rules": {}, | ||
"env": { | ||
"es6": true, | ||
"browser": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
} | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import openType from "opentype.js"; | ||
|
||
export const fonts = {}; | ||
|
||
// Preload the Various Fonts that are available via Text3D | ||
var preloadedFonts = [ | ||
"fonts/Roboto.ttf", | ||
"fonts/Papyrus.ttf", | ||
"fonts/Consolas.ttf" | ||
]; | ||
|
||
Promise.all(preloadedFonts.map(async fontURL => fetch("/" + fontURL))).then( | ||
async responses => { | ||
const arrayBuffers = await Promise.all( | ||
responses.map(response => response.arrayBuffer()) | ||
); | ||
arrayBuffers.forEach((buffer, index) => { | ||
let fontName = preloadedFonts[index].split("fonts/")[1].split(".ttf")[0]; | ||
fonts[fontName] = openType.parse(buffer); | ||
}); | ||
} | ||
); |
Oops, something went wrong.