@xeokit/xeokit-sdk 2.2.3 → 2.2.4
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/xeokit-sdk.cjs.js +16 -38
- package/dist/xeokit-sdk.es.js +16 -38
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +1 -1
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -2720,30 +2720,6 @@ const math = {
|
|
|
2720
2720
|
* @param z
|
|
2721
2721
|
* @param m
|
|
2722
2722
|
*/
|
|
2723
|
-
OLDtranslateMat4c(x, y, z, m) {
|
|
2724
|
-
|
|
2725
|
-
const m12 = m[12];
|
|
2726
|
-
m[0] += m12 * x;
|
|
2727
|
-
m[4] += m12 * y;
|
|
2728
|
-
m[8] += m12 * z;
|
|
2729
|
-
|
|
2730
|
-
const m13 = m[13];
|
|
2731
|
-
m[1] += m13 * x;
|
|
2732
|
-
m[5] += m13 * y;
|
|
2733
|
-
m[9] += m13 * z;
|
|
2734
|
-
|
|
2735
|
-
const m14 = m[14];
|
|
2736
|
-
m[2] += m14 * x;
|
|
2737
|
-
m[6] += m14 * y;
|
|
2738
|
-
m[10] += m14 * z;
|
|
2739
|
-
|
|
2740
|
-
const m15 = m[15];
|
|
2741
|
-
m[3] += m15 * x;
|
|
2742
|
-
m[7] += m15 * y;
|
|
2743
|
-
m[11] += m15 * z;
|
|
2744
|
-
|
|
2745
|
-
return m;
|
|
2746
|
-
},
|
|
2747
2723
|
|
|
2748
2724
|
translateMat4c(x, y, z, m) {
|
|
2749
2725
|
|
|
@@ -8169,6 +8145,8 @@ class PerformanceNode {
|
|
|
8169
8145
|
this._offsetAABB = math.AABB3(aabb);
|
|
8170
8146
|
|
|
8171
8147
|
this._offset = math.vec3();
|
|
8148
|
+
this._colorizeUpdated = false;
|
|
8149
|
+
this._opacityUpdated = false;
|
|
8172
8150
|
|
|
8173
8151
|
if (this._isObject) {
|
|
8174
8152
|
model.scene._registerObject(this);
|
|
@@ -8581,6 +8559,7 @@ class PerformanceNode {
|
|
|
8581
8559
|
if (this._isObject) {
|
|
8582
8560
|
const colorized = (!!color);
|
|
8583
8561
|
this.scene._objectColorizeUpdated(this, colorized);
|
|
8562
|
+
this._colorizeUpdated = colorized;
|
|
8584
8563
|
}
|
|
8585
8564
|
this.model.glRedraw();
|
|
8586
8565
|
}
|
|
@@ -8635,6 +8614,7 @@ class PerformanceNode {
|
|
|
8635
8614
|
}
|
|
8636
8615
|
if (this._isObject) {
|
|
8637
8616
|
this.scene._objectOpacityUpdated(this, opacityUpdated);
|
|
8617
|
+
this._opacityUpdated = opacityUpdated;
|
|
8638
8618
|
}
|
|
8639
8619
|
this.model.glRedraw();
|
|
8640
8620
|
}
|
|
@@ -8781,8 +8761,12 @@ class PerformanceNode {
|
|
|
8781
8761
|
if (this.highlighted) {
|
|
8782
8762
|
scene._objectHighlightedUpdated(this);
|
|
8783
8763
|
}
|
|
8784
|
-
this.
|
|
8785
|
-
|
|
8764
|
+
if (this._opacityUpdated) {
|
|
8765
|
+
this.scene._objectColorizeUpdated(this, false);
|
|
8766
|
+
}
|
|
8767
|
+
if (this._opacityUpdated) {
|
|
8768
|
+
this.scene._objectOpacityUpdated(this, false);
|
|
8769
|
+
}
|
|
8786
8770
|
this.scene._objectOffsetUpdated(this, false);
|
|
8787
8771
|
}
|
|
8788
8772
|
for (let i = 0, len = this.meshes.length; i < len; i++) {
|
|
@@ -12150,7 +12134,7 @@ class Canvas extends Component {
|
|
|
12150
12134
|
* @event boundary
|
|
12151
12135
|
* @param value The property's new value
|
|
12152
12136
|
*/
|
|
12153
|
-
if (!newResolutionScale) {
|
|
12137
|
+
if (!newResolutionScale || newCanvasSize) {
|
|
12154
12138
|
this.fire("boundary", boundary);
|
|
12155
12139
|
}
|
|
12156
12140
|
|
|
@@ -27390,7 +27374,7 @@ class Scene extends Component {
|
|
|
27390
27374
|
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
27391
27375
|
*
|
|
27392
27376
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27393
|
-
* @param {Boolean} visible Whether or not to
|
|
27377
|
+
* @param {Boolean} visible Whether or not to set visible.
|
|
27394
27378
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27395
27379
|
*/
|
|
27396
27380
|
setObjectsVisible(ids, visible) {
|
|
@@ -27407,7 +27391,7 @@ class Scene extends Component {
|
|
|
27407
27391
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27408
27392
|
*
|
|
27409
27393
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27410
|
-
* @param {Boolean} collidable Whether or not to
|
|
27394
|
+
* @param {Boolean} collidable Whether or not to set collidable.
|
|
27411
27395
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27412
27396
|
*/
|
|
27413
27397
|
setObjectsCollidable(ids, collidable) {
|
|
@@ -27444,7 +27428,7 @@ class Scene extends Component {
|
|
|
27444
27428
|
* registered by {@link Entity#id} in {@link Scene#selectedObjects}.
|
|
27445
27429
|
*
|
|
27446
27430
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27447
|
-
* @param {Boolean} selected Whether or not to
|
|
27431
|
+
* @param {Boolean} selected Whether or not to select.
|
|
27448
27432
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27449
27433
|
*/
|
|
27450
27434
|
setObjectsSelected(ids, selected) {
|
|
@@ -27480,9 +27464,6 @@ class Scene extends Component {
|
|
|
27480
27464
|
*
|
|
27481
27465
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27482
27466
|
*
|
|
27483
|
-
* Each {@link Entity} on which both {@link Entity#isObject} and {@link Entity#xrayed} are ````true```` is
|
|
27484
|
-
* registered by {@link Entity#id} in {@link Scene#xrayedObjects}.
|
|
27485
|
-
*
|
|
27486
27467
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27487
27468
|
* @param {Boolean} xrayed Whether or not to xray.
|
|
27488
27469
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
@@ -27550,7 +27531,7 @@ class Scene extends Component {
|
|
|
27550
27531
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27551
27532
|
*
|
|
27552
27533
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27553
|
-
* @param {Boolean} pickable Whether or not to
|
|
27534
|
+
* @param {Boolean} pickable Whether or not to set pickable.
|
|
27554
27535
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27555
27536
|
*/
|
|
27556
27537
|
setObjectsPickable(ids, pickable) {
|
|
@@ -27576,13 +27557,10 @@ class Scene extends Component {
|
|
|
27576
27557
|
}
|
|
27577
27558
|
|
|
27578
27559
|
/**
|
|
27579
|
-
* Iterates with a callback over {@link Entity
|
|
27560
|
+
* Iterates with a callback over {@link Entity}s that represent objects.
|
|
27580
27561
|
*
|
|
27581
27562
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27582
27563
|
*
|
|
27583
|
-
* Each {@link Entity} on which both {@link Entity#isObject} and {@link Entity#visible} are ````true```` is
|
|
27584
|
-
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
27585
|
-
*
|
|
27586
27564
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27587
27565
|
* @param {Function} callback Callback to execute on eacn {@link Entity}.
|
|
27588
27566
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -2716,30 +2716,6 @@ const math = {
|
|
|
2716
2716
|
* @param z
|
|
2717
2717
|
* @param m
|
|
2718
2718
|
*/
|
|
2719
|
-
OLDtranslateMat4c(x, y, z, m) {
|
|
2720
|
-
|
|
2721
|
-
const m12 = m[12];
|
|
2722
|
-
m[0] += m12 * x;
|
|
2723
|
-
m[4] += m12 * y;
|
|
2724
|
-
m[8] += m12 * z;
|
|
2725
|
-
|
|
2726
|
-
const m13 = m[13];
|
|
2727
|
-
m[1] += m13 * x;
|
|
2728
|
-
m[5] += m13 * y;
|
|
2729
|
-
m[9] += m13 * z;
|
|
2730
|
-
|
|
2731
|
-
const m14 = m[14];
|
|
2732
|
-
m[2] += m14 * x;
|
|
2733
|
-
m[6] += m14 * y;
|
|
2734
|
-
m[10] += m14 * z;
|
|
2735
|
-
|
|
2736
|
-
const m15 = m[15];
|
|
2737
|
-
m[3] += m15 * x;
|
|
2738
|
-
m[7] += m15 * y;
|
|
2739
|
-
m[11] += m15 * z;
|
|
2740
|
-
|
|
2741
|
-
return m;
|
|
2742
|
-
},
|
|
2743
2719
|
|
|
2744
2720
|
translateMat4c(x, y, z, m) {
|
|
2745
2721
|
|
|
@@ -8165,6 +8141,8 @@ class PerformanceNode {
|
|
|
8165
8141
|
this._offsetAABB = math.AABB3(aabb);
|
|
8166
8142
|
|
|
8167
8143
|
this._offset = math.vec3();
|
|
8144
|
+
this._colorizeUpdated = false;
|
|
8145
|
+
this._opacityUpdated = false;
|
|
8168
8146
|
|
|
8169
8147
|
if (this._isObject) {
|
|
8170
8148
|
model.scene._registerObject(this);
|
|
@@ -8577,6 +8555,7 @@ class PerformanceNode {
|
|
|
8577
8555
|
if (this._isObject) {
|
|
8578
8556
|
const colorized = (!!color);
|
|
8579
8557
|
this.scene._objectColorizeUpdated(this, colorized);
|
|
8558
|
+
this._colorizeUpdated = colorized;
|
|
8580
8559
|
}
|
|
8581
8560
|
this.model.glRedraw();
|
|
8582
8561
|
}
|
|
@@ -8631,6 +8610,7 @@ class PerformanceNode {
|
|
|
8631
8610
|
}
|
|
8632
8611
|
if (this._isObject) {
|
|
8633
8612
|
this.scene._objectOpacityUpdated(this, opacityUpdated);
|
|
8613
|
+
this._opacityUpdated = opacityUpdated;
|
|
8634
8614
|
}
|
|
8635
8615
|
this.model.glRedraw();
|
|
8636
8616
|
}
|
|
@@ -8777,8 +8757,12 @@ class PerformanceNode {
|
|
|
8777
8757
|
if (this.highlighted) {
|
|
8778
8758
|
scene._objectHighlightedUpdated(this);
|
|
8779
8759
|
}
|
|
8780
|
-
this.
|
|
8781
|
-
|
|
8760
|
+
if (this._opacityUpdated) {
|
|
8761
|
+
this.scene._objectColorizeUpdated(this, false);
|
|
8762
|
+
}
|
|
8763
|
+
if (this._opacityUpdated) {
|
|
8764
|
+
this.scene._objectOpacityUpdated(this, false);
|
|
8765
|
+
}
|
|
8782
8766
|
this.scene._objectOffsetUpdated(this, false);
|
|
8783
8767
|
}
|
|
8784
8768
|
for (let i = 0, len = this.meshes.length; i < len; i++) {
|
|
@@ -12146,7 +12130,7 @@ class Canvas extends Component {
|
|
|
12146
12130
|
* @event boundary
|
|
12147
12131
|
* @param value The property's new value
|
|
12148
12132
|
*/
|
|
12149
|
-
if (!newResolutionScale) {
|
|
12133
|
+
if (!newResolutionScale || newCanvasSize) {
|
|
12150
12134
|
this.fire("boundary", boundary);
|
|
12151
12135
|
}
|
|
12152
12136
|
|
|
@@ -27386,7 +27370,7 @@ class Scene extends Component {
|
|
|
27386
27370
|
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
27387
27371
|
*
|
|
27388
27372
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27389
|
-
* @param {Boolean} visible Whether or not to
|
|
27373
|
+
* @param {Boolean} visible Whether or not to set visible.
|
|
27390
27374
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27391
27375
|
*/
|
|
27392
27376
|
setObjectsVisible(ids, visible) {
|
|
@@ -27403,7 +27387,7 @@ class Scene extends Component {
|
|
|
27403
27387
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27404
27388
|
*
|
|
27405
27389
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27406
|
-
* @param {Boolean} collidable Whether or not to
|
|
27390
|
+
* @param {Boolean} collidable Whether or not to set collidable.
|
|
27407
27391
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27408
27392
|
*/
|
|
27409
27393
|
setObjectsCollidable(ids, collidable) {
|
|
@@ -27440,7 +27424,7 @@ class Scene extends Component {
|
|
|
27440
27424
|
* registered by {@link Entity#id} in {@link Scene#selectedObjects}.
|
|
27441
27425
|
*
|
|
27442
27426
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27443
|
-
* @param {Boolean} selected Whether or not to
|
|
27427
|
+
* @param {Boolean} selected Whether or not to select.
|
|
27444
27428
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27445
27429
|
*/
|
|
27446
27430
|
setObjectsSelected(ids, selected) {
|
|
@@ -27476,9 +27460,6 @@ class Scene extends Component {
|
|
|
27476
27460
|
*
|
|
27477
27461
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27478
27462
|
*
|
|
27479
|
-
* Each {@link Entity} on which both {@link Entity#isObject} and {@link Entity#xrayed} are ````true```` is
|
|
27480
|
-
* registered by {@link Entity#id} in {@link Scene#xrayedObjects}.
|
|
27481
|
-
*
|
|
27482
27463
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27483
27464
|
* @param {Boolean} xrayed Whether or not to xray.
|
|
27484
27465
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
@@ -27546,7 +27527,7 @@ class Scene extends Component {
|
|
|
27546
27527
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27547
27528
|
*
|
|
27548
27529
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27549
|
-
* @param {Boolean} pickable Whether or not to
|
|
27530
|
+
* @param {Boolean} pickable Whether or not to set pickable.
|
|
27550
27531
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|
|
27551
27532
|
*/
|
|
27552
27533
|
setObjectsPickable(ids, pickable) {
|
|
@@ -27572,13 +27553,10 @@ class Scene extends Component {
|
|
|
27572
27553
|
}
|
|
27573
27554
|
|
|
27574
27555
|
/**
|
|
27575
|
-
* Iterates with a callback over {@link Entity
|
|
27556
|
+
* Iterates with a callback over {@link Entity}s that represent objects.
|
|
27576
27557
|
*
|
|
27577
27558
|
* An {@link Entity} represents an object when {@link Entity#isObject} is ````true````.
|
|
27578
27559
|
*
|
|
27579
|
-
* Each {@link Entity} on which both {@link Entity#isObject} and {@link Entity#visible} are ````true```` is
|
|
27580
|
-
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
27581
|
-
*
|
|
27582
27560
|
* @param {String[]} ids Array of {@link Entity#id} values.
|
|
27583
27561
|
* @param {Function} callback Callback to execute on eacn {@link Entity}.
|
|
27584
27562
|
* @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
|