@shapediver/viewer.data-engine.tag3d-engine 3.5.1 → 3.5.3

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.
@@ -1,10 +1,32 @@
1
1
  import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
2
2
  import { ShapeDiverResponseOutputContent } from '@shapediver/sdk.geometry-api-sdk-v2';
3
+ /**
4
+ * The font info object contains the glb file path and the dimensions of the font.
5
+ *
6
+ * There can either be a single glb file for both ascii and non-ascii characters or separate glb files for each.
7
+ * The advantage of having separate glb files is that the ascii glb can be loaded once and the non-ascii glb can be loaded only when needed.
8
+ */
9
+ export declare type FontInfo = {
10
+ glb: string;
11
+ height: number;
12
+ width: number;
13
+ } | {
14
+ glb: {
15
+ ascii: string;
16
+ other: string;
17
+ };
18
+ height: number;
19
+ width: number;
20
+ };
3
21
  export declare class Tag3dEngine {
4
- private readonly _globalAccessObjects;
5
- private readonly _stateEngine;
22
+ private readonly _logger;
23
+ private static _asciiGlb;
24
+ private static _fontInfo;
6
25
  private static _instance;
26
+ private static _mainGlb;
27
+ private static _nonAsciiGlb;
7
28
  static get instance(): Tag3dEngine;
29
+ static setFontInfo(fontInfo: FontInfo): void;
8
30
  /**
9
31
  * Load the tag3d content into a scene graph node.
10
32
  *
@@ -12,5 +34,16 @@ export declare class Tag3dEngine {
12
34
  * @returns the scene graph node
13
35
  */
14
36
  loadContent(content: ShapeDiverResponseOutputContent): Promise<ITreeNode>;
37
+ /**
38
+ * Load the tag 3d content into separate characters.
39
+ * For each character, a node is created and the character is added as a geometry data object.
40
+ * The nodes are then added to a dictionary with the character as the key.
41
+ *
42
+ * Instance matrices are provided depending on the number of instances of the character.
43
+ *
44
+ * @param tag3dInfo
45
+ * @returns
46
+ */
47
+ private loadTag;
15
48
  }
16
49
  //# sourceMappingURL=Tag3dEngine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag3dEngine.d.ts","sourceRoot":"","sources":["../src/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QAAQ,EAAE,QAAQ;IAW5C;;;;;OAKG;IACU,WAAW,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,SAAS,CAAC;IA6FtF;;;;;;;;;OASG;YACW,OAAO;CAmKxB"}
@@ -11,22 +11,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Tag3dEngine = void 0;
13
13
  const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
14
- const viewer_shared_global_access_objects_1 = require("@shapediver/viewer.shared.global-access-objects");
15
14
  const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
16
15
  const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
16
+ const viewer_data_engine_geometry_engine_1 = require("@shapediver/viewer.data-engine.geometry-engine");
17
+ const gl_matrix_1 = require("gl-matrix");
18
+ // #endregion Type aliases (1)
19
+ // #region Classes (1)
17
20
  class Tag3dEngine {
18
21
  constructor() {
19
- // #region Properties (3)
20
- this._globalAccessObjects = viewer_shared_global_access_objects_1.GlobalAccessObjects.instance;
21
- this._stateEngine = viewer_shared_services_1.StateEngine.instance;
22
- // #endregion Public Methods (1)
22
+ // #region Properties (6)
23
+ this._logger = viewer_shared_services_1.Logger.instance;
24
+ // #endregion Private Methods (1)
23
25
  }
24
- // #endregion Properties (3)
26
+ // #endregion Properties (6)
25
27
  // #region Public Static Getters And Setters (1)
26
28
  static get instance() {
27
29
  return this._instance || (this._instance = new this());
28
30
  }
29
31
  // #endregion Public Static Getters And Setters (1)
32
+ // #region Public Static Methods (1)
33
+ static setFontInfo(fontInfo) {
34
+ this._fontInfo = fontInfo;
35
+ this._mainGlb = undefined;
36
+ this._asciiGlb = undefined;
37
+ this._nonAsciiGlb = undefined;
38
+ }
39
+ // #endregion Public Static Methods (1)
30
40
  // #region Public Methods (1)
31
41
  /**
32
42
  * Load the tag3d content into a scene graph node.
@@ -39,23 +49,72 @@ class Tag3dEngine {
39
49
  const node = new viewer_shared_node_tree_1.TreeNode('tag3d');
40
50
  if (!content)
41
51
  throw new viewer_shared_services_1.ShapeDiverViewerDataProcessingError('Tag3dEngine.loadContent: Invalid content was provided to tag3d engine.');
52
+ if (typeof Tag3dEngine._fontInfo.glb === 'string') {
53
+ // if there is a single glb for both ascii and non-ascii characters defined
54
+ // but the glb has not been loaded yet, we load it now
55
+ if (!Tag3dEngine._mainGlb) {
56
+ const geometryEngine = viewer_data_engine_geometry_engine_1.GeometryEngine.instance;
57
+ Tag3dEngine._mainGlb = yield geometryEngine.loadContent({
58
+ href: Tag3dEngine._fontInfo.glb,
59
+ format: 'glb'
60
+ }, 'Tag3dEngine.loadContent');
61
+ }
62
+ }
63
+ else {
64
+ // if there are separate glbs for ascii and non-ascii characters defined
65
+ // but the glb for ascii has not been loaded yet, we load it now
66
+ // the glb for non-ascii characters is loaded when the character is encountered
67
+ if (!Tag3dEngine._asciiGlb) {
68
+ const geometryEngine = viewer_data_engine_geometry_engine_1.GeometryEngine.instance;
69
+ Tag3dEngine._asciiGlb = yield geometryEngine.loadContent({
70
+ href: Tag3dEngine._fontInfo.glb.ascii,
71
+ format: 'glb'
72
+ }, 'Tag3dEngine.loadContent');
73
+ }
74
+ }
42
75
  if (content.data && Array.isArray(content.data)) {
43
- if (this._globalAccessObjects.loadTag3D) {
44
- for (let i = 0; i < content.data.length; i++) {
45
- const tag3dInfo = content.data[i];
46
- const child = this._globalAccessObjects.loadTag3D(tag3dInfo);
47
- if (child)
48
- node.addChild(child);
49
- }
76
+ const textTagDictionary = {};
77
+ const dictionaryPromises = [];
78
+ for (let i = 0; i < content.data.length; i++) {
79
+ const tag3dInfo = content.data[i];
80
+ const dictionary = this.loadTag(tag3dInfo);
81
+ if (dictionary)
82
+ dictionaryPromises.push(dictionary);
50
83
  }
51
- else {
52
- const customData = new viewer_shared_types_1.CustomData({});
53
- for (let i = 0; i < content.data.length; i++) {
54
- const tag3dInfo = content.data[i];
55
- customData.data['tag3d_' + tag3dInfo.version] = tag3dInfo;
84
+ yield Promise.all(dictionaryPromises).then((dictionaries) => {
85
+ for (const dictionary of dictionaries) {
86
+ for (const key in dictionary) {
87
+ if (textTagDictionary[key] === undefined) {
88
+ textTagDictionary[key] = dictionary[key];
89
+ }
90
+ else {
91
+ textTagDictionary[key].transformations.push(...dictionary[key].transformations);
92
+ }
93
+ }
94
+ }
95
+ });
96
+ const tag3dNode = new viewer_shared_node_tree_1.TreeNode('tag3dDictionary');
97
+ for (const key in textTagDictionary) {
98
+ const { characterNode, transformations } = textTagDictionary[key];
99
+ const meshNode = new viewer_shared_node_tree_1.TreeNode('mesh_' + key);
100
+ meshNode.addChild(characterNode);
101
+ if (transformations.length === 1) {
102
+ // there is only once instance of the character
103
+ // we add it as usual
104
+ meshNode.addTransformation({
105
+ id: 'tag3d_transformation',
106
+ matrix: transformations[0]
107
+ });
108
+ }
109
+ else {
110
+ // there are multiple instances of the character
111
+ // we therefore create an instance matrices data object
112
+ const instanceData = new viewer_shared_types_1.InstanceMatricesData(transformations);
113
+ meshNode.addData(instanceData);
56
114
  }
57
- node.addData(customData);
115
+ tag3dNode.addChild(meshNode);
58
116
  }
117
+ node.addChild(tag3dNode);
59
118
  }
60
119
  else {
61
120
  throw new viewer_shared_services_1.ShapeDiverViewerDataProcessingError('Tag3dEngine.loadContent: No tag3d data was provided to tag3d engine.');
@@ -63,6 +122,157 @@ class Tag3dEngine {
63
122
  return node;
64
123
  });
65
124
  }
125
+ // #endregion Public Methods (1)
126
+ // #region Private Methods (1)
127
+ /**
128
+ * Load the tag 3d content into separate characters.
129
+ * For each character, a node is created and the character is added as a geometry data object.
130
+ * The nodes are then added to a dictionary with the character as the key.
131
+ *
132
+ * Instance matrices are provided depending on the number of instances of the character.
133
+ *
134
+ * @param tag3dInfo
135
+ * @returns
136
+ */
137
+ loadTag(tag3dInfo) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const characterGlb = Tag3dEngine._fontInfo.glb === 'string' ? Tag3dEngine._mainGlb : Tag3dEngine._asciiGlb;
140
+ const material = new viewer_shared_types_1.MaterialStandardData({ color: tag3dInfo.color, metalness: 0, roughness: 1 });
141
+ tag3dInfo.size = tag3dInfo.size ? +tag3dInfo.size : 1;
142
+ if (tag3dInfo.text === undefined || tag3dInfo.text === '' || /^[ \t\n\r]*$/.test(tag3dInfo.text))
143
+ return;
144
+ // split into lines
145
+ const lines = tag3dInfo.text.split(/\r\n|\r|\n/g);
146
+ // split into characters per line
147
+ const charactersPerLine = lines.map(line => line.split(''));
148
+ const characterWidth = Tag3dEngine._fontInfo.width / 1000;
149
+ const characterHeight = (Tag3dEngine._fontInfo.height / 1000) * 1.25;
150
+ let maxLineWidth = 0;
151
+ const maxLineHeight = characterHeight * charactersPerLine.length;
152
+ let lineHeight = -characterHeight;
153
+ const characterDictionary = {};
154
+ for (let i = 0; i < charactersPerLine.length; ++i) {
155
+ const characters = charactersPerLine[i];
156
+ if (characters.length === 0)
157
+ continue;
158
+ let lineWidth = 0;
159
+ // loop through characters in line
160
+ for (let j = 0; j < characters.length; ++j) {
161
+ const char = characters[j];
162
+ let nodesWithName = characterGlb.getNodesByName(char);
163
+ if (nodesWithName.length === 0) {
164
+ if (typeof Tag3dEngine._fontInfo.glb !== 'string') {
165
+ // if the character is not found in the ascii glb, try to load the non-ascii glb
166
+ // and search for the character there
167
+ if (!Tag3dEngine._nonAsciiGlb) {
168
+ const geometryEngine = viewer_data_engine_geometry_engine_1.GeometryEngine.instance;
169
+ Tag3dEngine._nonAsciiGlb = yield geometryEngine.loadContent({
170
+ href: Tag3dEngine._fontInfo.glb.other,
171
+ format: 'glb'
172
+ }, 'Tag3dEngine.loadContent');
173
+ }
174
+ nodesWithName = Tag3dEngine._nonAsciiGlb.getNodesByName(char);
175
+ }
176
+ }
177
+ if (nodesWithName.length !== 0) {
178
+ const transformationMatrix = gl_matrix_1.mat4.fromTranslation(gl_matrix_1.mat4.create(), gl_matrix_1.vec3.fromValues(lineWidth, lineHeight, 0));
179
+ if (characterDictionary[char] === undefined) {
180
+ // if the character does not exist yet, create it
181
+ const characterNode = new viewer_shared_node_tree_1.TreeNode(char);
182
+ nodesWithName.forEach(n => {
183
+ n.traverseData((data) => {
184
+ if (data instanceof viewer_shared_types_1.GeometryData) {
185
+ const clone = data.clone();
186
+ clone.material = material;
187
+ characterNode.addData(clone);
188
+ }
189
+ });
190
+ });
191
+ characterDictionary[char] = {
192
+ characterNode,
193
+ transformations: [transformationMatrix]
194
+ };
195
+ }
196
+ else {
197
+ // if the character already exists, add the transformation matrix to the list
198
+ characterDictionary[char].transformations.push(transformationMatrix);
199
+ }
200
+ }
201
+ else {
202
+ if (char !== ' ')
203
+ this._logger.warn(`Tag3dEngine.loadContent: Character ${char} not found in font.`);
204
+ }
205
+ lineWidth += characterWidth * tag3dInfo.size;
206
+ }
207
+ maxLineWidth = Math.max(maxLineWidth, lineWidth);
208
+ lineHeight -= characterHeight * tag3dInfo.size;
209
+ }
210
+ const tagJustTranslation = gl_matrix_1.vec3.create();
211
+ switch (tag3dInfo.justification) {
212
+ case 'TL':
213
+ break;
214
+ case 'TC':
215
+ tagJustTranslation[0] = -maxLineWidth * 0.5;
216
+ break;
217
+ case 'TR':
218
+ tagJustTranslation[0] = -maxLineWidth;
219
+ break;
220
+ case 'ML':
221
+ tagJustTranslation[1] = maxLineHeight * 0.5;
222
+ break;
223
+ case 'MC':
224
+ tagJustTranslation[0] = -maxLineWidth * 0.5;
225
+ tagJustTranslation[1] = maxLineHeight * 0.5;
226
+ break;
227
+ case 'MR':
228
+ tagJustTranslation[0] = -maxLineWidth;
229
+ tagJustTranslation[1] = maxLineHeight * 0.5;
230
+ break;
231
+ case 'BL':
232
+ tagJustTranslation[1] = maxLineHeight;
233
+ break;
234
+ case 'BC':
235
+ tagJustTranslation[0] = -maxLineWidth * 0.5;
236
+ tagJustTranslation[1] = maxLineHeight;
237
+ break;
238
+ case 'BR':
239
+ tagJustTranslation[0] = -maxLineWidth;
240
+ tagJustTranslation[1] = maxLineHeight;
241
+ break;
242
+ }
243
+ const tagJustTranslationMatrix = gl_matrix_1.mat4.fromTranslation(gl_matrix_1.mat4.create(), tagJustTranslation);
244
+ const scalingMatrix = gl_matrix_1.mat4.fromScaling(gl_matrix_1.mat4.create(), gl_matrix_1.vec3.fromValues(tag3dInfo.size, tag3dInfo.size, tag3dInfo.size));
245
+ const rotationMatrix = gl_matrix_1.mat4.create();
246
+ const translationMatrix = gl_matrix_1.mat4.create();
247
+ if (tag3dInfo.location.xAxis !== undefined) {
248
+ gl_matrix_1.mat4.set(rotationMatrix, tag3dInfo.location.xAxis.X, tag3dInfo.location.xAxis.Y, tag3dInfo.location.xAxis.Z, 0, tag3dInfo.location.yAxis.X, tag3dInfo.location.yAxis.Y, tag3dInfo.location.yAxis.Z, 0, tag3dInfo.location.normal.X, tag3dInfo.location.normal.Y, tag3dInfo.location.normal.Z, 0, 0, 0, 0, 1);
249
+ gl_matrix_1.mat4.fromTranslation(translationMatrix, gl_matrix_1.vec3.fromValues(tag3dInfo.location.origin.X, tag3dInfo.location.origin.Y, tag3dInfo.location.origin.Z));
250
+ }
251
+ // add the justifications to the characters
252
+ Object.values(characterDictionary).forEach(character => {
253
+ character.transformations.forEach(transformation => {
254
+ // apply the justification translation
255
+ gl_matrix_1.mat4.multiply(transformation, transformation, tagJustTranslationMatrix);
256
+ // apply the scaling matrix
257
+ gl_matrix_1.mat4.multiply(transformation, transformation, scalingMatrix);
258
+ // apply the global rotation matrix
259
+ gl_matrix_1.mat4.multiply(transformation, rotationMatrix, transformation);
260
+ // apply the global translation matrix
261
+ gl_matrix_1.mat4.multiply(transformation, translationMatrix, transformation);
262
+ });
263
+ });
264
+ return characterDictionary;
265
+ });
266
+ }
66
267
  }
67
268
  exports.Tag3dEngine = Tag3dEngine;
269
+ Tag3dEngine._fontInfo = {
270
+ glb: {
271
+ ascii: 'https://viewer.shapediver.com/v3/gltf/tag3dASCII.glb',
272
+ other: 'https://viewer.shapediver.com/v3/gltf/tag3dNonASCII.glb'
273
+ },
274
+ height: 1467,
275
+ width: 833
276
+ };
277
+ // #endregion Classes (1)
68
278
  //# sourceMappingURL=Tag3dEngine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag3dEngine.js","sourceRoot":"","sources":["../src/Tag3dEngine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAA6D;AAC7D,yGAAsF;AAEtF,iFAA0E;AAE1E,+EAAsG;AAEtG,MAAa,WAAW;IAAxB;QACI,yBAAyB;QAER,yBAAoB,GAAwB,yDAAmB,CAAC,QAAQ,CAAC;QACzE,iBAAY,GAAgB,oCAAW,CAAC,QAAQ,CAAC;QAiDlE,gCAAgC;IACpC,CAAC;IA9CG,4BAA4B;IAE5B,gDAAgD;IAEzC,MAAM,KAAK,QAAQ;QACtB,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,mDAAmD;IAEnD,6BAA6B;IAE7B;;;;;OAKG;IACU,WAAW,CAAC,OAAwC;;YAC7D,MAAM,IAAI,GAAG,IAAI,kCAAQ,CAAC,OAAO,CAAC,CAAC;YAEnC,IAAI,CAAC,OAAO;gBACR,MAAM,IAAI,4DAAmC,CAAC,wEAAwE,CAAC,CAAC;YAE5H,IAAI,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC7C,IAAI,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE;oBACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC1C,MAAM,SAAS,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;wBAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;wBAC7D,I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,CAAC,iBAAiB,EAAE,gBAAI,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;aACnJ;YAED,2CAA2C;YAC3C,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBACnD,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;oBAC/C,sCAAsC;oBACtC,gBAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,wBAAwB,CAAC,CAAC;oBACxE,2BAA2B;oBAC3B,gBAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;oBAC7D,mCAAmC;oBACnC,gBAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;oBAC9D,sCAAsC;oBACtC,gBAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;gBACrE,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YAEH,OAAO,mBAAmB,CAAC;QAC/B,CAAC;KAAA;;AAtTL,kCAyTC;AAnTkB,qBAAS,GAAa;IACjC,GAAG,EAAE;QACD,KAAK,EAAE,sDAAsD;QAC7D,KAAK,EAAE,yDAAyD;KACnE;IACD,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,GAAG;CACb,CAAC;AA8SN,yBAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/viewer.data-engine.tag3d-engine",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "Michael Oppitz <michael@shapediver.com>",
@@ -38,12 +38,13 @@
38
38
  "testEnvironment": "node"
39
39
  },
40
40
  "dependencies": {
41
- "@shapediver/sdk.geometry-api-sdk-v2": "1.12.1",
42
- "@shapediver/viewer.data-engine.shared-types": "3.5.1",
43
- "@shapediver/viewer.shared.global-access-objects": "3.5.1",
44
- "@shapediver/viewer.shared.node-tree": "3.5.1",
45
- "@shapediver/viewer.shared.services": "3.5.1",
46
- "@shapediver/viewer.shared.types": "3.5.1"
41
+ "@shapediver/sdk.geometry-api-sdk-v2": "1.12.2",
42
+ "@shapediver/viewer.data-engine.geometry-engine": "3.5.3",
43
+ "@shapediver/viewer.data-engine.shared-types": "3.5.3",
44
+ "@shapediver/viewer.shared.global-access-objects": "3.5.3",
45
+ "@shapediver/viewer.shared.node-tree": "3.5.3",
46
+ "@shapediver/viewer.shared.services": "3.5.3",
47
+ "@shapediver/viewer.shared.types": "3.5.3"
47
48
  },
48
- "gitHead": "e0dca9d16a70198ada9e5b8681feaaf1af577746"
49
+ "gitHead": "b1bc8787be49ae7457f039df05b3c4013d365370"
49
50
  }