-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add meshopt support to glTF utility classes
- Loading branch information
Showing
7 changed files
with
40 additions
and
1 deletion.
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
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,24 @@ | ||
import fs from "fs"; | ||
|
||
import { GltfTransform } from "../../src/contentProcessing/GltfTransform"; | ||
|
||
describe("GltfTransform::getIO", function () { | ||
it("can read a GLB without compression", async function () { | ||
const glb = fs.readFileSync("./specs/data/gltf/Box.glb"); | ||
const io = await GltfTransform.getIO(); | ||
const document = await io.readBinary(glb); | ||
expect(document).toBeDefined(); | ||
}); | ||
it("can read a GLB with Draco compression", async function () { | ||
const glb = fs.readFileSync("./specs/data/gltf/BoxDraco.glb"); | ||
const io = await GltfTransform.getIO(); | ||
const document = await io.readBinary(glb); | ||
expect(document).toBeDefined(); | ||
}); | ||
it("can read a GLB with meshopt compression", async function () { | ||
const glb = fs.readFileSync("./specs/data/gltf/BoxMeshopt.glb"); | ||
const io = await GltfTransform.getIO(); | ||
const document = await io.readBinary(glb); | ||
expect(document).toBeDefined(); | ||
}); | ||
}); |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,7 @@ | ||
The "Box" glTF sample model, for testing the functionality | ||
of reading GLB data with compression extensions. | ||
|
||
- Box.glb is the model from https://github.com/KhronosGroup/glTF-Sample-Models/blob/4ca06672ce15d6a27bfb5cf14459bc52fd9044d1/2.0/Box/ | ||
- BoxDraco.glb is the same model with Draco compression | ||
- BoxMeshopt is the same model with meshopt compression | ||
|
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