@shapediver/viewer.data-engine.gltf-converter 1.12.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/LICENSE ADDED
@@ -0,0 +1,73 @@
1
+ Required Notice: Copyright 2021 ShapeDiver GmbH (https://www.shapediver.com)
2
+
3
+ https://polyformproject.org/licenses/noncommercial/1.0.0
4
+
5
+ Acceptance
6
+
7
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
8
+
9
+ Copyright License
10
+
11
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor’s copyright in it for any permitted purpose. However, you may only distribute the software according to Distribution License and make changes or new works based on the software according to Changes and New Works License.
12
+
13
+ Distribution License
14
+
15
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by Changes and New Works License.
16
+
17
+ Notices
18
+
19
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with Required Notice: that the licensor provided with the software. For example:
20
+
21
+ Required Notice: Copyright 2021 ShapeDiver GmbH (https://www.shapediver.com)
22
+
23
+ Changes and New Works License
24
+
25
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
26
+
27
+ Patent License
28
+
29
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
30
+
31
+ Noncommercial Purposes
32
+
33
+ Any noncommercial purpose is a permitted purpose.
34
+
35
+ Personal Uses
36
+
37
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
38
+
39
+ Noncommercial Organizations
40
+
41
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
42
+
43
+ Fair Use
44
+
45
+ You may have “fair use” rights for the software under the law. These terms do not limit them.
46
+
47
+ No Other Rights
48
+
49
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
50
+
51
+ Patent Defense
52
+
53
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
54
+
55
+ Violations
56
+
57
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
58
+
59
+ No Liability
60
+
61
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
62
+
63
+ Definitions
64
+
65
+ The licensor is the individual or entity offering these terms, and the software is the software the licensor makes available under these terms.
66
+
67
+ You refers to the individual or entity agreeing to these terms.
68
+
69
+ Your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
70
+
71
+ Your licenses are all the licenses granted to you for the software under these terms.
72
+
73
+ Use means anything you do with the software requiring one of your licenses.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # `@shapediver/viewer.data-engine.gltf-converter`
2
+
3
+ This package is part of the [`@shapediver/viewer`](https://www.npmjs.com/package/@shapediver/viewer), you can find all information [here](https://viewer.shapediver.com/v3/latest/api/index.html).
@@ -0,0 +1,46 @@
1
+ import { TreeNode } from '@shapediver/viewer.shared.node-tree';
2
+ export declare enum GLTF_EXTENSIONS {
3
+ KHR_BINARY_GLTF = "KHR_binary_glTF",
4
+ KHR_MATERIALS_PBRSPECULARGLOSSINESS = "KHR_materials_pbrSpecularGlossiness",
5
+ KHR_MATERIALS_UNLIT = "KHR_materials_unlit"
6
+ }
7
+ export declare class GLTFConverter {
8
+ private readonly _converter;
9
+ private readonly _globalTransformationInverse;
10
+ private readonly _mergeShader;
11
+ private readonly _quadCamera;
12
+ private readonly _quadScene;
13
+ private readonly _renderer;
14
+ private readonly _uuidGenerator;
15
+ private _animations;
16
+ private _buffers;
17
+ private _byteOffset;
18
+ private _content;
19
+ private _convertForAR;
20
+ private _extensionsRequired;
21
+ private _extensionsUsed;
22
+ private _imageCache;
23
+ private _nodes;
24
+ private _promises;
25
+ constructor();
26
+ convert(node: TreeNode, convertForAR?: boolean): Promise<ArrayBuffer>;
27
+ private combineTextures;
28
+ private convertAccessor;
29
+ private convertAnimations;
30
+ private convertBuffer;
31
+ private convertBufferView;
32
+ private convertBufferViewImage;
33
+ private convertImage;
34
+ private convertMaterial;
35
+ private convertMesh;
36
+ private convertNode;
37
+ private convertPrimitive;
38
+ private convertTexture;
39
+ private getComponentType;
40
+ private getMinMax;
41
+ private getPaddedArrayBuffer;
42
+ private getType;
43
+ private reset;
44
+ private stringToArrayBuffer;
45
+ }
46
+ //# sourceMappingURL=GLTFConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GLTFConverter.d.ts","sourceRoot":"","sources":["../src/GLTFConverter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAkC9D,oBAAY,eAAe;IACvB,eAAe,oBAAoB;IACnC,mCAAmC,wCAAwC;IAC3E,mBAAmB,wBAAwB;CAC9C;AAED,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsD;IACjF,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAI7B;IAChB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAChD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkE;IAEjG,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,QAAQ,CAOf;IAED,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,eAAe,CAAgB;IACvC,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,MAAM,CAGL;IACT,OAAO,CAAC,SAAS,CAAsB;;IA4F1B,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,UAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;YAgGlE,eAAe;IA8E7B,OAAO,CAAC,eAAe;IAuCvB,OAAO,CAAC,iBAAiB;IAwFzB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,iBAAiB;YAkDX,sBAAsB;IAmBpC,OAAO,CAAC,YAAY;IAmDpB,OAAO,CAAC,eAAe;IAmEvB,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,WAAW;IAyCnB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,KAAK;IAoBb,OAAO,CAAC,mBAAmB;CAkB9B"}
@@ -0,0 +1,818 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ var __metadata = (this && this.__metadata) || function (k, v) {
28
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
29
+ };
30
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.GLTFConverter = exports.GLTF_EXTENSIONS = void 0;
41
+ const viewer_shared_build_data_1 = require("@shapediver/viewer.shared.build-data");
42
+ const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
43
+ const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
44
+ const tsyringe_1 = require("tsyringe");
45
+ const viewer_data_engine_shared_types_1 = require("@shapediver/viewer.data-engine.shared-types");
46
+ const gl_matrix_1 = require("gl-matrix");
47
+ const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
48
+ const THREE = __importStar(require("three"));
49
+ var GLTF_EXTENSIONS;
50
+ (function (GLTF_EXTENSIONS) {
51
+ GLTF_EXTENSIONS["KHR_BINARY_GLTF"] = "KHR_binary_glTF";
52
+ GLTF_EXTENSIONS["KHR_MATERIALS_PBRSPECULARGLOSSINESS"] = "KHR_materials_pbrSpecularGlossiness";
53
+ GLTF_EXTENSIONS["KHR_MATERIALS_UNLIT"] = "KHR_materials_unlit";
54
+ })(GLTF_EXTENSIONS = exports.GLTF_EXTENSIONS || (exports.GLTF_EXTENSIONS = {}));
55
+ let GLTFConverter = class GLTFConverter {
56
+ // #endregion Properties (17)
57
+ // #region Constructors (1)
58
+ constructor() {
59
+ // #region Properties (17)
60
+ this._converter = tsyringe_1.container.resolve(viewer_shared_services_1.Converter);
61
+ this._globalTransformationInverse = gl_matrix_1.mat4.fromValues(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
62
+ this._uuidGenerator = tsyringe_1.container.resolve(viewer_shared_services_1.UuidGenerator);
63
+ this._animations = [];
64
+ this._buffers = [];
65
+ this._byteOffset = 0;
66
+ this._content = {
67
+ asset: {
68
+ copyright: '2021 (c) ShapeDiver',
69
+ generator: 'ShapeDiverViewer@' + viewer_shared_build_data_1.build_data.build_version,
70
+ version: '2.0',
71
+ extensions: {}
72
+ },
73
+ };
74
+ this._convertForAR = false;
75
+ this._extensionsRequired = [];
76
+ this._extensionsUsed = [];
77
+ this._imageCache = {};
78
+ this._nodes = [];
79
+ this._promises = [];
80
+ this._mergeShader = new THREE.ShaderMaterial({
81
+ uniforms: {
82
+ tRed: { value: null },
83
+ activeRed: { value: false },
84
+ defaultRed: { value: 1.0 },
85
+ tGreen: { value: null },
86
+ activeGreen: { value: false },
87
+ defaultGreen: { value: 1.0 },
88
+ tBlue: { value: null },
89
+ activeBlue: { value: false },
90
+ defaultBlue: { value: 1.0 },
91
+ },
92
+ vertexShader: `// @author Michael Oppitz
93
+
94
+ uniform sampler2D tRed;
95
+ uniform bool activeRed;
96
+ uniform float defaultRed;
97
+
98
+ uniform sampler2D tGreen;
99
+ uniform bool activeGreen;
100
+ uniform float defaultGreen;
101
+
102
+ uniform sampler2D tBlue;
103
+ uniform bool activeBlue;
104
+ uniform float defaultBlue;
105
+
106
+ varying vec2 vUv;
107
+
108
+ void main() {
109
+ vUv = uv;
110
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
111
+ }`,
112
+ fragmentShader: `// @author Michael Oppitz
113
+
114
+ uniform sampler2D tRed;
115
+ uniform bool activeRed;
116
+ uniform float defaultRed;
117
+
118
+ uniform sampler2D tGreen;
119
+ uniform bool activeGreen;
120
+ uniform float defaultGreen;
121
+
122
+ uniform sampler2D tBlue;
123
+ uniform bool activeBlue;
124
+ uniform float defaultBlue;
125
+
126
+ varying vec2 vUv;
127
+
128
+ void main() {
129
+ vec4 outColor = vec4(0.0, 0.0, 0.0, 1.0);
130
+
131
+ if(activeRed == true) {
132
+ outColor.r = texture2D(tRed, vUv).r;
133
+ } else {
134
+ outColor.r = defaultRed;
135
+ }
136
+
137
+ if(activeGreen == true) {
138
+ outColor.g = texture2D(tGreen, vUv).g;
139
+ } else {
140
+ outColor.g = defaultGreen;
141
+ }
142
+
143
+ if(activeBlue == true) {
144
+ outColor.b = texture2D(tBlue, vUv).b;
145
+ } else {
146
+ outColor.b = defaultBlue;
147
+ }
148
+
149
+ gl_FragColor = outColor;
150
+ }`
151
+ });
152
+ this._quadCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
153
+ this._quadScene = new THREE.Scene();
154
+ const quad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), this._mergeShader);
155
+ this._quadScene.add(quad);
156
+ this._renderer = new THREE.WebGLRenderer();
157
+ }
158
+ // #endregion Constructors (1)
159
+ // #region Public Methods (1)
160
+ convert(node, convertForAR = false) {
161
+ var _a;
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ this.reset();
164
+ this._convertForAR = convertForAR;
165
+ const sceneNode = new viewer_shared_node_tree_1.TreeNode('ShapeDiverRootNode');
166
+ sceneNode.addChild(node);
167
+ const sceneDef = {
168
+ name: sceneNode.name,
169
+ nodes: []
170
+ };
171
+ const globalTransformationInverseID = this._uuidGenerator.create();
172
+ node.transformations.push({
173
+ id: globalTransformationInverseID,
174
+ matrix: this._globalTransformationInverse,
175
+ });
176
+ (_a = sceneDef.nodes) === null || _a === void 0 ? void 0 : _a.push(this.convertNode(node));
177
+ for (let i = 0; i < node.transformations.length; i++)
178
+ if (node.transformations[i].id === globalTransformationInverseID)
179
+ node.transformations.splice(i, 1);
180
+ this._content.scenes = [];
181
+ this._content.scenes.push(sceneDef);
182
+ this.convertAnimations();
183
+ // Declare extensions.
184
+ const extensionsUsedList = Object.keys(this._extensionsUsed);
185
+ if (extensionsUsedList.length > 0)
186
+ this._content.extensionsUsed = extensionsUsedList;
187
+ const extensionsRequiredList = Object.keys(this._extensionsRequired);
188
+ if (extensionsRequiredList.length > 0)
189
+ this._content.extensionsRequired = extensionsRequiredList;
190
+ let promisesLength = 0;
191
+ while (promisesLength !== this._promises.length) {
192
+ promisesLength = this._promises.length;
193
+ yield Promise.all(this._promises);
194
+ yield new Promise(resolve => setTimeout(resolve, 0));
195
+ }
196
+ // Merge buffers.
197
+ const blob = new Blob(this._buffers, { type: 'application/octet-stream' });
198
+ // Update byte length of the single buffer.
199
+ if (this._content.buffers && this._content.buffers.length > 0)
200
+ this._content.buffers[0].byteLength = blob.size;
201
+ return new Promise(resolve => {
202
+ // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification
203
+ const reader = new window.FileReader();
204
+ reader.readAsArrayBuffer(blob);
205
+ reader.onloadend = () => {
206
+ // Binary chunk.
207
+ const binaryChunk = this.getPaddedArrayBuffer(reader.result);
208
+ const binaryChunkPrefix = new DataView(new ArrayBuffer(8));
209
+ binaryChunkPrefix.setUint32(0, binaryChunk.byteLength, true);
210
+ binaryChunkPrefix.setUint32(4, 0x004E4942, true);
211
+ // JSON chunk.
212
+ const jsonChunk = this.getPaddedArrayBuffer(this.stringToArrayBuffer(JSON.stringify(this._content)), 0x20);
213
+ const jsonChunkPrefix = new DataView(new ArrayBuffer(8));
214
+ jsonChunkPrefix.setUint32(0, jsonChunk.byteLength, true);
215
+ jsonChunkPrefix.setUint32(4, 0x4E4F534A, true);
216
+ // GLB header.
217
+ const header = new ArrayBuffer(12);
218
+ const headerView = new DataView(header);
219
+ headerView.setUint32(0, 0x46546C67, true);
220
+ headerView.setUint32(4, 2, true);
221
+ const totalByteLength = 12
222
+ + jsonChunkPrefix.byteLength + jsonChunk.byteLength
223
+ + binaryChunkPrefix.byteLength + binaryChunk.byteLength;
224
+ headerView.setUint32(8, totalByteLength, true);
225
+ const glbBlob = new Blob([
226
+ header,
227
+ jsonChunkPrefix,
228
+ jsonChunk,
229
+ binaryChunkPrefix,
230
+ binaryChunk
231
+ ], { type: 'application/octet-stream' });
232
+ const glbReader = new window.FileReader();
233
+ glbReader.readAsArrayBuffer(glbBlob);
234
+ glbReader.onloadend = () => {
235
+ resolve(glbReader.result);
236
+ };
237
+ };
238
+ });
239
+ });
240
+ }
241
+ // #endregion Public Methods (1)
242
+ // #region Private Methods (18)
243
+ combineTextures(red, green, blue) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ if (!red && !green && !blue)
246
+ throw new Error('No maps supplied.');
247
+ let width = 0, height = 0;
248
+ const textures = [red, green, blue];
249
+ for (let t of textures) {
250
+ if (t) {
251
+ if (width === 0 && height === 0) {
252
+ width = t.image.width;
253
+ height = t.image.height;
254
+ }
255
+ else if (t.image.width !== width && t.image.height !== height) {
256
+ throw new Error('Maps have different sizes. Combining not supported.');
257
+ }
258
+ }
259
+ }
260
+ if (red) {
261
+ const redTexture = new THREE.Texture(red.image);
262
+ redTexture.needsUpdate = true;
263
+ this._mergeShader.uniforms.tRed.value = redTexture;
264
+ this._mergeShader.uniforms.activeRed.value = true;
265
+ }
266
+ else {
267
+ this._mergeShader.uniforms.activeRed.value = false;
268
+ }
269
+ if (green) {
270
+ const greenTexture = new THREE.Texture(green.image);
271
+ greenTexture.needsUpdate = true;
272
+ this._mergeShader.uniforms.tGreen.value = greenTexture;
273
+ this._mergeShader.uniforms.activeGreen.value = true;
274
+ }
275
+ else {
276
+ this._mergeShader.uniforms.activeGreen.value = false;
277
+ }
278
+ if (blue) {
279
+ const blueTexture = new THREE.Texture(blue.image);
280
+ blueTexture.needsUpdate = true;
281
+ this._mergeShader.uniforms.tBlue.value = blueTexture;
282
+ this._mergeShader.uniforms.activeBlue.value = true;
283
+ }
284
+ else {
285
+ this._mergeShader.uniforms.activeBlue.value = false;
286
+ }
287
+ // The different render targets that are used by the passes
288
+ const renderTarget = new THREE.WebGLRenderTarget(width, height, {
289
+ minFilter: THREE.LinearFilter,
290
+ magFilter: THREE.LinearFilter,
291
+ format: THREE.RGBAFormat
292
+ });
293
+ renderTarget.texture.name = 'target.rt';
294
+ this._renderer.setRenderTarget(renderTarget);
295
+ this._renderer.render(this._quadScene, this._quadCamera);
296
+ const buffer = new Uint8ClampedArray(4 * width * height);
297
+ this._renderer.readRenderTargetPixels(renderTarget, 0, 0, width, height, buffer);
298
+ let imageData = new ImageData(buffer, width, height);
299
+ var canvas = document.createElement('canvas');
300
+ var ctx = canvas.getContext('2d');
301
+ canvas.width = imageData.width;
302
+ canvas.height = imageData.height;
303
+ ctx.putImageData(imageData, 0, 0);
304
+ const image = new Image();
305
+ const promise = new Promise(resolve => {
306
+ image.onload = () => resolve();
307
+ });
308
+ image.crossOrigin = "anonymous";
309
+ image.src = canvas.toDataURL("image/jpeg", 1.0);
310
+ yield promise;
311
+ const m = (red || green || blue);
312
+ return new viewer_shared_types_1.MapData(image, m.wrapS, m.wrapT, m.minFilter, m.magFilter, m.center, m.color, m.offset, m.repeat, m.rotation, m.flipY);
313
+ });
314
+ }
315
+ convertAccessor(data) {
316
+ if (!this._content.accessors)
317
+ this._content.accessors = [];
318
+ const bufferView = this.convertBufferView(data);
319
+ const minMax = this.getMinMax(data);
320
+ const accessorDef = {
321
+ bufferView: bufferView,
322
+ byteOffset: 0,
323
+ componentType: this.getComponentType(data.array),
324
+ normalized: data.normalized,
325
+ count: +data.count,
326
+ max: minMax.max,
327
+ min: minMax.min,
328
+ type: this.getType(data.itemSize),
329
+ // sparse: { // TODO
330
+ // count: number,
331
+ // indices: {
332
+ // bufferView: number,
333
+ // byteOffset?: number,
334
+ // componentType: number,
335
+ // extensions?: { [id: string]: any },
336
+ // extras?: any
337
+ // },
338
+ // values: {
339
+ // bufferView: number,
340
+ // byteOffset?: number,
341
+ // extensions?: { [id: string]: any },
342
+ // extras?: any
343
+ // },
344
+ // extensions?: { [id: string]: any },
345
+ // extras?: any
346
+ // },
347
+ };
348
+ this._content.accessors.push(accessorDef);
349
+ return this._content.accessors.length - 1;
350
+ }
351
+ convertAnimations() {
352
+ var _a;
353
+ if (!this._content.animations && this._animations.length > 0)
354
+ this._content.animations = [];
355
+ for (let i = 0; i < this._animations.length; i++) {
356
+ const animation = this._animations[i];
357
+ const animationDef = {
358
+ name: animation.name || 'animation_' + i,
359
+ channels: [],
360
+ samplers: []
361
+ };
362
+ for (let j = 0; j < animation.tracks.length; j++) {
363
+ const track = animation.tracks[j];
364
+ const value = this._nodes.find(a => a.node === track.node);
365
+ if (!value)
366
+ continue;
367
+ const inputMin = Math.min(...track.times);
368
+ const inputMax = Math.max(...track.times);
369
+ const inputData = new viewer_shared_types_1.AttributeData(new Float32Array(track.times), 1, 4, 0, 4, false, track.times.length, [inputMin], [inputMax]);
370
+ const outputMin = [];
371
+ outputMin.push(Math.min(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 0)));
372
+ outputMin.push(Math.min(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 1)));
373
+ outputMin.push(Math.min(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 2)));
374
+ if (track.path === 'rotation') {
375
+ outputMin.push(Math.min(...track.values.filter((s, i) => i % 4 === 3)));
376
+ }
377
+ const outputMax = [];
378
+ outputMax.push(Math.max(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 0)));
379
+ outputMax.push(Math.max(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 1)));
380
+ outputMax.push(Math.max(...track.values.filter((s, i) => i % (track.path === 'rotation' ? 4 : 3) === 2)));
381
+ if (track.path === 'rotation') {
382
+ outputMax.push(Math.max(...track.values.filter((s, i) => i % 4 === 3)));
383
+ }
384
+ const outputData = new viewer_shared_types_1.AttributeData(new Float32Array(track.values), track.path === 'rotation' ? 4 : 3, //itemSize
385
+ track.path === 'rotation' ? 16 : 12, //itemBytes
386
+ 0, 4, false, track.times.length, outputMin, outputMax, track.path === 'rotation' ? 16 : 12);
387
+ const samplerDef = {
388
+ input: this.convertAccessor(inputData),
389
+ output: this.convertAccessor(outputData),
390
+ interpolation: track.interpolation.toUpperCase()
391
+ };
392
+ animationDef.samplers.push(samplerDef);
393
+ const channelDef = {
394
+ sampler: animationDef.samplers.length - 1,
395
+ target: {
396
+ node: value.id,
397
+ path: track.path
398
+ }
399
+ };
400
+ animationDef.channels.push(channelDef);
401
+ }
402
+ (_a = this._content.animations) === null || _a === void 0 ? void 0 : _a.push(animationDef);
403
+ }
404
+ }
405
+ convertBuffer(buffer) {
406
+ if (!this._content.buffers)
407
+ this._content.buffers = [];
408
+ if (this._content.buffers.length === 0)
409
+ this._content.buffers = [{ byteLength: 0 }];
410
+ this._buffers.push(buffer);
411
+ return 0;
412
+ }
413
+ convertBufferView(data) {
414
+ if (!this._content.bufferViews)
415
+ this._content.bufferViews = [];
416
+ let componentTypeNumber = this.getComponentType(data.array);
417
+ let componentSize = viewer_data_engine_shared_types_1.ACCESSORCOMPONENTSIZE_V2[componentTypeNumber];
418
+ const byteLength = Math.ceil(data.count * data.itemSize * componentSize / 4) * 4;
419
+ const dataView = new DataView(new ArrayBuffer(byteLength));
420
+ let offset = 0;
421
+ for (let i = 0; i < data.count; i++) {
422
+ for (let a = 0; a < data.itemSize; a++) {
423
+ let value = 0;
424
+ if (data.itemSize > 4) {
425
+ // no support for interleaved data for itemSize > 4
426
+ value = data.array[i * data.itemSize + a];
427
+ }
428
+ else {
429
+ if (a === 0)
430
+ value = data.array[i * data.itemSize];
431
+ else if (a === 1)
432
+ value = data.array[i * data.itemSize + 1];
433
+ else if (a === 2)
434
+ value = data.array[i * data.itemSize + 2];
435
+ else if (a === 3)
436
+ value = data.array[i * data.itemSize + 3];
437
+ }
438
+ if (data.array instanceof Float32Array) {
439
+ dataView.setFloat32(offset, value, true);
440
+ }
441
+ else if (data.array instanceof Uint32Array) {
442
+ dataView.setUint32(offset, value, true);
443
+ }
444
+ else if (data.array instanceof Uint16Array) {
445
+ dataView.setUint16(offset, value, true);
446
+ }
447
+ else if (data.array instanceof Int16Array) {
448
+ dataView.setInt16(offset, value, true);
449
+ }
450
+ else if (data.array instanceof Uint8Array) {
451
+ dataView.setUint8(offset, value);
452
+ }
453
+ else if (data.array instanceof Int8Array) {
454
+ dataView.setInt8(offset, value);
455
+ }
456
+ offset += componentSize;
457
+ }
458
+ }
459
+ const bufferViewDef = {
460
+ buffer: this.convertBuffer(dataView.buffer),
461
+ byteOffset: this._byteOffset,
462
+ byteLength: byteLength
463
+ };
464
+ this._byteOffset += byteLength;
465
+ this._content.bufferViews.push(bufferViewDef);
466
+ return this._content.bufferViews.length - 1;
467
+ }
468
+ convertBufferViewImage(blob) {
469
+ return __awaiter(this, void 0, void 0, function* () {
470
+ if (!this._content.bufferViews)
471
+ this._content.bufferViews = [];
472
+ return new Promise((resolve) => {
473
+ const reader = new window.FileReader();
474
+ reader.readAsArrayBuffer(blob);
475
+ reader.onloadend = () => {
476
+ const buffer = this.getPaddedArrayBuffer(reader.result);
477
+ const bufferViewDef = {
478
+ buffer: this.convertBuffer(buffer),
479
+ byteOffset: this._byteOffset,
480
+ byteLength: buffer.byteLength
481
+ };
482
+ this._byteOffset += buffer.byteLength;
483
+ this._content.bufferViews.push(bufferViewDef);
484
+ resolve(this._content.bufferViews.length - 1);
485
+ };
486
+ });
487
+ });
488
+ }
489
+ convertImage(data) {
490
+ if (!this._content.images)
491
+ this._content.images = [];
492
+ if (this._imageCache[data.image.src])
493
+ return this._imageCache[data.image.src];
494
+ const imageDef = {};
495
+ const canvas = document.createElement('canvas');
496
+ canvas.width = data.image.width;
497
+ canvas.height = data.image.height;
498
+ const ctx = canvas.getContext('2d');
499
+ if (data.flipY) {
500
+ ctx.translate(0, canvas.height);
501
+ ctx.scale(1, -1);
502
+ }
503
+ let mimeType = 'image/png';
504
+ if (data.image.src.endsWith('.jpg') || data.image.src.includes('image/jpeg'))
505
+ mimeType = 'image/jpeg';
506
+ imageDef.mimeType = mimeType;
507
+ const DATA_URI_REGEX = /^data:(.*?)(;base64)?,(.*)$/;
508
+ if (DATA_URI_REGEX.test(data.image.src)) {
509
+ const byteString = atob(data.image.src.split(',')[1]);
510
+ const mimeType = data.image.src.split(',')[0].split(':')[1].split(';')[0];
511
+ const ab = new ArrayBuffer(byteString.length);
512
+ const ia = new Uint8Array(ab);
513
+ for (let i = 0; i < byteString.length; i++)
514
+ ia[i] = byteString.charCodeAt(i);
515
+ const blob = new Blob([ab], { type: mimeType });
516
+ this._promises.push(new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
517
+ const bufferViewIndex = yield this.convertBufferViewImage(blob);
518
+ imageDef.bufferView = bufferViewIndex;
519
+ resolve();
520
+ })));
521
+ }
522
+ else {
523
+ ctx.drawImage(data.image, 0, 0, canvas.width, canvas.height);
524
+ this._promises.push(new Promise((resolve) => {
525
+ canvas.toBlob((blob) => __awaiter(this, void 0, void 0, function* () {
526
+ const bufferViewIndex = yield this.convertBufferViewImage(blob);
527
+ imageDef.bufferView = bufferViewIndex;
528
+ resolve();
529
+ }), mimeType);
530
+ }));
531
+ }
532
+ this._content.images.push(imageDef);
533
+ this._imageCache[data.image.src] = this._content.images.length - 1;
534
+ return this._content.images.length - 1;
535
+ }
536
+ convertMaterial(data, includeMaps = true) {
537
+ if (!this._content.materials)
538
+ this._content.materials = [];
539
+ const materialDef = {
540
+ name: data.id,
541
+ pbrMetallicRoughness: {}
542
+ };
543
+ if (data.KHR_materials_pbrSpecularGlossiness) {
544
+ if (!this._extensionsUsed.includes('KHR_materials_pbrSpecularGlossiness'))
545
+ this._extensionsUsed.push('KHR_materials_pbrSpecularGlossiness');
546
+ if (!this._extensionsRequired.includes('KHR_materials_pbrSpecularGlossiness'))
547
+ this._extensionsRequired.push('KHR_materials_pbrSpecularGlossiness');
548
+ const ext = {};
549
+ ext.diffuseFactor = this._converter.toColorArray(data.color);
550
+ ext.diffuseFactor[3] = data.opacity;
551
+ if (data.map && includeMaps)
552
+ ext.diffuseTexture = { index: this.convertTexture(data.map) };
553
+ ext.specularFactor = this._converter.toColorArray(data.specular);
554
+ ext.glossinessFactor = data.glossiness;
555
+ if (data.specularGlossinessMap && includeMaps)
556
+ ext.specularGlossinessTexture = { index: this.convertTexture(data.specularGlossinessMap) };
557
+ materialDef.extensions = {
558
+ KHR_materials_pbrSpecularGlossiness: ext
559
+ };
560
+ }
561
+ else if (data.KHR_materials_unlit) {
562
+ if (!this._extensionsUsed.includes('KHR_materials_unlit'))
563
+ this._extensionsUsed.push('KHR_materials_unlit');
564
+ if (!this._extensionsRequired.includes('KHR_materials_unlit'))
565
+ this._extensionsRequired.push('KHR_materials_unlit');
566
+ materialDef.pbrMetallicRoughness.baseColorFactor = this._converter.toColorArray(data.color);
567
+ materialDef.pbrMetallicRoughness.baseColorFactor[3] = data.opacity;
568
+ if (data.map && includeMaps)
569
+ materialDef.pbrMetallicRoughness.baseColorTexture = { index: this.convertTexture(data.map) };
570
+ materialDef.extensions = {
571
+ KHR_materials_unlit: {}
572
+ };
573
+ }
574
+ else {
575
+ materialDef.pbrMetallicRoughness.baseColorFactor = this._converter.toColorArray(data.color);
576
+ materialDef.pbrMetallicRoughness.baseColorFactor[3] = data.opacity;
577
+ if (data.map && includeMaps)
578
+ materialDef.pbrMetallicRoughness.baseColorTexture = { index: this.convertTexture(data.map) };
579
+ materialDef.pbrMetallicRoughness.metallicFactor = data.metalnessMap ? 1 : data.metalness;
580
+ materialDef.pbrMetallicRoughness.roughnessFactor = data.roughnessMap ? 1 : data.roughness;
581
+ if (data.metalnessRoughnessMap && includeMaps) {
582
+ materialDef.pbrMetallicRoughness.metallicRoughnessTexture = { index: this.convertTexture(data.metalnessRoughnessMap) };
583
+ }
584
+ else if ((data.metalnessMap || data.roughnessMap) && includeMaps) {
585
+ this._promises.push(new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
586
+ const mapData = yield this.combineTextures(undefined, data.roughnessMap, data.metalnessMap);
587
+ materialDef.pbrMetallicRoughness.metallicRoughnessTexture = { index: this.convertTexture(mapData) };
588
+ resolve();
589
+ })));
590
+ }
591
+ }
592
+ if (data.normalMap && includeMaps)
593
+ materialDef.normalTexture = { index: this.convertTexture(data.normalMap) };
594
+ if (data.aoMap && includeMaps)
595
+ materialDef.occlusionTexture = { index: this.convertTexture(data.aoMap) };
596
+ if (data.emissiveMap && includeMaps)
597
+ materialDef.emissiveTexture = { index: this.convertTexture(data.emissiveMap) };
598
+ if (data.emissiveness)
599
+ materialDef.emissiveFactor = this._converter.toColorArray(data.emissiveness);
600
+ materialDef.alphaMode = data.alphaMode.toUpperCase();
601
+ if (data.alphaMode === viewer_shared_types_1.MATERIAL_ALPHA.MASK)
602
+ materialDef.alphaCutoff = data.alphaCutoff;
603
+ materialDef.doubleSided = data.side === viewer_shared_types_1.MATERIAL_SIDE.DOUBLE;
604
+ this._content.materials.push(materialDef);
605
+ return this._content.materials.length - 1;
606
+ }
607
+ convertMesh(data) {
608
+ var _a;
609
+ if (!this._content.meshes)
610
+ this._content.meshes = [];
611
+ const meshDef = {
612
+ primitives: [],
613
+ name: data.id
614
+ };
615
+ (_a = meshDef.primitives) === null || _a === void 0 ? void 0 : _a.push(this.convertPrimitive(data.primitive));
616
+ this._content.meshes.push(meshDef);
617
+ return this._content.meshes.length - 1;
618
+ }
619
+ convertNode(node) {
620
+ var _a;
621
+ if (!this._content.nodes)
622
+ this._content.nodes = [];
623
+ const nodeDef = {
624
+ name: node.name,
625
+ };
626
+ if (node.transformations.length > 0)
627
+ nodeDef.matrix = [node.nodeMatrix[0], node.nodeMatrix[1], node.nodeMatrix[2], node.nodeMatrix[3],
628
+ node.nodeMatrix[4], node.nodeMatrix[5], node.nodeMatrix[6], node.nodeMatrix[7],
629
+ node.nodeMatrix[8], node.nodeMatrix[9], node.nodeMatrix[10], node.nodeMatrix[11],
630
+ node.nodeMatrix[12], node.nodeMatrix[13], node.nodeMatrix[14], node.nodeMatrix[15]];
631
+ for (let i = 0; i < node.data.length; i++) {
632
+ if (node.data[i] instanceof viewer_shared_types_1.GeometryData) {
633
+ if (this._convertForAR) {
634
+ if (node.data[i].primitive.mode !== viewer_shared_types_1.PRIMITIVE_MODE.POINTS &&
635
+ node.data[i].primitive.mode !== viewer_shared_types_1.PRIMITIVE_MODE.LINES &&
636
+ node.data[i].primitive.mode !== viewer_shared_types_1.PRIMITIVE_MODE.LINE_LOOP &&
637
+ node.data[i].primitive.mode !== viewer_shared_types_1.PRIMITIVE_MODE.LINE_STRIP)
638
+ nodeDef.mesh = this.convertMesh(node.data[i]);
639
+ }
640
+ else {
641
+ nodeDef.mesh = this.convertMesh(node.data[i]);
642
+ }
643
+ }
644
+ if (node.data[i] instanceof viewer_shared_types_1.AnimationData)
645
+ this._animations.push(node.data[i]);
646
+ }
647
+ if (node.children.length > 0)
648
+ nodeDef.children = [];
649
+ for (let i = 0; i < node.children.length; i++)
650
+ (_a = nodeDef.children) === null || _a === void 0 ? void 0 : _a.push(this.convertNode(node.children[i]));
651
+ this._content.nodes.push(nodeDef);
652
+ this._nodes.push({
653
+ node,
654
+ id: this._content.nodes.length - 1
655
+ });
656
+ return this._content.nodes.length - 1;
657
+ }
658
+ convertPrimitive(data) {
659
+ const primitiveDef = {
660
+ attributes: {},
661
+ mode: data.mode
662
+ };
663
+ for (let a in data.attributes) {
664
+ if (data.attributes[a].array.length > 0) {
665
+ if (a.includes('COLOR')) {
666
+ if (data.attributes[a].itemSize % 4 === 0) {
667
+ primitiveDef.attributes[a] = this.convertAccessor(data.attributes[a]);
668
+ }
669
+ else if (data.attributes[a].itemSize % 3 === 0) {
670
+ const oldAttributeData = data.attributes[a];
671
+ const newArray = new Float32Array((oldAttributeData.array.length / 3) * 4);
672
+ let counter = 0;
673
+ for (let i = 0; i < newArray.length; i += 4) {
674
+ newArray[i] = oldAttributeData.array[counter] / (oldAttributeData.elementBytes === 1 ? 255.0 : 1.0);
675
+ newArray[i + 1] = oldAttributeData.array[counter + 1] / (oldAttributeData.elementBytes === 1 ? 255.0 : 1.0);
676
+ newArray[i + 2] = oldAttributeData.array[counter + 2] / (oldAttributeData.elementBytes === 1 ? 255.0 : 1.0);
677
+ newArray[i + 3] = 1.0;
678
+ counter += 3;
679
+ }
680
+ primitiveDef.attributes[a] = this.convertAccessor(new viewer_shared_types_1.AttributeData(newArray, 4, 4 * 4, oldAttributeData.byteOffset, 4, oldAttributeData.normalized, oldAttributeData.count, oldAttributeData.min, oldAttributeData.max, oldAttributeData.byteStride));
681
+ }
682
+ }
683
+ else {
684
+ primitiveDef.attributes[a] = this.convertAccessor(data.attributes[a]);
685
+ }
686
+ }
687
+ }
688
+ if (data.indices)
689
+ primitiveDef.indices = this.convertAccessor(data.indices);
690
+ if (data.material) {
691
+ const k = Object.keys(primitiveDef.attributes).find(k => k.includes('TEXCOORD'));
692
+ primitiveDef.material = this.convertMaterial(data.material, !!k);
693
+ }
694
+ return primitiveDef;
695
+ }
696
+ convertTexture(data) {
697
+ if (!this._content.textures)
698
+ this._content.textures = [];
699
+ const textureDef = {
700
+ source: this.convertImage(data)
701
+ };
702
+ // TODO samplers
703
+ this._content.textures.push(textureDef);
704
+ return this._content.textures.length - 1;
705
+ }
706
+ getComponentType(array) {
707
+ switch (true) {
708
+ case array instanceof Int8Array:
709
+ return 5120;
710
+ case array instanceof Uint8Array:
711
+ return 5121;
712
+ case array instanceof Int16Array:
713
+ return 5122;
714
+ case array instanceof Uint16Array:
715
+ return 5123;
716
+ case array instanceof Uint32Array:
717
+ return 5125;
718
+ default:
719
+ return 5126;
720
+ }
721
+ }
722
+ getMinMax(data) {
723
+ const output = {
724
+ min: new Array(data.itemSize).fill(Number.POSITIVE_INFINITY),
725
+ max: new Array(data.itemSize).fill(Number.NEGATIVE_INFINITY)
726
+ };
727
+ for (let i = 0; i < data.count; i++) {
728
+ for (let a = 0; a < data.itemSize; a++) {
729
+ let value = 0;
730
+ if (data.itemSize > 4) {
731
+ // no support for interleaved data for itemSize > 4
732
+ value = data.array[i * data.itemSize + a];
733
+ }
734
+ else {
735
+ if (a === 0)
736
+ value = data.array[i * data.itemSize];
737
+ else if (a === 1)
738
+ value = data.array[i * data.itemSize + 1];
739
+ else if (a === 2)
740
+ value = data.array[i * data.itemSize + 2];
741
+ else if (a === 3)
742
+ value = data.array[i * data.itemSize + 3];
743
+ }
744
+ output.min[a] = Math.min(output.min[a], value);
745
+ output.max[a] = Math.max(output.max[a], value);
746
+ }
747
+ }
748
+ return output;
749
+ }
750
+ getPaddedArrayBuffer(arrayBuffer, paddingByte = 0) {
751
+ const paddedLength = Math.ceil(arrayBuffer.byteLength / 4) * 4;
752
+ if (paddedLength !== arrayBuffer.byteLength) {
753
+ const array = new Uint8Array(paddedLength);
754
+ array.set(new Uint8Array(arrayBuffer));
755
+ if (paddingByte !== 0) {
756
+ for (let i = arrayBuffer.byteLength; i < paddedLength; i++) {
757
+ array[i] = paddingByte;
758
+ }
759
+ }
760
+ return array.buffer;
761
+ }
762
+ return arrayBuffer;
763
+ }
764
+ getType(itemSize) {
765
+ switch (itemSize) {
766
+ case 1:
767
+ return 'SCALAR';
768
+ case 2:
769
+ return 'VEC2';
770
+ case 3:
771
+ return 'VEC3';
772
+ case 4:
773
+ return 'VEC4';
774
+ case 9:
775
+ return 'MAT3';
776
+ case 18:
777
+ return 'MAT4';
778
+ default:
779
+ return 'VEC3';
780
+ }
781
+ }
782
+ reset() {
783
+ this._animations = [];
784
+ this._buffers = [];
785
+ this._byteOffset = 0;
786
+ this._content = {
787
+ asset: {
788
+ copyright: '2021 (c) ShapeDiver',
789
+ generator: 'ShapeDiverViewer@' + viewer_shared_build_data_1.build_data.build_version,
790
+ version: '2.0',
791
+ extensions: {}
792
+ },
793
+ };
794
+ this._extensionsRequired = [];
795
+ this._extensionsUsed = [];
796
+ this._imageCache = {};
797
+ this._nodes = [];
798
+ this._promises = [];
799
+ }
800
+ stringToArrayBuffer(text) {
801
+ if (window.TextEncoder !== undefined) {
802
+ return new TextEncoder().encode(text).buffer;
803
+ }
804
+ const array = new Uint8Array(new ArrayBuffer(text.length));
805
+ for (let i = 0, il = text.length; i < il; i++) {
806
+ const value = text.charCodeAt(i);
807
+ // Replacing multi-byte character with space(0x20).
808
+ array[i] = value > 0xFF ? 0x20 : value;
809
+ }
810
+ return array.buffer;
811
+ }
812
+ };
813
+ GLTFConverter = __decorate([
814
+ tsyringe_1.singleton(),
815
+ __metadata("design:paramtypes", [])
816
+ ], GLTFConverter);
817
+ exports.GLTFConverter = GLTFConverter;
818
+ //# sourceMappingURL=GLTFConverter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GLTFConverter.js","sourceRoot":"","sources":["../src/GLTFConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAiE;AACjE,iFAA8D;AAC9D,+EAA6E;AAC7E,uCAA+C;AAC/C,iGAgBoD;AACpD,yCAAgC;AAChC,yEAUwC;AACxC,6CAA8B;AAE9B,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,sDAAmC,CAAA;IACnC,8FAA2E,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AI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAEjC,mDAAmD;YACnD,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;SAC1C;QAED,OAAO,KAAK,CAAC,MAAM,CAAC;IACxB,CAAC;CAGJ,CAAA;AA/0BY,aAAa;IADzB,oBAAS,EAAE;;GACC,aAAa,CA+0BzB;AA/0BY,sCAAa"}
@@ -0,0 +1,3 @@
1
+ import { GLTFConverter } from './GLTFConverter';
2
+ export { GLTFConverter };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EACL,aAAa,EACd,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GLTFConverter = void 0;
4
+ const GLTFConverter_1 = require("./GLTFConverter");
5
+ Object.defineProperty(exports, "GLTFConverter", { enumerable: true, get: function () { return GLTFConverter_1.GLTFConverter; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAG7C,8FAHO,6BAAa,OAGP"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@shapediver/viewer.data-engine.gltf-converter",
3
+ "version": "1.12.5",
4
+ "description": "",
5
+ "keywords": [],
6
+ "author": "Michael Oppitz <michael@shapediver.com>",
7
+ "license": "polyform-noncommercial-1.0.0",
8
+ "main": "dist/index.js",
9
+ "directories": {
10
+ "test": "__tests__"
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/shapediver/Viewer.git"
21
+ },
22
+ "scripts": {
23
+ "test": "bash ../../scripts/test.sh",
24
+ "check": "tsc --noEmit",
25
+ "build": "bash ../../scripts/build.sh",
26
+ "build-watch": "bash ../../scripts/build-watch.sh",
27
+ "build-dep": "bash ../../scripts/build-dep.sh"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/shapediver/Viewer/issues"
31
+ },
32
+ "homepage": "https://github.com/shapediver/Viewer#readme",
33
+ "typings": "dist/index.d.ts",
34
+ "jest": {
35
+ "preset": "ts-jest",
36
+ "testEnvironment": "node"
37
+ },
38
+ "dependencies": {
39
+ "@shapediver/viewer.data-engine.shared-types": "1.12.4",
40
+ "@shapediver/viewer.shared.build-data": "1.12.4",
41
+ "@shapediver/viewer.shared.node-tree": "1.12.4",
42
+ "@shapediver/viewer.shared.services": "1.12.4",
43
+ "@shapediver/viewer.shared.types": "1.12.4",
44
+ "axios": "^0.21.1",
45
+ "gl-matrix": "3.3.0",
46
+ "three": "^0.132.2",
47
+ "tsyringe": "^4.5.0"
48
+ },
49
+ "gitHead": "21376d3133e04cec556c4c66641fad5a689acb47"
50
+ }