@xeokit/xeokit-sdk 2.6.16 → 2.6.17
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 +3 -1
- package/dist/xeokit-sdk.es.js +3 -1
- package/dist/xeokit-sdk.es5.js +2 -2
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/dist/xeokit-sdk.min.es5.js +1 -1
- package/package.json +1 -1
- package/src/viewer/scene/marker/Marker.js +3 -0
- package/src/viewer/scene/webgl/occlusion/OcclusionTester.js +0 -1
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -10639,6 +10639,9 @@ class Marker extends Component {
|
|
|
10639
10639
|
return;
|
|
10640
10640
|
}
|
|
10641
10641
|
this._occludable = occludable;
|
|
10642
|
+
if (this._occludable) {
|
|
10643
|
+
this._renderer.markerWorldPosUpdated(this);
|
|
10644
|
+
}
|
|
10642
10645
|
}
|
|
10643
10646
|
|
|
10644
10647
|
/**
|
|
@@ -17212,7 +17215,6 @@ class OcclusionTester {
|
|
|
17212
17215
|
markerWorldPosUpdated(marker) {
|
|
17213
17216
|
const occlusionLayer = this._markersToOcclusionLayersMap[marker.id];
|
|
17214
17217
|
if (!occlusionLayer) {
|
|
17215
|
-
marker.error("Marker has not been added to OcclusionTester");
|
|
17216
17218
|
return;
|
|
17217
17219
|
}
|
|
17218
17220
|
const originHash = marker.origin.join();
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -10635,6 +10635,9 @@ class Marker extends Component {
|
|
|
10635
10635
|
return;
|
|
10636
10636
|
}
|
|
10637
10637
|
this._occludable = occludable;
|
|
10638
|
+
if (this._occludable) {
|
|
10639
|
+
this._renderer.markerWorldPosUpdated(this);
|
|
10640
|
+
}
|
|
10638
10641
|
}
|
|
10639
10642
|
|
|
10640
10643
|
/**
|
|
@@ -17208,7 +17211,6 @@ class OcclusionTester {
|
|
|
17208
17211
|
markerWorldPosUpdated(marker) {
|
|
17209
17212
|
const occlusionLayer = this._markersToOcclusionLayersMap[marker.id];
|
|
17210
17213
|
if (!occlusionLayer) {
|
|
17211
|
-
marker.error("Marker has not been added to OcclusionTester");
|
|
17212
17214
|
return;
|
|
17213
17215
|
}
|
|
17214
17216
|
const originHash = marker.origin.join();
|
package/dist/xeokit-sdk.es5.js
CHANGED
|
@@ -2704,7 +2704,7 @@ _this14._onEntityModelDestroyed=null;});}else{this._onEntityDestroyed=this._enti
|
|
|
2704
2704
|
* Fires a "worldPos" event with new World position.
|
|
2705
2705
|
*
|
|
2706
2706
|
* @type {Number[]}
|
|
2707
|
-
*/,set:function set(occludable){occludable=!!occludable;if(occludable===this._occludable){return;}this._occludable=occludable;}},{key:"worldPos",get:/**
|
|
2707
|
+
*/,set:function set(occludable){occludable=!!occludable;if(occludable===this._occludable){return;}this._occludable=occludable;if(this._occludable){this._renderer.markerWorldPosUpdated(this);}}},{key:"worldPos",get:/**
|
|
2708
2708
|
* Gets the World-space 3D position of this Marker.
|
|
2709
2709
|
*
|
|
2710
2710
|
* @type {Number[]}
|
|
@@ -4685,7 +4685,7 @@ this._markersToOcclusionLayersMap={};this._onCameraViewMatrix=scene.camera.on("v
|
|
|
4685
4685
|
*/_createClass(OcclusionTester,[{key:"addMarker",value:function addMarker(marker){var originHash=marker.origin.join();var occlusionLayer=this._occlusionLayers[originHash];if(!occlusionLayer){occlusionLayer=new OcclusionLayer(this._scene,marker.origin);this._occlusionLayers[occlusionLayer.originHash]=occlusionLayer;this._occlusionLayersListDirty=true;}occlusionLayer.addMarker(marker);this._markersToOcclusionLayersMap[marker.id]=occlusionLayer;this._occlusionTestListDirty=true;}/**
|
|
4686
4686
|
* Notifies OcclusionTester that a Marker has updated its World-space position.
|
|
4687
4687
|
* @param marker
|
|
4688
|
-
*/},{key:"markerWorldPosUpdated",value:function markerWorldPosUpdated(marker){var occlusionLayer=this._markersToOcclusionLayersMap[marker.id];if(!occlusionLayer){
|
|
4688
|
+
*/},{key:"markerWorldPosUpdated",value:function markerWorldPosUpdated(marker){var occlusionLayer=this._markersToOcclusionLayersMap[marker.id];if(!occlusionLayer){return;}var originHash=marker.origin.join();if(originHash!==occlusionLayer.originHash){if(occlusionLayer.numMarkers===1){occlusionLayer.destroy();delete this._occlusionLayers[occlusionLayer.originHash];this._occlusionLayersListDirty=true;}else{occlusionLayer.removeMarker(marker);}var newOcclusionLayer=this._occlusionLayers[originHash];if(!newOcclusionLayer){newOcclusionLayer=new OcclusionLayer(this._scene,marker.origin);this._occlusionLayers[originHash]=occlusionLayer;this._occlusionLayersListDirty=true;}newOcclusionLayer.addMarker(marker);this._markersToOcclusionLayersMap[marker.id]=newOcclusionLayer;}else{occlusionLayer.markerWorldPosUpdated(marker);}}/**
|
|
4689
4689
|
* Removes a Marker from occlusion testing.
|
|
4690
4690
|
* @param marker
|
|
4691
4691
|
*/},{key:"removeMarker",value:function removeMarker(marker){var originHash=marker.origin.join();var occlusionLayer=this._occlusionLayers[originHash];if(!occlusionLayer){return;}if(occlusionLayer.numMarkers===1){occlusionLayer.destroy();delete this._occlusionLayers[occlusionLayer.originHash];this._occlusionLayersListDirty=true;}else{occlusionLayer.removeMarker(marker);}delete this._markersToOcclusionLayersMap[marker.id];}/**
|