-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f6a932
commit 1194038
Showing
22 changed files
with
568 additions
and
159 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 |
---|---|---|
@@ -1 +1 @@ | ||
v20.11.0 | ||
v20.11.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,44 +1,3 @@ | ||
import fs from "fs"; | ||
|
||
import { handleLibraryBuild } from "../../utils/build-library"; | ||
|
||
const dracoDecoderWasm = fs.readFileSync( | ||
"../../node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.wasm", | ||
); | ||
if (!dracoDecoderWasm) { | ||
throw new Error("Failed to read draco_decoder.wasm"); | ||
} | ||
const dracoWasmWrapperJs = fs.readFileSync( | ||
"../../node_modules/three/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.js", | ||
); | ||
if (!dracoWasmWrapperJs) { | ||
throw new Error("Failed to read draco_wasm_wrapper.js"); | ||
} | ||
|
||
handleLibraryBuild([ | ||
{ | ||
name: "embed-draco-decoder", | ||
setup({ onResolve, onLoad }) { | ||
onResolve( | ||
{ filter: /(esbuild-embed-draco-decoder-wasm|esbuild-embed-draco-wasm-wrapper-js)/ }, | ||
(args) => { | ||
return { path: args.path, namespace: "embed-draco-decoder" }; | ||
}, | ||
); | ||
onLoad({ filter: /.*/, namespace: "embed-draco-decoder" }, (args) => { | ||
if (args.path === "esbuild-embed-draco-decoder-wasm") { | ||
return { | ||
contents: dracoDecoderWasm, | ||
loader: "base64", | ||
}; | ||
} else if (args.path === "esbuild-embed-draco-wasm-wrapper-js") { | ||
return { | ||
contents: dracoWasmWrapperJs, | ||
loader: "text", | ||
}; | ||
} | ||
throw new Error("Unknown path for embed-draco-decoder plugin: " + args.path); | ||
}); | ||
}, | ||
}, | ||
]); | ||
handleLibraryBuild(); |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.