forked from donmccurdy/glTF-Transform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move unlit(), meshopt(), and draco() to /functions package (donmccurd…
…y#544) * [functions] Move unlit() to /functions * [functions] Move meshopt() to /functions * [functions] Move draco() to /functions
- Loading branch information
1 parent
7ac7aa6
commit 1b32fe0
Showing
9 changed files
with
57 additions
and
35 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
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,7 +1,4 @@ | ||
export * from './draco'; | ||
export * from './ktxfix'; | ||
export * from './merge'; | ||
export * from './meshopt'; | ||
export * from './toktx'; | ||
export * from './unlit'; | ||
export * from './xmp'; |
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
2 changes: 1 addition & 1 deletion
2
packages/cli/src/transforms/unlit.ts → packages/functions/src/unlit.ts
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,12 @@ | ||
import test from 'tape'; | ||
import { Document } from '@gltf-transform/core'; | ||
import { draco } from '../'; | ||
|
||
test('@gltf-transform/functions::draco', async (t) => { | ||
const document = new Document(); | ||
await document.transform(draco({ method: 'edgebreaker' })); | ||
await document.transform(draco({ method: 'sequential' })); | ||
const dracoExtension = document.getRoot().listExtensionsUsed()[0]; | ||
t.equals(dracoExtension.extensionName, 'KHR_draco_mesh_compression', 'adds extension'); | ||
t.end(); | ||
}); |
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,12 @@ | ||
import test from 'tape'; | ||
import { Document } from '@gltf-transform/core'; | ||
import { unlit } from '../'; | ||
|
||
test('@gltf-transform/functions::unlit', async (t) => { | ||
const document = new Document(); | ||
document.createMaterial(); | ||
await document.transform(unlit()); | ||
const unlitExtension = document.getRoot().listExtensionsUsed()[0]; | ||
t.equals(unlitExtension.extensionName, 'KHR_materials_unlit', 'adds extension'); | ||
t.end(); | ||
}); |