-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
10 changed files
with
31,457 additions
and
0 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,21 @@ | ||
import './emHdBindings.js'; | ||
|
||
export const usd = await globalThis["NEEDLE:USD:GET"]({ | ||
mainScriptUrlOrBlob: "/emHdBindings.js", | ||
debug: true | ||
}); | ||
console.log('loaded usd'); | ||
|
||
//export const stage = usd.UsdStage.CreateNew("test.usda"); | ||
|
||
// https://github.com/needle-tools/usd-viewer/blob/d69afccda742d46adc96f8696a92900aaf87b001/usd-wasm/README.md?plain=1#L42 | ||
const blob = await fetch("lab_inspiration01_mini.usdz"); | ||
console.log('fetched'); | ||
const arrayBuffer = await blob.arrayBuffer(); | ||
console.log('created buffer'); | ||
|
||
usd.FS_createDataFile("", "lab_inspiration01_mini.usdz", new Uint8Array(arrayBuffer), true, true, true); | ||
console.log('created data file'); | ||
export const stage = usd.UsdStage.Open("lab_inspiration01_mini.usdz"); | ||
|
||
console.log("loaded stage") |
Oops, something went wrong.