@loaders.gl/gltf 3.1.3 → 4.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -0
- package/dist/dist.min.js +13 -13
- package/dist/glb-loader.js +28 -33
- package/dist/glb-loader.js.map +1 -0
- package/dist/glb-writer.js +26 -34
- package/dist/glb-writer.js.map +1 -0
- package/dist/gltf-loader.js +43 -46
- package/dist/gltf-loader.js.map +1 -0
- package/dist/gltf-writer.js +26 -29
- package/dist/gltf-writer.js.map +1 -0
- package/dist/index.js +7 -21
- package/dist/index.js.map +1 -0
- package/dist/lib/api/gltf-extensions.js +31 -71
- package/dist/lib/api/gltf-extensions.js.map +1 -0
- package/dist/lib/api/gltf-scenegraph.js +512 -550
- package/dist/lib/api/gltf-scenegraph.js.map +1 -0
- package/dist/lib/api/normalize-gltf-v1.js +229 -274
- package/dist/lib/api/normalize-gltf-v1.js.map +1 -0
- package/dist/lib/api/post-process-gltf.js +376 -324
- package/dist/lib/api/post-process-gltf.js.map +1 -0
- package/dist/lib/encoders/encode-glb.js +58 -56
- package/dist/lib/encoders/encode-glb.js.map +1 -0
- package/dist/lib/encoders/encode-gltf.js +12 -25
- package/dist/lib/encoders/encode-gltf.js.map +1 -0
- package/dist/lib/extensions/EXT_meshopt_compression.js +49 -47
- package/dist/lib/extensions/EXT_meshopt_compression.js.map +1 -0
- package/dist/lib/extensions/EXT_texture_webp.js +28 -34
- package/dist/lib/extensions/EXT_texture_webp.js.map +1 -0
- package/dist/lib/extensions/KHR_binary_gltf.js +23 -39
- package/dist/lib/extensions/KHR_binary_gltf.js.map +1 -0
- package/dist/lib/extensions/KHR_draco_mesh_compression.js +111 -126
- package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/dist/lib/extensions/KHR_texture_basisu.js +19 -28
- package/dist/lib/extensions/KHR_texture_basisu.js.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +44 -57
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +32 -42
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +62 -75
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
- package/dist/lib/gltf-utils/get-typed-array.js +14 -39
- package/dist/lib/gltf-utils/get-typed-array.js.map +1 -0
- package/dist/lib/gltf-utils/gltf-attribute-utils.js +65 -65
- package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
- package/dist/lib/gltf-utils/gltf-constants.js +30 -36
- package/dist/lib/gltf-utils/gltf-constants.js.map +1 -0
- package/dist/lib/gltf-utils/gltf-utils.js +45 -52
- package/dist/lib/gltf-utils/gltf-utils.js.map +1 -0
- package/dist/lib/gltf-utils/resolve-url.js +15 -17
- package/dist/lib/gltf-utils/resolve-url.js.map +1 -0
- package/dist/lib/parsers/parse-glb.js +107 -120
- package/dist/lib/parsers/parse-glb.js.map +1 -0
- package/dist/lib/parsers/parse-gltf.js +154 -173
- package/dist/lib/parsers/parse-gltf.js.map +1 -0
- package/dist/lib/types/glb-types.js +2 -2
- package/dist/{es5/lib → lib}/types/glb-types.js.map +0 -0
- package/dist/lib/types/gltf-json-schema.js +2 -4
- package/dist/{es5/lib → lib}/types/gltf-json-schema.js.map +0 -0
- package/dist/lib/types/gltf-postprocessed-schema.js +2 -4
- package/dist/{es5/lib → lib}/types/gltf-postprocessed-schema.js.map +0 -0
- package/dist/lib/types/gltf-types.js +2 -3
- package/dist/{es5/lib → lib}/types/gltf-types.js.map +0 -0
- package/dist/lib/utils/assert.js +5 -11
- package/dist/lib/utils/assert.js.map +1 -0
- package/dist/lib/utils/version.js +2 -7
- package/dist/lib/utils/version.js.map +1 -0
- package/dist/meshopt/meshopt-decoder.js +82 -97
- package/dist/meshopt/meshopt-decoder.js.map +1 -0
- package/dist/{es5/meshopt → meshopt}/meshopt-encoder.ts.disabled +0 -0
- package/dist/webp/webp.js +23 -32
- package/dist/webp/webp.js.map +1 -0
- package/package.json +8 -11
- package/src/lib/parsers/parse-gltf.ts +1 -1
- package/dist/es5/bundle.js +0 -7
- package/dist/es5/bundle.js.map +0 -1
- package/dist/es5/glb-loader.js +0 -70
- package/dist/es5/glb-loader.js.map +0 -1
- package/dist/es5/glb-writer.js +0 -41
- package/dist/es5/glb-writer.js.map +0 -1
- package/dist/es5/gltf-loader.js +0 -97
- package/dist/es5/gltf-loader.js.map +0 -1
- package/dist/es5/gltf-writer.js +0 -40
- package/dist/es5/gltf-writer.js.map +0 -1
- package/dist/es5/index.js +0 -56
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/lib/api/gltf-extensions.js +0 -146
- package/dist/es5/lib/api/gltf-extensions.js.map +0 -1
- package/dist/es5/lib/api/gltf-scenegraph.js +0 -623
- package/dist/es5/lib/api/gltf-scenegraph.js.map +0 -1
- package/dist/es5/lib/api/normalize-gltf-v1.js +0 -392
- package/dist/es5/lib/api/normalize-gltf-v1.js.map +0 -1
- package/dist/es5/lib/api/post-process-gltf.js +0 -502
- package/dist/es5/lib/api/post-process-gltf.js.map +0 -1
- package/dist/es5/lib/encoders/encode-glb.js +0 -75
- package/dist/es5/lib/encoders/encode-glb.js.map +0 -1
- package/dist/es5/lib/encoders/encode-gltf.js +0 -26
- package/dist/es5/lib/encoders/encode-gltf.js.map +0 -1
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js +0 -137
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +0 -1
- package/dist/es5/lib/extensions/EXT_texture_webp.js +0 -60
- package/dist/es5/lib/extensions/EXT_texture_webp.js.map +0 -1
- package/dist/es5/lib/extensions/KHR_binary_gltf.js +0 -53
- package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +0 -1
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +0 -331
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
- package/dist/es5/lib/extensions/KHR_texture_basisu.js +0 -49
- package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +0 -1
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +0 -129
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +0 -97
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +0 -139
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
- package/dist/es5/lib/gltf-utils/get-typed-array.js +0 -26
- package/dist/es5/lib/gltf-utils/get-typed-array.js.map +0 -1
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js +0 -85
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
- package/dist/es5/lib/gltf-utils/gltf-constants.js +0 -48
- package/dist/es5/lib/gltf-utils/gltf-constants.js.map +0 -1
- package/dist/es5/lib/gltf-utils/gltf-utils.js +0 -69
- package/dist/es5/lib/gltf-utils/gltf-utils.js.map +0 -1
- package/dist/es5/lib/gltf-utils/resolve-url.js +0 -23
- package/dist/es5/lib/gltf-utils/resolve-url.js.map +0 -1
- package/dist/es5/lib/parsers/parse-glb.js +0 -142
- package/dist/es5/lib/parsers/parse-glb.js.map +0 -1
- package/dist/es5/lib/parsers/parse-gltf.js +0 -353
- package/dist/es5/lib/parsers/parse-gltf.js.map +0 -1
- package/dist/es5/lib/types/glb-types.js +0 -2
- package/dist/es5/lib/types/gltf-json-schema.js +0 -2
- package/dist/es5/lib/types/gltf-postprocessed-schema.js +0 -2
- package/dist/es5/lib/types/gltf-types.js +0 -2
- package/dist/es5/lib/utils/assert.js +0 -13
- package/dist/es5/lib/utils/assert.js.map +0 -1
- package/dist/es5/lib/utils/version.js +0 -9
- package/dist/es5/lib/utils/version.js.map +0 -1
- package/dist/es5/meshopt/meshopt-decoder.js +0 -270
- package/dist/es5/meshopt/meshopt-decoder.js.map +0 -1
- package/dist/es5/webp/webp.js +0 -104
- package/dist/es5/webp/webp.js.map +0 -1
- package/dist/esm/bundle.js +0 -5
- package/dist/esm/bundle.js.map +0 -1
- package/dist/esm/glb-loader.js +0 -34
- package/dist/esm/glb-loader.js.map +0 -1
- package/dist/esm/glb-writer.js +0 -29
- package/dist/esm/glb-writer.js.map +0 -1
- package/dist/esm/gltf-loader.js +0 -47
- package/dist/esm/gltf-loader.js.map +0 -1
- package/dist/esm/gltf-writer.js +0 -29
- package/dist/esm/gltf-writer.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/api/gltf-extensions.js +0 -35
- package/dist/esm/lib/api/gltf-extensions.js.map +0 -1
- package/dist/esm/lib/api/gltf-scenegraph.js +0 -515
- package/dist/esm/lib/api/gltf-scenegraph.js.map +0 -1
- package/dist/esm/lib/api/normalize-gltf-v1.js +0 -250
- package/dist/esm/lib/api/normalize-gltf-v1.js.map +0 -1
- package/dist/esm/lib/api/post-process-gltf.js +0 -422
- package/dist/esm/lib/api/post-process-gltf.js.map +0 -1
- package/dist/esm/lib/encoders/encode-glb.js +0 -63
- package/dist/esm/lib/encoders/encode-glb.js.map +0 -1
- package/dist/esm/lib/encoders/encode-gltf.js +0 -14
- package/dist/esm/lib/encoders/encode-gltf.js.map +0 -1
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js +0 -56
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +0 -1
- package/dist/esm/lib/extensions/EXT_texture_webp.js +0 -32
- package/dist/esm/lib/extensions/EXT_texture_webp.js.map +0 -1
- package/dist/esm/lib/extensions/KHR_binary_gltf.js +0 -26
- package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +0 -1
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +0 -126
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
- package/dist/esm/lib/extensions/KHR_texture_basisu.js +0 -22
- package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +0 -1
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js +0 -49
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js +0 -37
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js +0 -68
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
- package/dist/esm/lib/gltf-utils/get-typed-array.js +0 -16
- package/dist/esm/lib/gltf-utils/get-typed-array.js.map +0 -1
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js +0 -73
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
- package/dist/esm/lib/gltf-utils/gltf-constants.js +0 -37
- package/dist/esm/lib/gltf-utils/gltf-constants.js.map +0 -1
- package/dist/esm/lib/gltf-utils/gltf-utils.js +0 -56
- package/dist/esm/lib/gltf-utils/gltf-utils.js.map +0 -1
- package/dist/esm/lib/gltf-utils/resolve-url.js +0 -16
- package/dist/esm/lib/gltf-utils/resolve-url.js.map +0 -1
- package/dist/esm/lib/parsers/parse-glb.js +0 -128
- package/dist/esm/lib/parsers/parse-glb.js.map +0 -1
- package/dist/esm/lib/parsers/parse-gltf.js +0 -170
- package/dist/esm/lib/parsers/parse-gltf.js.map +0 -1
- package/dist/esm/lib/types/glb-types.js +0 -2
- package/dist/esm/lib/types/glb-types.js.map +0 -1
- package/dist/esm/lib/types/gltf-json-schema.js +0 -2
- package/dist/esm/lib/types/gltf-json-schema.js.map +0 -1
- package/dist/esm/lib/types/gltf-postprocessed-schema.js +0 -2
- package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +0 -1
- package/dist/esm/lib/types/gltf-types.js +0 -2
- package/dist/esm/lib/types/gltf-types.js.map +0 -1
- package/dist/esm/lib/utils/assert.js +0 -6
- package/dist/esm/lib/utils/assert.js.map +0 -1
- package/dist/esm/lib/utils/version.js +0 -2
- package/dist/esm/lib/utils/version.js.map +0 -1
- package/dist/esm/meshopt/meshopt-decoder.js +0 -103
- package/dist/esm/meshopt/meshopt-decoder.js.map +0 -1
- package/dist/esm/meshopt/meshopt-encoder.ts.disabled +0 -409
- package/dist/esm/webp/webp.js +0 -29
- package/dist/esm/webp/webp.js.map +0 -1
|
@@ -1,370 +1,422 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const assert_1 = require("../utils/assert");
|
|
5
|
-
const gltf_utils_1 = require("../gltf-utils/gltf-utils");
|
|
6
|
-
// This is a post processor for loaded glTF files
|
|
7
|
-
// The goal is to make the loaded data easier to use in WebGL applications
|
|
8
|
-
//
|
|
9
|
-
// Functions:
|
|
10
|
-
// * Resolve indexed arrays structure of glTF into a linked tree.
|
|
11
|
-
// * Translate stringified enum keys and values into WebGL constants.
|
|
12
|
-
// * Load images (optional)
|
|
13
|
-
// ENUM LOOKUP
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import { assert } from '../utils/assert';
|
|
3
|
+
import { getAccessorArrayTypeAndLength } from '../gltf-utils/gltf-utils';
|
|
14
4
|
const COMPONENTS = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
SCALAR: 1,
|
|
6
|
+
VEC2: 2,
|
|
7
|
+
VEC3: 3,
|
|
8
|
+
VEC4: 4,
|
|
9
|
+
MAT2: 4,
|
|
10
|
+
MAT3: 9,
|
|
11
|
+
MAT4: 16
|
|
22
12
|
};
|
|
23
13
|
const BYTES = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
5120: 1,
|
|
15
|
+
5121: 1,
|
|
16
|
+
5122: 2,
|
|
17
|
+
5123: 2,
|
|
18
|
+
5125: 4,
|
|
19
|
+
5126: 4
|
|
30
20
|
};
|
|
31
21
|
const GL_SAMPLER = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
LINEAR: 0x2601,
|
|
40
|
-
NEAREST_MIPMAP_LINEAR: 0x2702
|
|
22
|
+
TEXTURE_MAG_FILTER: 0x2800,
|
|
23
|
+
TEXTURE_MIN_FILTER: 0x2801,
|
|
24
|
+
TEXTURE_WRAP_S: 0x2802,
|
|
25
|
+
TEXTURE_WRAP_T: 0x2803,
|
|
26
|
+
REPEAT: 0x2901,
|
|
27
|
+
LINEAR: 0x2601,
|
|
28
|
+
NEAREST_MIPMAP_LINEAR: 0x2702
|
|
41
29
|
};
|
|
42
30
|
const SAMPLER_PARAMETER_GLTF_TO_GL = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
magFilter: GL_SAMPLER.TEXTURE_MAG_FILTER,
|
|
32
|
+
minFilter: GL_SAMPLER.TEXTURE_MIN_FILTER,
|
|
33
|
+
wrapS: GL_SAMPLER.TEXTURE_WRAP_S,
|
|
34
|
+
wrapT: GL_SAMPLER.TEXTURE_WRAP_T
|
|
47
35
|
};
|
|
48
|
-
// When undefined, a sampler with repeat wrapping and auto filtering should be used.
|
|
49
|
-
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#texture
|
|
50
36
|
const DEFAULT_SAMPLER = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
[GL_SAMPLER.TEXTURE_MAG_FILTER]: GL_SAMPLER.LINEAR,
|
|
38
|
+
[GL_SAMPLER.TEXTURE_MIN_FILTER]: GL_SAMPLER.NEAREST_MIPMAP_LINEAR,
|
|
39
|
+
[GL_SAMPLER.TEXTURE_WRAP_S]: GL_SAMPLER.REPEAT,
|
|
40
|
+
[GL_SAMPLER.TEXTURE_WRAP_T]: GL_SAMPLER.REPEAT
|
|
55
41
|
};
|
|
42
|
+
|
|
56
43
|
function getBytesFromComponentType(componentType) {
|
|
57
|
-
|
|
44
|
+
return BYTES[componentType];
|
|
58
45
|
}
|
|
46
|
+
|
|
59
47
|
function getSizeFromAccessorType(type) {
|
|
60
|
-
|
|
48
|
+
return COMPONENTS[type];
|
|
61
49
|
}
|
|
50
|
+
|
|
62
51
|
class GLTFPostProcessor {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
constructor() {
|
|
53
|
+
_defineProperty(this, "baseUri", '');
|
|
54
|
+
|
|
55
|
+
_defineProperty(this, "json", {});
|
|
56
|
+
|
|
57
|
+
_defineProperty(this, "buffers", []);
|
|
58
|
+
|
|
59
|
+
_defineProperty(this, "images", []);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
postProcess(gltf, options = {}) {
|
|
63
|
+
const {
|
|
64
|
+
json,
|
|
65
|
+
buffers = [],
|
|
66
|
+
images = [],
|
|
67
|
+
baseUri = ''
|
|
68
|
+
} = gltf;
|
|
69
|
+
assert(json);
|
|
70
|
+
this.baseUri = baseUri;
|
|
71
|
+
this.json = json;
|
|
72
|
+
this.buffers = buffers;
|
|
73
|
+
this.images = images;
|
|
74
|
+
|
|
75
|
+
this._resolveTree(this.json, options);
|
|
76
|
+
|
|
77
|
+
return this.json;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
_resolveTree(json, options = {}) {
|
|
81
|
+
if (json.bufferViews) {
|
|
82
|
+
json.bufferViews = json.bufferViews.map((bufView, i) => this._resolveBufferView(bufView, i));
|
|
68
83
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.baseUri = baseUri;
|
|
73
|
-
this.json = json;
|
|
74
|
-
this.buffers = buffers;
|
|
75
|
-
this.images = images;
|
|
76
|
-
this._resolveTree(this.json, options);
|
|
77
|
-
return this.json;
|
|
84
|
+
|
|
85
|
+
if (json.images) {
|
|
86
|
+
json.images = json.images.map((image, i) => this._resolveImage(image, i));
|
|
78
87
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_resolveTree(json, options = {}) {
|
|
83
|
-
if (json.bufferViews) {
|
|
84
|
-
json.bufferViews = json.bufferViews.map((bufView, i) => this._resolveBufferView(bufView, i));
|
|
85
|
-
}
|
|
86
|
-
if (json.images) {
|
|
87
|
-
json.images = json.images.map((image, i) => this._resolveImage(image, i));
|
|
88
|
-
}
|
|
89
|
-
if (json.samplers) {
|
|
90
|
-
json.samplers = json.samplers.map((sampler, i) => this._resolveSampler(sampler, i));
|
|
91
|
-
}
|
|
92
|
-
if (json.textures) {
|
|
93
|
-
json.textures = json.textures.map((texture, i) => this._resolveTexture(texture, i));
|
|
94
|
-
}
|
|
95
|
-
if (json.accessors) {
|
|
96
|
-
json.accessors = json.accessors.map((accessor, i) => this._resolveAccessor(accessor, i));
|
|
97
|
-
}
|
|
98
|
-
if (json.materials) {
|
|
99
|
-
json.materials = json.materials.map((material, i) => this._resolveMaterial(material, i));
|
|
100
|
-
}
|
|
101
|
-
if (json.meshes) {
|
|
102
|
-
json.meshes = json.meshes.map((mesh, i) => this._resolveMesh(mesh, i));
|
|
103
|
-
}
|
|
104
|
-
if (json.nodes) {
|
|
105
|
-
json.nodes = json.nodes.map((node, i) => this._resolveNode(node, i));
|
|
106
|
-
}
|
|
107
|
-
if (json.skins) {
|
|
108
|
-
json.skins = json.skins.map((skin, i) => this._resolveSkin(skin, i));
|
|
109
|
-
}
|
|
110
|
-
if (json.scenes) {
|
|
111
|
-
json.scenes = json.scenes.map((scene, i) => this._resolveScene(scene, i));
|
|
112
|
-
}
|
|
113
|
-
if (json.scene !== undefined) {
|
|
114
|
-
json.scene = json.scenes[this.json.scene];
|
|
115
|
-
}
|
|
88
|
+
|
|
89
|
+
if (json.samplers) {
|
|
90
|
+
json.samplers = json.samplers.map((sampler, i) => this._resolveSampler(sampler, i));
|
|
116
91
|
}
|
|
117
|
-
|
|
118
|
-
|
|
92
|
+
|
|
93
|
+
if (json.textures) {
|
|
94
|
+
json.textures = json.textures.map((texture, i) => this._resolveTexture(texture, i));
|
|
119
95
|
}
|
|
120
|
-
|
|
121
|
-
|
|
96
|
+
|
|
97
|
+
if (json.accessors) {
|
|
98
|
+
json.accessors = json.accessors.map((accessor, i) => this._resolveAccessor(accessor, i));
|
|
122
99
|
}
|
|
123
|
-
|
|
124
|
-
|
|
100
|
+
|
|
101
|
+
if (json.materials) {
|
|
102
|
+
json.materials = json.materials.map((material, i) => this._resolveMaterial(material, i));
|
|
125
103
|
}
|
|
126
|
-
|
|
127
|
-
|
|
104
|
+
|
|
105
|
+
if (json.meshes) {
|
|
106
|
+
json.meshes = json.meshes.map((mesh, i) => this._resolveMesh(mesh, i));
|
|
128
107
|
}
|
|
129
|
-
|
|
130
|
-
|
|
108
|
+
|
|
109
|
+
if (json.nodes) {
|
|
110
|
+
json.nodes = json.nodes.map((node, i) => this._resolveNode(node, i));
|
|
131
111
|
}
|
|
132
|
-
|
|
133
|
-
|
|
112
|
+
|
|
113
|
+
if (json.skins) {
|
|
114
|
+
json.skins = json.skins.map((skin, i) => this._resolveSkin(skin, i));
|
|
134
115
|
}
|
|
135
|
-
|
|
136
|
-
|
|
116
|
+
|
|
117
|
+
if (json.scenes) {
|
|
118
|
+
json.scenes = json.scenes.map((scene, i) => this._resolveScene(scene, i));
|
|
137
119
|
}
|
|
138
|
-
|
|
139
|
-
|
|
120
|
+
|
|
121
|
+
if (json.scene !== undefined) {
|
|
122
|
+
json.scene = json.scenes[this.json.scene];
|
|
140
123
|
}
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
getScene(index) {
|
|
127
|
+
return this._get('scenes', index);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
getNode(index) {
|
|
131
|
+
return this._get('nodes', index);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
getSkin(index) {
|
|
135
|
+
return this._get('skins', index);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
getMesh(index) {
|
|
139
|
+
return this._get('meshes', index);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
getMaterial(index) {
|
|
143
|
+
return this._get('materials', index);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
getAccessor(index) {
|
|
147
|
+
return this._get('accessors', index);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
getCamera(index) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
getTexture(index) {
|
|
155
|
+
return this._get('textures', index);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
getSampler(index) {
|
|
159
|
+
return this._get('samplers', index);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
getImage(index) {
|
|
163
|
+
return this._get('images', index);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
getBufferView(index) {
|
|
167
|
+
return this._get('bufferViews', index);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
getBuffer(index) {
|
|
171
|
+
return this._get('buffers', index);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
_get(array, index) {
|
|
175
|
+
if (typeof index === 'object') {
|
|
176
|
+
return index;
|
|
143
177
|
}
|
|
144
|
-
|
|
145
|
-
|
|
178
|
+
|
|
179
|
+
const object = this.json[array] && this.json[array][index];
|
|
180
|
+
|
|
181
|
+
if (!object) {
|
|
182
|
+
console.warn("glTF file error: Could not find ".concat(array, "[").concat(index, "]"));
|
|
146
183
|
}
|
|
147
|
-
|
|
148
|
-
|
|
184
|
+
|
|
185
|
+
return object;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
_resolveScene(scene, index) {
|
|
189
|
+
scene.id = scene.id || "scene-".concat(index);
|
|
190
|
+
scene.nodes = (scene.nodes || []).map(node => this.getNode(node));
|
|
191
|
+
return scene;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
_resolveNode(node, index) {
|
|
195
|
+
node.id = node.id || "node-".concat(index);
|
|
196
|
+
|
|
197
|
+
if (node.children) {
|
|
198
|
+
node.children = node.children.map(child => this.getNode(child));
|
|
149
199
|
}
|
|
150
|
-
|
|
151
|
-
|
|
200
|
+
|
|
201
|
+
if (node.mesh !== undefined) {
|
|
202
|
+
node.mesh = this.getMesh(node.mesh);
|
|
203
|
+
} else if (node.meshes !== undefined && node.meshes.length) {
|
|
204
|
+
node.mesh = node.meshes.reduce((accum, meshIndex) => {
|
|
205
|
+
const mesh = this.getMesh(meshIndex);
|
|
206
|
+
accum.id = mesh.id;
|
|
207
|
+
accum.primitives = accum.primitives.concat(mesh.primitives);
|
|
208
|
+
return accum;
|
|
209
|
+
}, {
|
|
210
|
+
primitives: []
|
|
211
|
+
});
|
|
152
212
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return index;
|
|
157
|
-
}
|
|
158
|
-
const object = this.json[array] && this.json[array][index];
|
|
159
|
-
if (!object) {
|
|
160
|
-
console.warn(`glTF file error: Could not find ${array}[${index}]`); // eslint-disable-line
|
|
161
|
-
}
|
|
162
|
-
return object;
|
|
213
|
+
|
|
214
|
+
if (node.camera !== undefined) {
|
|
215
|
+
node.camera = this.getCamera(node.camera);
|
|
163
216
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
scene.id = scene.id || `scene-${index}`;
|
|
168
|
-
scene.nodes = (scene.nodes || []).map((node) => this.getNode(node));
|
|
169
|
-
return scene;
|
|
217
|
+
|
|
218
|
+
if (node.skin !== undefined) {
|
|
219
|
+
node.skin = this.getSkin(node.skin);
|
|
170
220
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
221
|
+
|
|
222
|
+
return node;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
_resolveSkin(skin, index) {
|
|
226
|
+
skin.id = skin.id || "skin-".concat(index);
|
|
227
|
+
skin.inverseBindMatrices = this.getAccessor(skin.inverseBindMatrices);
|
|
228
|
+
return skin;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
_resolveMesh(mesh, index) {
|
|
232
|
+
mesh.id = mesh.id || "mesh-".concat(index);
|
|
233
|
+
|
|
234
|
+
if (mesh.primitives) {
|
|
235
|
+
mesh.primitives = mesh.primitives.map(primitive => {
|
|
236
|
+
primitive = { ...primitive
|
|
237
|
+
};
|
|
238
|
+
const attributes = primitive.attributes;
|
|
239
|
+
primitive.attributes = {};
|
|
240
|
+
|
|
241
|
+
for (const attribute in attributes) {
|
|
242
|
+
primitive.attributes[attribute] = this.getAccessor(attributes[attribute]);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (primitive.indices !== undefined) {
|
|
246
|
+
primitive.indices = this.getAccessor(primitive.indices);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (primitive.material !== undefined) {
|
|
250
|
+
primitive.material = this.getMaterial(primitive.material);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return primitive;
|
|
254
|
+
});
|
|
195
255
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
256
|
+
|
|
257
|
+
return mesh;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
_resolveMaterial(material, index) {
|
|
261
|
+
material.id = material.id || "material-".concat(index);
|
|
262
|
+
|
|
263
|
+
if (material.normalTexture) {
|
|
264
|
+
material.normalTexture = { ...material.normalTexture
|
|
265
|
+
};
|
|
266
|
+
material.normalTexture.texture = this.getTexture(material.normalTexture.index);
|
|
201
267
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
primitive = { ...primitive };
|
|
208
|
-
const attributes = primitive.attributes;
|
|
209
|
-
primitive.attributes = {};
|
|
210
|
-
for (const attribute in attributes) {
|
|
211
|
-
primitive.attributes[attribute] = this.getAccessor(attributes[attribute]);
|
|
212
|
-
}
|
|
213
|
-
if (primitive.indices !== undefined) {
|
|
214
|
-
primitive.indices = this.getAccessor(primitive.indices);
|
|
215
|
-
}
|
|
216
|
-
if (primitive.material !== undefined) {
|
|
217
|
-
primitive.material = this.getMaterial(primitive.material);
|
|
218
|
-
}
|
|
219
|
-
return primitive;
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
return mesh;
|
|
268
|
+
|
|
269
|
+
if (material.occlusionTexture) {
|
|
270
|
+
material.occlustionTexture = { ...material.occlustionTexture
|
|
271
|
+
};
|
|
272
|
+
material.occlusionTexture.texture = this.getTexture(material.occlusionTexture.index);
|
|
223
273
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
material.normalTexture.texture = this.getTexture(material.normalTexture.index);
|
|
230
|
-
}
|
|
231
|
-
if (material.occlusionTexture) {
|
|
232
|
-
material.occlustionTexture = { ...material.occlustionTexture };
|
|
233
|
-
material.occlusionTexture.texture = this.getTexture(material.occlusionTexture.index);
|
|
234
|
-
}
|
|
235
|
-
if (material.emissiveTexture) {
|
|
236
|
-
material.emmisiveTexture = { ...material.emmisiveTexture };
|
|
237
|
-
material.emissiveTexture.texture = this.getTexture(material.emissiveTexture.index);
|
|
238
|
-
}
|
|
239
|
-
if (!material.emissiveFactor) {
|
|
240
|
-
material.emissiveFactor = material.emmisiveTexture ? [1, 1, 1] : [0, 0, 0];
|
|
241
|
-
}
|
|
242
|
-
if (material.pbrMetallicRoughness) {
|
|
243
|
-
material.pbrMetallicRoughness = { ...material.pbrMetallicRoughness };
|
|
244
|
-
const mr = material.pbrMetallicRoughness;
|
|
245
|
-
if (mr.baseColorTexture) {
|
|
246
|
-
mr.baseColorTexture = { ...mr.baseColorTexture };
|
|
247
|
-
mr.baseColorTexture.texture = this.getTexture(mr.baseColorTexture.index);
|
|
248
|
-
}
|
|
249
|
-
if (mr.metallicRoughnessTexture) {
|
|
250
|
-
mr.metallicRoughnessTexture = { ...mr.metallicRoughnessTexture };
|
|
251
|
-
mr.metallicRoughnessTexture.texture = this.getTexture(mr.metallicRoughnessTexture.index);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return material;
|
|
274
|
+
|
|
275
|
+
if (material.emissiveTexture) {
|
|
276
|
+
material.emmisiveTexture = { ...material.emmisiveTexture
|
|
277
|
+
};
|
|
278
|
+
material.emissiveTexture.texture = this.getTexture(material.emissiveTexture.index);
|
|
255
279
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (accessor.bufferView !== undefined) {
|
|
260
|
-
// Draco encoded meshes don't have bufferView
|
|
261
|
-
accessor.bufferView = this.getBufferView(accessor.bufferView);
|
|
262
|
-
}
|
|
263
|
-
// Look up enums
|
|
264
|
-
accessor.bytesPerComponent = getBytesFromComponentType(accessor.componentType);
|
|
265
|
-
accessor.components = getSizeFromAccessorType(accessor.type);
|
|
266
|
-
accessor.bytesPerElement = accessor.bytesPerComponent * accessor.components;
|
|
267
|
-
// Create TypedArray for the accessor
|
|
268
|
-
// Note: The canonical way to instantiate is to ignore this array and create
|
|
269
|
-
// WebGLBuffer's using the bufferViews.
|
|
270
|
-
if (accessor.bufferView) {
|
|
271
|
-
const buffer = accessor.bufferView.buffer;
|
|
272
|
-
const { ArrayType, byteLength } = (0, gltf_utils_1.getAccessorArrayTypeAndLength)(accessor, accessor.bufferView);
|
|
273
|
-
const byteOffset = (accessor.bufferView.byteOffset || 0) + (accessor.byteOffset || 0) + buffer.byteOffset;
|
|
274
|
-
let cutBuffer = buffer.arrayBuffer.slice(byteOffset, byteOffset + byteLength);
|
|
275
|
-
if (accessor.bufferView.byteStride) {
|
|
276
|
-
cutBuffer = this._getValueFromInterleavedBuffer(buffer, byteOffset, accessor.bufferView.byteStride, accessor.bytesPerElement, accessor.count);
|
|
277
|
-
}
|
|
278
|
-
accessor.value = new ArrayType(cutBuffer);
|
|
279
|
-
}
|
|
280
|
-
return accessor;
|
|
280
|
+
|
|
281
|
+
if (!material.emissiveFactor) {
|
|
282
|
+
material.emissiveFactor = material.emmisiveTexture ? [1, 1, 1] : [0, 0, 0];
|
|
281
283
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
284
|
+
|
|
285
|
+
if (material.pbrMetallicRoughness) {
|
|
286
|
+
material.pbrMetallicRoughness = { ...material.pbrMetallicRoughness
|
|
287
|
+
};
|
|
288
|
+
const mr = material.pbrMetallicRoughness;
|
|
289
|
+
|
|
290
|
+
if (mr.baseColorTexture) {
|
|
291
|
+
mr.baseColorTexture = { ...mr.baseColorTexture
|
|
292
|
+
};
|
|
293
|
+
mr.baseColorTexture.texture = this.getTexture(mr.baseColorTexture.index);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (mr.metallicRoughnessTexture) {
|
|
297
|
+
mr.metallicRoughnessTexture = { ...mr.metallicRoughnessTexture
|
|
298
|
+
};
|
|
299
|
+
mr.metallicRoughnessTexture.texture = this.getTexture(mr.metallicRoughnessTexture.index);
|
|
300
|
+
}
|
|
299
301
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
|
|
303
|
+
return material;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
_resolveAccessor(accessor, index) {
|
|
307
|
+
accessor.id = accessor.id || "accessor-".concat(index);
|
|
308
|
+
|
|
309
|
+
if (accessor.bufferView !== undefined) {
|
|
310
|
+
accessor.bufferView = this.getBufferView(accessor.bufferView);
|
|
306
311
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
312
|
+
|
|
313
|
+
accessor.bytesPerComponent = getBytesFromComponentType(accessor.componentType);
|
|
314
|
+
accessor.components = getSizeFromAccessorType(accessor.type);
|
|
315
|
+
accessor.bytesPerElement = accessor.bytesPerComponent * accessor.components;
|
|
316
|
+
|
|
317
|
+
if (accessor.bufferView) {
|
|
318
|
+
const buffer = accessor.bufferView.buffer;
|
|
319
|
+
const {
|
|
320
|
+
ArrayType,
|
|
321
|
+
byteLength
|
|
322
|
+
} = getAccessorArrayTypeAndLength(accessor, accessor.bufferView);
|
|
323
|
+
const byteOffset = (accessor.bufferView.byteOffset || 0) + (accessor.byteOffset || 0) + buffer.byteOffset;
|
|
324
|
+
let cutBuffer = buffer.arrayBuffer.slice(byteOffset, byteOffset + byteLength);
|
|
325
|
+
|
|
326
|
+
if (accessor.bufferView.byteStride) {
|
|
327
|
+
cutBuffer = this._getValueFromInterleavedBuffer(buffer, byteOffset, accessor.bufferView.byteStride, accessor.bytesPerElement, accessor.count);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
accessor.value = new ArrayType(cutBuffer);
|
|
319
331
|
}
|
|
320
|
-
|
|
321
|
-
|
|
332
|
+
|
|
333
|
+
return accessor;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
_getValueFromInterleavedBuffer(buffer, byteOffset, byteStride, bytesPerElement, count) {
|
|
337
|
+
const result = new Uint8Array(count * bytesPerElement);
|
|
338
|
+
|
|
339
|
+
for (let i = 0; i < count; i++) {
|
|
340
|
+
const elementOffset = byteOffset + i * byteStride;
|
|
341
|
+
result.set(new Uint8Array(buffer.arrayBuffer.slice(elementOffset, elementOffset + bytesPerElement)), i * bytesPerElement);
|
|
322
342
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
343
|
+
|
|
344
|
+
return result.buffer;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
_resolveTexture(texture, index) {
|
|
348
|
+
texture.id = texture.id || "texture-".concat(index);
|
|
349
|
+
texture.sampler = 'sampler' in texture ? this.getSampler(texture.sampler) : DEFAULT_SAMPLER;
|
|
350
|
+
texture.source = this.getImage(texture.source);
|
|
351
|
+
return texture;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
_resolveSampler(sampler, index) {
|
|
355
|
+
sampler.id = sampler.id || "sampler-".concat(index);
|
|
356
|
+
sampler.parameters = {};
|
|
357
|
+
|
|
358
|
+
for (const key in sampler) {
|
|
359
|
+
const glEnum = this._enumSamplerParameter(key);
|
|
360
|
+
|
|
361
|
+
if (glEnum !== undefined) {
|
|
362
|
+
sampler.parameters[glEnum] = sampler[key];
|
|
363
|
+
}
|
|
336
364
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
byteOffset += bufferView.byteOffset;
|
|
351
|
-
}
|
|
352
|
-
result.data = new Uint8Array(arrayBuffer, byteOffset, bufferView.byteLength);
|
|
353
|
-
return result;
|
|
365
|
+
|
|
366
|
+
return sampler;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
_enumSamplerParameter(key) {
|
|
370
|
+
return SAMPLER_PARAMETER_GLTF_TO_GL[key];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
_resolveImage(image, index) {
|
|
374
|
+
image.id = image.id || "image-".concat(index);
|
|
375
|
+
|
|
376
|
+
if (image.bufferView !== undefined) {
|
|
377
|
+
image.bufferView = this.getBufferView(image.bufferView);
|
|
354
378
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
379
|
+
|
|
380
|
+
const preloadedImage = this.images[index];
|
|
381
|
+
|
|
382
|
+
if (preloadedImage) {
|
|
383
|
+
image.image = preloadedImage;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
return image;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
_resolveBufferView(bufferView, index) {
|
|
390
|
+
const bufferIndex = bufferView.buffer;
|
|
391
|
+
const result = {
|
|
392
|
+
id: "bufferView-".concat(index),
|
|
393
|
+
...bufferView,
|
|
394
|
+
buffer: this.buffers[bufferIndex]
|
|
395
|
+
};
|
|
396
|
+
const arrayBuffer = this.buffers[bufferIndex].arrayBuffer;
|
|
397
|
+
let byteOffset = this.buffers[bufferIndex].byteOffset || 0;
|
|
398
|
+
|
|
399
|
+
if ('byteOffset' in bufferView) {
|
|
400
|
+
byteOffset += bufferView.byteOffset;
|
|
365
401
|
}
|
|
402
|
+
|
|
403
|
+
result.data = new Uint8Array(arrayBuffer, byteOffset, bufferView.byteLength);
|
|
404
|
+
return result;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
_resolveCamera(camera, index) {
|
|
408
|
+
camera.id = camera.id || "camera-".concat(index);
|
|
409
|
+
|
|
410
|
+
if (camera.perspective) {}
|
|
411
|
+
|
|
412
|
+
if (camera.orthographic) {}
|
|
413
|
+
|
|
414
|
+
return camera;
|
|
415
|
+
}
|
|
416
|
+
|
|
366
417
|
}
|
|
367
|
-
|
|
368
|
-
|
|
418
|
+
|
|
419
|
+
export function postProcessGLTF(gltf, options) {
|
|
420
|
+
return new GLTFPostProcessor().postProcess(gltf, options);
|
|
369
421
|
}
|
|
370
|
-
|
|
422
|
+
//# sourceMappingURL=post-process-gltf.js.map
|