Skip to content

Commit

Permalink
Add gltf-transform dequantize pre-process
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdorra committed Jan 27, 2022
1 parent 56f1e10 commit bc7c543
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"types": "./dist/index.d.ts",
"main": "./dist/index.js",
"dependencies": {
"@gltf-transform/core": "^1.1.1",
"@gltf-transform/extensions": "^1.1.1",
"@gltf-transform/functions": "^1.1.1",
"@gltf-transform/core": "^1.2.1",
"@gltf-transform/extensions": "^1.2.1",
"@gltf-transform/functions": "^1.2.1",
"@types/three": "^0.131.0",
"three": "^0.132.2"
},
Expand Down
3 changes: 2 additions & 1 deletion src/lib/scene_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { WebIO, VertexLayout, Document } from '@gltf-transform/core';
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
import { weld } from '@gltf-transform/functions';
import { weld, dequantize } from '@gltf-transform/functions';


export async function loadSceneFromBlobs(files: [string, File][], autoscale: boolean) {
Expand Down Expand Up @@ -55,6 +55,7 @@ export async function loadSceneFromBlobs(files: [string, File][], autoscale: boo
}

await doc.transform(
dequantize(),
weld()
);

Expand Down

0 comments on commit bc7c543

Please sign in to comment.