zincjs 1.0.13 → 1.0.15

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.
Files changed (45) hide show
  1. package/build/zinc.frontend.js +1 -1
  2. package/build/zinc.js +43 -35
  3. package/build/zinc.js.map +1 -1
  4. package/package.json +3 -3
  5. package/src/assets/disc.png +0 -0
  6. package/src/assets/mapMarker.svg +11 -0
  7. package/src/controls.js +1594 -0
  8. package/src/geometryCSG.js +148 -0
  9. package/src/glyphsetCSG.js +84 -0
  10. package/src/loaders/GLTFToZincJSLoader.js +85 -0
  11. package/src/loaders/JSONLoader.js +697 -0
  12. package/src/loaders/OBJLoader.js +911 -0
  13. package/src/loaders/STLLoader.js +399 -0
  14. package/src/loaders/primitivesLoader.js +46 -0
  15. package/src/minimap.js +82 -0
  16. package/src/primitives/augmentShader.js +22 -0
  17. package/src/primitives/geometry.js +109 -0
  18. package/src/primitives/glyph.js +150 -0
  19. package/src/primitives/glyphset.js +657 -0
  20. package/src/primitives/label.js +51 -0
  21. package/src/primitives/lines.js +35 -0
  22. package/src/primitives/marker.js +88 -0
  23. package/src/primitives/pointset.js +53 -0
  24. package/src/primitives/texturePrimitive.js +16 -0
  25. package/src/primitives/textureSlides.js +118 -0
  26. package/src/primitives/zincObject.js +573 -0
  27. package/src/region.js +554 -0
  28. package/src/renderer.js +612 -0
  29. package/src/scene.js +963 -0
  30. package/src/sceneExporter.js +32 -0
  31. package/src/sceneLoader.js +842 -0
  32. package/src/texture/texture.js +57 -0
  33. package/src/texture/textureArray.js +85 -0
  34. package/src/three/GLTFExporter.js +2448 -0
  35. package/src/three/Geometry.js +2084 -0
  36. package/src/three/Loader.js +344 -0
  37. package/src/three/Points.js +223 -0
  38. package/src/three/line/Line.js +293 -0
  39. package/src/three/line/LineSegments.js +65 -0
  40. package/src/three-js-csg.js +564 -0
  41. package/src/utilities.js +321 -0
  42. package/src/videoHandler.js +92 -0
  43. package/src/workers/geometryCSG.worker.js +73 -0
  44. package/src/workers/geometryCSGInternal.js +58 -0
  45. package/src/zinc.js +38 -0
@@ -0,0 +1,573 @@
1
+ const THREE = require('three');
2
+ const THREEGeometry = require('../three/Geometry').Geometry;
3
+
4
+ const ZincObject = function() {
5
+ this.isZincObject = true;
6
+ this.geometry = undefined;
7
+ // THREE.Mesh
8
+ this.morph = undefined;
9
+ // THREE.Mesh - for utilities purpose such as rendering
10
+ // transparent surfaces - one for front face and one for back face.
11
+ this.secondaryMesh = undefined;
12
+ /**
13
+ * Groupname given to this geometry.
14
+ */
15
+ this.groupName = undefined;
16
+ this.timeEnabled = false;
17
+ this.morphColour = false;
18
+ this.inbuildTime = 0;
19
+ this.mixer = undefined;
20
+ this.animationGroup = undefined;
21
+ /**
22
+ * Total duration of the animation, this value interacts with the
23
+ * {@link Zinc.Renderer#playRate} to produce the actual duration of the
24
+ * animation. Actual time in second = duration / playRate.
25
+ */
26
+ this.duration = 6000;
27
+ this.clipAction = undefined;
28
+ this.userData = {};
29
+ this.videoHandler = undefined;
30
+ this.marker = undefined;
31
+ this.markerUpdateRequired = true;
32
+ this.closestVertexIndex = -1;
33
+ this.boundingBoxUpdateRequired = true;
34
+ this.cachedBoundingBox = new THREE.Box3();
35
+ this._vertex = new THREE.Vector3();
36
+ this.anatomicalId = undefined;
37
+ this.region = undefined;
38
+ this.animationClip = undefined;
39
+ }
40
+
41
+ ZincObject.prototype.setDuration = function(durationIn) {
42
+ this.duration = durationIn;
43
+ if (this.clipAction) {
44
+ this.clipAction.setDuration(this.duration);
45
+ }
46
+ }
47
+
48
+ ZincObject.prototype.getDuration = function() {
49
+ return this.duration;
50
+ }
51
+
52
+ ZincObject.prototype.setRegion = function(region) {
53
+ this.region = region;
54
+ }
55
+
56
+ ZincObject.prototype.getRegion = function() {
57
+ return this.region;
58
+ }
59
+
60
+ ZincObject.prototype.toBufferGeometry = function(geometryIn, options) {
61
+ let geometry = undefined;
62
+ if (geometryIn instanceof THREEGeometry) {
63
+ if (options.localTimeEnabled && !geometryIn.morphNormalsReady &&
64
+ (geometryIn.morphNormals == undefined || geometryIn.morphNormals.length == 0))
65
+ geometryIn.computeMorphNormals();
66
+ geometry = geometryIn.toIndexedBufferGeometry();
67
+ if (options.localMorphColour) {
68
+ require("../utilities").copyMorphColorsToIndexedBufferGeometry(geometryIn, geometry);
69
+ }
70
+ } else if (geometryIn instanceof THREE.BufferGeometry) {
71
+ geometry = geometryIn.clone();
72
+ }
73
+ geometry.colorsNeedUpdate = true;
74
+ geometry.computeBoundingBox();
75
+ geometry.computeBoundingSphere();
76
+ if (geometryIn._video)
77
+ geometry._video = geometryIn._video;
78
+ return geometry;
79
+ }
80
+
81
+ ZincObject.prototype.checkAndCreateTransparentMesh = function(options) {
82
+ if (this.isGeometry && this.morph.material && this.morph.material.transparent) {
83
+ if (!this.secondaryMesh) {
84
+ let secondaryMaterial = this.morph.material.clone();
85
+ secondaryMaterial.side = THREE.FrontSide;
86
+ this.secondaryMesh = new THREE.Mesh(this.morph.geometry, secondaryMaterial);
87
+ this.secondaryMesh.renderOrder = this.morph.renderOrder + 1;
88
+ this.secondaryMesh.userData = this;
89
+ this.secondaryMesh.name = this.groupName;
90
+ }
91
+ this.morph.material.side = THREE.BackSide;
92
+ this.morph.material.needsUpdate = true;
93
+ this.morph.add(this.secondaryMesh);
94
+ this.animationGroup.add(this.secondaryMesh);
95
+ }
96
+ }
97
+
98
+ ZincObject.prototype.checkAndRemoveTransparentMesh = function() {
99
+ if (this.isGeometry && this.secondaryMesh) {
100
+ this.morph.remove(this.secondaryMesh);
101
+ this.animationGroup.uncache(this.secondaryMesh);
102
+ this.animationGroup.remove(this.secondaryMesh);
103
+ }
104
+ this.morph.material.side = THREE.DoubleSide;
105
+ }
106
+
107
+ ZincObject.prototype.setMesh = function(mesh, localTimeEnabled, localMorphColour) {
108
+ this.animationGroup = new THREE.AnimationObjectGroup(mesh);
109
+ this.mixer = new THREE.AnimationMixer(this.animationGroup);
110
+ this.geometry = mesh.geometry;
111
+ this.clipAction = undefined;
112
+ if (this.geometry && this.geometry.morphAttributes) {
113
+ let morphAttribute = this.geometry.morphAttributes.position;
114
+ if (!morphAttribute) {
115
+ morphAttribute = this.geometry.morphAttributes.color ?
116
+ this.geometry.morphAttributes.color :
117
+ this.geometry.morphAttributes.normal;
118
+ }
119
+ if (morphAttribute) {
120
+ this.animationClip = THREE.AnimationClip.CreateClipsFromMorphTargetSequences(
121
+ morphAttribute, 10, true);
122
+ if (this.animationClip && (this.animationClip[0] != undefined)) {
123
+ this.clipAction = this.mixer.clipAction(this.animationClip[0]).setDuration(
124
+ this.duration);
125
+ this.clipAction.loop = THREE.loopOnce;
126
+ this.clipAction.clampWhenFinished = true;
127
+ this.clipAction.play();
128
+ }
129
+ }
130
+ }
131
+ this.timeEnabled = localTimeEnabled;
132
+ this.morphColour = localMorphColour;
133
+ this.morph = mesh;
134
+ this.morph.userData = this;
135
+ this.morph.matrixAutoUpdate = false;
136
+ this.checkAndCreateTransparentMesh();
137
+ if (this.timeEnabled) {
138
+ this.setFrustumCulled(false);
139
+ } else {
140
+ if (this.morphColour) {
141
+ this.geometry.setAttribute('morphTarget0', this.geometry.getAttribute( 'position' ) );
142
+ this.geometry.setAttribute('morphTarget1', this.geometry.getAttribute( 'position' ) );
143
+ }
144
+ }
145
+ this.boundingBoxUpdateRequired = true;
146
+ }
147
+
148
+ ZincObject.prototype.setName = function(groupNameIn) {
149
+ this.groupName = groupNameIn;
150
+ if (this.morph) {
151
+ this.morph.name = this.groupName;
152
+ }
153
+ if (this.secondaryMesh) {
154
+ this.secondaryMesh.name = this.groupName;
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Get the local time of this geometry, it returns a value between
160
+ * 0 and the duration.
161
+ *
162
+ * @return {Number}
163
+ */
164
+ ZincObject.prototype.getCurrentTime = function() {
165
+ if (this.clipAction) {
166
+ const ratio = this.clipAction.time / this.clipAction._clip.duration;
167
+ return this.duration * ratio;
168
+ } else {
169
+ return this.inbuildTime;
170
+ }
171
+ }
172
+
173
+ const updateMorphColorAttribute = function(targetGeometry, morph) {
174
+ if (morph && targetGeometry && targetGeometry.morphAttributes &&
175
+ targetGeometry.morphAttributes[ "color" ]) {
176
+ const morphColors = targetGeometry.morphAttributes[ "color" ];
177
+ const influences = morph.morphTargetInfluences;
178
+ const length = influences.length;
179
+ targetGeometry.deleteAttribute( 'morphColor0' );
180
+ targetGeometry.deleteAttribute( 'morphColor1' );
181
+ let bound = 0;
182
+ let morphArray = [];
183
+ for (let i = 0; (1 > bound) || (i < length); i++) {
184
+ if (influences[i] > 0) {
185
+ bound++;
186
+ morphArray.push([i, influences[i]]);
187
+ }
188
+ }
189
+ if (morphArray.length == 2) {
190
+ targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );
191
+ targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[1][0] ] );
192
+ } else if (morphArray.length == 1) {
193
+ targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );
194
+ targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[0][0] ] );
195
+ }
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Set the local time of this geometry.
201
+ *
202
+ * @param {Number} time - Can be any value between 0 to duration.
203
+ */
204
+ ZincObject.prototype.setMorphTime = function(time) {
205
+ let timeChanged = false;
206
+ if (this.clipAction) {
207
+ const ratio = time / this.duration;
208
+ const actualDuration = this.clipAction._clip.duration;
209
+ let newTime = ratio * actualDuration;
210
+ if (newTime != this.clipAction.time) {
211
+ this.clipAction.time = newTime;
212
+ timeChanged = true;
213
+ }
214
+ if (timeChanged && this.isTimeVarying()) {
215
+ this.mixer.update( 0.0 );
216
+ }
217
+ } else {
218
+ let newTime = time;
219
+ if (time > this.duration)
220
+ newTime = this.duration;
221
+ else if (0 > time)
222
+ newTime = 0;
223
+ else
224
+ newTime = time;
225
+ if (newTime != this.inbuildTime) {
226
+ this.inbuildTime = newTime;
227
+ timeChanged = true;
228
+ }
229
+ }
230
+ if (timeChanged) {
231
+ this.boundingBoxUpdateRequired = true;
232
+ updateMorphColorAttribute(this.geometry, this.morph);
233
+ if (this.timeEnabled)
234
+ this.markerUpdateRequired = true;
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Check if the geometry is time varying.
240
+ *
241
+ * @return {Boolean}
242
+ */
243
+ ZincObject.prototype.isTimeVarying = function() {
244
+ if (this.timeEnabled || this.morphColour)
245
+ return true;
246
+ return false;
247
+ }
248
+
249
+ /**
250
+ * Get the visibility of this Geometry.
251
+ *
252
+ */
253
+ ZincObject.prototype.getVisibility = function() {
254
+ return this.morph.visible;
255
+ }
256
+
257
+ /**
258
+ * Set the visibility of this Geometry.
259
+ *
260
+ * @param {Boolean} visible - a boolean flag indicate the visibility to be set
261
+ */
262
+ ZincObject.prototype.setVisibility = function(visible) {
263
+ if (this.morph.visible !== visible) {
264
+ this.morph.visible = visible;
265
+ if (this.region) this.region.pickableUpdateRequired = true;
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Set the opacity of this Geometry. This function will also set the isTransparent
271
+ * flag according to the provided alpha value.
272
+ *
273
+ * @param {Number} alpah - Alpha value to set for this geometry,
274
+ * can be any value between from 0 to 1.0.
275
+ */
276
+ ZincObject.prototype.setAlpha = function(alpha) {
277
+ const material = this.morph.material;
278
+ let isTransparent = false;
279
+ if (alpha < 1.0)
280
+ isTransparent = true;
281
+ let transparentChanged = material.transparent == isTransparent ? false : true;
282
+ material.opacity = alpha;
283
+ material.transparent = isTransparent;
284
+ if (transparentChanged)
285
+ if (isTransparent)
286
+ this.checkAndCreateTransparentMesh();
287
+ else
288
+ this.checkAndRemoveTransparentMesh();
289
+ if (this.secondaryMesh && this.secondaryMesh.material)
290
+ this.secondaryMesh.material.opacity = alpha;
291
+ }
292
+
293
+ ZincObject.prototype.setFrustumCulled = function(flag) {
294
+ if (this.morph) {
295
+ this.morph.frustumCulled = flag;
296
+ }
297
+ }
298
+
299
+ ZincObject.prototype.setVertexColors = function(vertexColors) {
300
+ this.morph.material.vertexColors = vertexColors;
301
+ this.geometry.colorsNeedUpdate = true;
302
+ if (this.secondaryMesh && this.secondaryMesh.material)
303
+ this.secondaryMesh.material.vertexColors = vertexColors;
304
+ }
305
+
306
+ /**
307
+ * Set the colour of the geometry.
308
+ *
309
+ * @param {THREE.Color} colour - Colour to be set for this geometry.
310
+ */
311
+ ZincObject.prototype.getColour = function(colour) {
312
+ if (this.morph && this.morph.material)
313
+ return this.morph.material.color;
314
+ return undefined;
315
+ }
316
+
317
+ /**
318
+ * Set the colour of the geometry.
319
+ *
320
+ * @param {THREE.Color} colour - Colour to be set for this geometry.
321
+ */
322
+ ZincObject.prototype.setColour = function(colour) {
323
+ this.morph.material.color = colour;
324
+ if (this.secondaryMesh && this.secondaryMesh.material)
325
+ this.secondaryMesh.material.color = colour;
326
+ this.geometry.colorsNeedUpdate = true;
327
+ }
328
+
329
+ ZincObject.prototype.getColourHex = function() {
330
+ if (!this.morphColour) {
331
+ if (this.morph && this.morph.material && this.morph.material.color)
332
+ return this.morph.material.color.getHexString();
333
+ }
334
+ return undefined;
335
+ }
336
+
337
+ ZincObject.prototype.setColourHex = function(hex) {
338
+ this.morph.material.color.setHex(hex);
339
+ if (this.secondaryMesh && this.secondaryMesh.material)
340
+ this.secondaryMesh.material.color.setHex(hex);
341
+ }
342
+
343
+ /**
344
+ * Set the material of the geometry.
345
+ *
346
+ * @param {THREE.Material} material - Material to be set for this geometry.
347
+ */
348
+ ZincObject.prototype.setMaterial = function(material) {
349
+ this.morph.material = material;
350
+ this.geometry.colorsNeedUpdate = true;
351
+ if (this.secondaryMesh && this.secondaryMesh.material) {
352
+ this.secondaryMesh.material.dispose();
353
+ this.secondaryMesh.material = material.clone()
354
+ this.secondaryMesh.material.side = THREE.FrontSide;
355
+ }
356
+ }
357
+
358
+ /**
359
+ * Get the index of the closest vertex to centroid.
360
+ */
361
+ ZincObject.prototype.getClosestVertexIndex = function() {
362
+ let closestIndex = -1;
363
+ if (this.morph) {
364
+ let position = this.morph.geometry.attributes.position;
365
+ let boundingBox = new THREE.Box3().setFromBufferAttribute(position);
366
+ let center = new THREE.Vector3();
367
+ boundingBox.getCenter(center);
368
+ if (position && boundingBox) {
369
+ let distance = -1;
370
+ let currentDistance = 0;
371
+ let current = new THREE.Vector3();
372
+ for (let i = 0; i < position.count; i++) {
373
+ current.fromArray(position.array, i * 3);
374
+ currentDistance = current.distanceTo(center);
375
+ if (distance == -1)
376
+ distance = currentDistance;
377
+ else if (distance > (currentDistance)) {
378
+ distance = currentDistance;
379
+ closestIndex = i;
380
+ }
381
+ }
382
+ }
383
+ }
384
+ return closestIndex;
385
+ }
386
+
387
+ /**
388
+ * Get the closest vertex to centroid.
389
+ */
390
+ ZincObject.prototype.getClosestVertex = function() {
391
+ let position = new THREE.Vector3();
392
+ if (this.closestVertexIndex == -1) {
393
+ this.closestVertexIndex = this.getClosestVertexIndex();
394
+ }
395
+ if (this.closestVertexIndex >= 0) {
396
+ let influences = this.morph.morphTargetInfluences;
397
+ let attributes = this.morph.geometry.morphAttributes;
398
+ if (influences && attributes && attributes.position) {
399
+ let found = false;
400
+ for (let i = 0; i < influences.length; i++) {
401
+ if (influences[i] > 0) {
402
+ found = true;
403
+ this._vertex.fromArray(
404
+ attributes.position[i].array, this.closestVertexIndex * 3);
405
+ position.add(this._vertex.multiplyScalar(influences[i]));
406
+ }
407
+ }
408
+ if (found)
409
+ return position;
410
+ } else {
411
+ position.fromArray(this.morph.geometry.attributes.position.array,
412
+ this.closestVertexIndex * 3);
413
+ return position;
414
+ }
415
+ }
416
+ this.getBoundingBox().getCenter(position);
417
+ return position;
418
+ }
419
+
420
+ /**
421
+ * Get the bounding box of this geometry.
422
+ *
423
+ * @return {THREE.Box3}.
424
+ */
425
+ ZincObject.prototype.getBoundingBox = function() {
426
+ if (this.morph && this.morph.visible) {
427
+ if (this.boundingBoxUpdateRequired) {
428
+ let influences = this.morph.morphTargetInfluences;
429
+ let attributes = undefined;
430
+ if (this.morph.geometry)
431
+ attributes = this.morph.geometry.morphAttributes;
432
+ let found = false;
433
+ if (influences && attributes && attributes.position) {
434
+ let min = new THREE.Vector3();
435
+ let max = new THREE.Vector3();
436
+ let box = new THREE.Box3();
437
+ for (let i = 0; i < influences.length; i++) {
438
+ if (influences[i] > 0) {
439
+ found = true;
440
+ box.setFromArray(attributes.position[i].array);
441
+ min.add(box.min.multiplyScalar(influences[i]));
442
+ max.add(box.max.multiplyScalar(influences[i]));
443
+ }
444
+ }
445
+ if (found)
446
+ this.cachedBoundingBox.set(min, max);
447
+ }
448
+ if (!found)
449
+ this.cachedBoundingBox.setFromBufferAttribute(
450
+ this.morph.geometry.attributes.position);
451
+ this.boundingBoxUpdateRequired = false;
452
+ }
453
+ return this.cachedBoundingBox;
454
+ }
455
+ return undefined;
456
+ }
457
+
458
+ /**
459
+ * Clear this geometry and free the memory.
460
+ */
461
+ ZincObject.prototype.dispose = function() {
462
+ if (this.morph && this.morph.geometry)
463
+ this.morph.geometry.dispose();
464
+ if (this.morph && this.morph.material)
465
+ this.morph.material.dispose();
466
+ if (this.secondaryMesh && this.secondaryMesh.material)
467
+ this.secondaryMesh.material.dispose();
468
+ if (this.geometry)
469
+ this.geometry.dispose();
470
+ this.animationGroup = undefined;
471
+ this.mixer = undefined;
472
+ this.morph = undefined;
473
+ this.clipAction = undefined;
474
+ this.groupName = undefined;
475
+ }
476
+
477
+ ZincObject.prototype.updateMarker = function(playAnimation, options) {
478
+ if ((playAnimation == false) &&
479
+ (options && options.displayMarkers))
480
+ {
481
+ if (this.groupName) {
482
+ if (!this.marker) {
483
+ this.marker = new (require("./marker").Marker)(this);
484
+ this.markerUpdateRequired = true;
485
+ }
486
+ if (this.markerUpdateRequired) {
487
+ let position = this.getClosestVertex();
488
+ if (position) {
489
+ this.marker.setPosition(position.x, position.y, position.z);
490
+ this.markerUpdateRequired = false;
491
+ }
492
+ }
493
+ if (options && options.camera && options.markerDepths) {
494
+ options.markerDepths.push(
495
+ this.marker.updateNDC(options.camera.cameraObject));
496
+ }
497
+ if (!this.marker.isEnabled()) {
498
+ this.marker.enable();
499
+ this.morph.add(this.marker.morph);
500
+ }
501
+ }
502
+ } else {
503
+ if (this.marker && this.marker.isEnabled()) {
504
+ this.marker.disable();
505
+ this.morph.remove(this.marker.morph);
506
+ }
507
+ this.markerUpdateRequired = true;
508
+ }
509
+ }
510
+
511
+ ZincObject.prototype.processMarkerVisual = function(min, max) {
512
+ if (this.marker && this.marker.isEnabled()) {
513
+ this.marker.updateVisual(min, max);
514
+ }
515
+ }
516
+
517
+ ZincObject.prototype.initiateMorphColor = function() {
518
+ if ((this.morphColour == 1) && (typeof this.geometry !== "undefined") &&
519
+ ((this.morph.material.vertexColors == THREE.VertexColors) ||
520
+ (this.morph.material.vertexColors == true))) {
521
+ updateMorphColorAttribute(this.geometry, this.morph);
522
+ }
523
+ }
524
+
525
+ ZincObject.prototype.setRenderOrder = function(renderOrder) {
526
+ if (this.morph && (renderOrder !== undefined)) {
527
+ this.morph.renderOrder = renderOrder;
528
+ if (this.secondaryMesh)
529
+ this.secondaryMesh.renderOrder = this.morph.renderOrder + 1;
530
+ }
531
+ }
532
+
533
+ ZincObject.prototype.getClosestVertexDOMElementCoords = function(scene) {
534
+ if (scene && scene.camera) {
535
+ let inView = true;
536
+ const position = this.getClosestVertex();
537
+ position.project(scene.camera);
538
+ position.z = Math.min(Math.max(position.z, 0), 1);
539
+ if (position.x > 1 || position.x < -1 || position.y > 1 || position.y < -1) {
540
+ inView = false;
541
+ }
542
+ scene.getZincCameraControls().getRelativeCoordsFromNDC(position.x, position.y, position);
543
+ return {position, inView};
544
+ } else {
545
+ return undefined;
546
+ }
547
+ }
548
+
549
+ //Update the geometry and colours depending on the morph.
550
+ ZincObject.prototype.render = function(delta, playAnimation, options) {
551
+ if (playAnimation == true)
552
+ {
553
+ if ((this.clipAction) && this.isTimeVarying()) {
554
+ this.mixer.update( delta );
555
+ }
556
+ else {
557
+ let targetTime = this.inbuildTime + delta;
558
+ if (targetTime > this.duration)
559
+ targetTime = targetTime - this.duration;
560
+ this.inbuildTime = targetTime;
561
+ }
562
+ if (delta != 0) {
563
+ this.boundingBoxUpdateRequired = true;
564
+ if ((this.morphColour == 1) && (typeof this.geometry !== "undefined") &&
565
+ ((this.morph.material.vertexColors == THREE.VertexColors) ||
566
+ (this.morph.material.vertexColors == true)))
567
+ updateMorphColorAttribute(this.geometry, this.morph);
568
+ }
569
+ }
570
+ this.updateMarker(playAnimation, options);
571
+ }
572
+
573
+ exports.ZincObject = ZincObject;