ugly-game 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const basisGlueUrl = new URL('./basis/basis_transcoder.js', import.meta.url)
|
|
2
2
|
.href;
|
|
3
|
-
|
|
3
|
+
// `.bin`, NOT `.wasm`. Cloudflare Workers asset serving 404s a .wasm file — measured on
|
|
4
|
+
// world3.ugly.bot, where .bin, .fbx and .ugm all returned 200 from the same upload and the wasm
|
|
5
|
+
// alone did not, leaving the transcoder unloadable and every cube on the flat-hue fallback.
|
|
6
|
+
// The extension is free to change because this is fetched into an ArrayBuffer and handed to
|
|
7
|
+
// emscripten as `wasmBinary` — nothing here uses instantiateStreaming, which is the only thing that
|
|
8
|
+
// would care about the MIME type.
|
|
9
|
+
const basisWasmUrl = new URL('./basis/basis_transcoder.bin', import.meta.url)
|
|
4
10
|
.href;
|
|
5
11
|
let modPromise = null;
|
|
6
12
|
/** Load + initialize the Basis transcoder once (browser). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugly-game",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"preinstall": "npx only-allow pnpm",
|
|
20
|
-
"build": "tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.
|
|
20
|
+
"build": "tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.bin dist/assets/basis/",
|
|
21
21
|
"lint": "ugly-app lint",
|
|
22
22
|
"lint:fix": "ugly-app lint --fix",
|
|
23
23
|
"pretty": "prettier --write .",
|
|
24
|
-
"prepublishOnly": "pnpm run pretty && ugly-app lint && tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.
|
|
24
|
+
"prepublishOnly": "pnpm run pretty && ugly-app lint && tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.bin dist/assets/basis/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"meshoptimizer": "^1.2.0"
|