@xeokit/xeokit-sdk 2.5.2-beta-2 → 2.5.2-beta-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.
- package/dist/xeokit-sdk.cjs.js +97 -51
- package/dist/xeokit-sdk.es.js +97 -51
- package/dist/xeokit-sdk.es5.js +83 -72
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +3 -3
- package/package.json +1 -1
- package/src/extras/MarqueePicker/MarqueePickerMouseControl.js +1 -1
- package/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +2 -2
- package/src/viewer/Configs.js +1 -2
- package/src/viewer/scene/LineSet/LineSet.js +1 -1
- package/src/viewer/scene/model/SceneModel.js +2 -2
- package/src/viewer/scene/model/SceneModelEntity.js +10 -8
- package/src/viewer/scene/model/SceneModelTransform.js +1 -1
- package/src/viewer/scene/model/dtx/lines/DTXLinesLayer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/DTXTrianglesLayer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSnapInitRenderer.js +5 -2
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLineSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesRenderers.js +2 -2
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesSilhouetteRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOSceneModelLineBatchingRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsOcclusionRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsPickDepthRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsPickMeshRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsRenderers.js +2 -2
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsShadowRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsSilhouetteRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsSnapInitRenderer.js +5 -5
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/VBOBatchingTrianglesBuffer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOBatchingTrianglesColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOBatchingTrianglesDepthRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOBatchingTrianglesEdgesColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOBatchingTrianglesFlatColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOBatchingTrianglesRenderers.js +2 -2
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/VBOSceneModelTriangleBatchingEdgesRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/lines/renderers/VBOInstancingLinesColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/lines/renderers/VBOInstancingLinesRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsDepthRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsPickDepthRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsRenderers.js +2 -2
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsShadowRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsSilhouetteRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsSnapInitRenderer.js +5 -4
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingTrianglesRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesColorTextureRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesDepthRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesEdgesColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesEdgesRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesFlatColorRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesFlatNormalsRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOInstancingTrianglesRenderers.js +2 -2
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/VBOSceneModelTriangleInstancingEdgesRenderer.js +1 -1
- package/src/viewer/scene/scene/Scene.js +46 -6
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -10160,24 +10160,26 @@ class SceneModelEntity {
|
|
|
10160
10160
|
if (this._isObject) {
|
|
10161
10161
|
scene._deregisterObject(this);
|
|
10162
10162
|
if (this.visible) {
|
|
10163
|
-
scene.
|
|
10163
|
+
scene._deRegisterVisibleObject(this);
|
|
10164
10164
|
}
|
|
10165
10165
|
if (this.xrayed) {
|
|
10166
|
-
scene.
|
|
10166
|
+
scene._deRegisterXRayedObject(this);
|
|
10167
10167
|
}
|
|
10168
10168
|
if (this.selected) {
|
|
10169
|
-
scene.
|
|
10169
|
+
scene._deRegisterSelectedObject(this);
|
|
10170
10170
|
}
|
|
10171
10171
|
if (this.highlighted) {
|
|
10172
|
-
scene.
|
|
10172
|
+
scene._deRegisterHighlightedObject(this);
|
|
10173
10173
|
}
|
|
10174
|
-
if (this.
|
|
10175
|
-
this.scene.
|
|
10174
|
+
if (this._colorizeUpdated) {
|
|
10175
|
+
this.scene._deRegisterColorizedObject(this);
|
|
10176
10176
|
}
|
|
10177
10177
|
if (this._opacityUpdated) {
|
|
10178
|
-
this.scene.
|
|
10178
|
+
this.scene._deRegisterOpacityObject(this);
|
|
10179
|
+
}
|
|
10180
|
+
if (this._offset && (this._offset[0] !== 0 || this._offset[1] !== 0 || this._offset[2] !== 0)) {
|
|
10181
|
+
this.scene._deRegisterOffsetObject(this);
|
|
10179
10182
|
}
|
|
10180
|
-
this.scene._objectOffsetUpdated(this, false);
|
|
10181
10183
|
}
|
|
10182
10184
|
for (let i = 0, len = this.meshes.length; i < len; i++) {
|
|
10183
10185
|
this.meshes[i]._destroy();
|
|
@@ -28423,12 +28425,12 @@ class Scene extends Component {
|
|
|
28423
28425
|
}
|
|
28424
28426
|
};
|
|
28425
28427
|
|
|
28426
|
-
this.setNumCachedSectionPlanes = function(numCachedSectionPlanes) {
|
|
28428
|
+
this.setNumCachedSectionPlanes = function (numCachedSectionPlanes) {
|
|
28427
28429
|
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28428
28430
|
hash = null;
|
|
28429
28431
|
};
|
|
28430
28432
|
|
|
28431
|
-
this.getNumCachedSectionPlanes = function() {
|
|
28433
|
+
this.getNumCachedSectionPlanes = function () {
|
|
28432
28434
|
return this._numCachedSectionPlanes;
|
|
28433
28435
|
};
|
|
28434
28436
|
|
|
@@ -28821,6 +28823,12 @@ class Scene extends Component {
|
|
|
28821
28823
|
}
|
|
28822
28824
|
}
|
|
28823
28825
|
|
|
28826
|
+
_deRegisterVisibleObject(entity) {
|
|
28827
|
+
delete this.visibleObjects[entity.id];
|
|
28828
|
+
this._numVisibleObjects--;
|
|
28829
|
+
this._visibleObjectIds = null; // Lazy regenerate
|
|
28830
|
+
}
|
|
28831
|
+
|
|
28824
28832
|
_objectXRayedUpdated(entity, notify = true) {
|
|
28825
28833
|
if (entity.xrayed) {
|
|
28826
28834
|
this.xrayedObjects[entity.id] = entity;
|
|
@@ -28835,7 +28843,13 @@ class Scene extends Component {
|
|
|
28835
28843
|
}
|
|
28836
28844
|
}
|
|
28837
28845
|
|
|
28838
|
-
|
|
28846
|
+
_deRegisterXRayedObject(entity) {
|
|
28847
|
+
delete this.xrayedObjects[entity.id];
|
|
28848
|
+
this._numXRayedObjects--;
|
|
28849
|
+
this._xrayedObjectIds = null; // Lazy regenerate
|
|
28850
|
+
}
|
|
28851
|
+
|
|
28852
|
+
_objectHighlightedUpdated(entity) {
|
|
28839
28853
|
if (entity.highlighted) {
|
|
28840
28854
|
this.highlightedObjects[entity.id] = entity;
|
|
28841
28855
|
this._numHighlightedObjects++;
|
|
@@ -28844,9 +28858,12 @@ class Scene extends Component {
|
|
|
28844
28858
|
this._numHighlightedObjects--;
|
|
28845
28859
|
}
|
|
28846
28860
|
this._highlightedObjectIds = null; // Lazy regenerate
|
|
28847
|
-
|
|
28848
|
-
|
|
28849
|
-
|
|
28861
|
+
}
|
|
28862
|
+
|
|
28863
|
+
_deRegisterHighlightedObject(entity) {
|
|
28864
|
+
delete this.highlightedObjects[entity.id];
|
|
28865
|
+
this._numHighlightedObjects--;
|
|
28866
|
+
this._highlightedObjectIds = null; // Lazy regenerate
|
|
28850
28867
|
}
|
|
28851
28868
|
|
|
28852
28869
|
_objectSelectedUpdated(entity, notify = true) {
|
|
@@ -28863,6 +28880,13 @@ class Scene extends Component {
|
|
|
28863
28880
|
}
|
|
28864
28881
|
}
|
|
28865
28882
|
|
|
28883
|
+
_deRegisterSelectedObject(entity) {
|
|
28884
|
+
delete this.selectedObjects[entity.id];
|
|
28885
|
+
this._numSelectedObjects--;
|
|
28886
|
+
this._selectedObjectIds = null; // Lazy regenerate
|
|
28887
|
+
}
|
|
28888
|
+
|
|
28889
|
+
|
|
28866
28890
|
_objectColorizeUpdated(entity, colorized) {
|
|
28867
28891
|
if (colorized) {
|
|
28868
28892
|
this.colorizedObjects[entity.id] = entity;
|
|
@@ -28874,6 +28898,12 @@ class Scene extends Component {
|
|
|
28874
28898
|
this._colorizedObjectIds = null; // Lazy regenerate
|
|
28875
28899
|
}
|
|
28876
28900
|
|
|
28901
|
+
_deRegisterColorizedObject(entity) {
|
|
28902
|
+
delete this.colorizedObjects[entity.id];
|
|
28903
|
+
this._numColorizedObjects--;
|
|
28904
|
+
this._colorizedObjectIds = null; // Lazy regenerate
|
|
28905
|
+
}
|
|
28906
|
+
|
|
28877
28907
|
_objectOpacityUpdated(entity, opacityUpdated) {
|
|
28878
28908
|
if (opacityUpdated) {
|
|
28879
28909
|
this.opacityObjects[entity.id] = entity;
|
|
@@ -28885,6 +28915,12 @@ class Scene extends Component {
|
|
|
28885
28915
|
this._opacityObjectIds = null; // Lazy regenerate
|
|
28886
28916
|
}
|
|
28887
28917
|
|
|
28918
|
+
_deRegisterOpacityObject(entity) {
|
|
28919
|
+
delete this.opacityObjects[entity.id];
|
|
28920
|
+
this._numOpacityObjects--;
|
|
28921
|
+
this._opacityObjectIds = null; // Lazy regenerate
|
|
28922
|
+
}
|
|
28923
|
+
|
|
28888
28924
|
_objectOffsetUpdated(entity, offset) {
|
|
28889
28925
|
if (!offset || offset[0] === 0 && offset[1] === 0 && offset[2] === 0) {
|
|
28890
28926
|
this.offsetObjects[entity.id] = entity;
|
|
@@ -28896,6 +28932,12 @@ class Scene extends Component {
|
|
|
28896
28932
|
this._offsetObjectIds = null; // Lazy regenerate
|
|
28897
28933
|
}
|
|
28898
28934
|
|
|
28935
|
+
_deRegisterOffsetObject(entity) {
|
|
28936
|
+
delete this.offsetObjects[entity.id];
|
|
28937
|
+
this._numOffsetObjects--;
|
|
28938
|
+
this._offsetObjectIds = null; // Lazy regenerate
|
|
28939
|
+
}
|
|
28940
|
+
|
|
28899
28941
|
_webglContextLost() {
|
|
28900
28942
|
// this.loading++;
|
|
28901
28943
|
this.canvas.spinner.processes++;
|
|
@@ -63688,10 +63730,10 @@ class VBOBatchingPointsSnapInitRenderer extends VBORenderer {
|
|
|
63688
63730
|
}
|
|
63689
63731
|
src.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);");
|
|
63690
63732
|
|
|
63691
|
-
src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
63692
|
-
src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
63693
|
-
src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
63694
|
-
|
|
63733
|
+
// src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
63734
|
+
// src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
63735
|
+
// src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
63736
|
+
src.push(`outNormal = ivec4(1.0, 1.0, 1.0, 1.0);`);
|
|
63695
63737
|
src.push("outPickColor = uvec4(vPickColor);");
|
|
63696
63738
|
src.push("}");
|
|
63697
63739
|
return src;
|
|
@@ -66242,10 +66284,7 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
66242
66284
|
}
|
|
66243
66285
|
src.push("in highp vec3 relativeToOriginPosition;");
|
|
66244
66286
|
src.push("layout(location = 0) out highp ivec4 outCoords;");
|
|
66245
|
-
|
|
66246
|
-
// TODO: normal placeholder?
|
|
66247
|
-
// Primitive type?
|
|
66248
|
-
///////////////////////////////////////////
|
|
66287
|
+
src.push("layout(location = 1) out highp ivec4 outNormal;");
|
|
66249
66288
|
src.push("layout(location = 2) out lowp uvec4 outPickColor;");
|
|
66250
66289
|
src.push("void main(void) {");
|
|
66251
66290
|
if (clipping) {
|
|
@@ -66267,6 +66306,10 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
66267
66306
|
src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;");
|
|
66268
66307
|
}
|
|
66269
66308
|
src.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);");
|
|
66309
|
+
// src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
66310
|
+
// src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
66311
|
+
// src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
66312
|
+
src.push(`outNormal = ivec4(1.0, 1.0, 1.0, 1.0);`);
|
|
66270
66313
|
src.push("outPickColor = uvec4(vPickColor);");
|
|
66271
66314
|
src.push("}");
|
|
66272
66315
|
return src;
|
|
@@ -72812,7 +72855,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72812
72855
|
const clipping = scene._sectionPlanesState.getNumAllocatedSectionPlanes() > 0;
|
|
72813
72856
|
const src = [];
|
|
72814
72857
|
src.push("#version 300 es");
|
|
72815
|
-
src.push("//
|
|
72858
|
+
src.push("// DTXTrianglesSnapInitRenderer vertex shader");
|
|
72816
72859
|
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
|
|
72817
72860
|
src.push("precision highp float;");
|
|
72818
72861
|
src.push("precision highp int;");
|
|
@@ -72954,6 +72997,9 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72954
72997
|
src.push("vFlags2 = flags2.r;");
|
|
72955
72998
|
}
|
|
72956
72999
|
src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));");
|
|
73000
|
+
|
|
73001
|
+
// TODO: Normalized color? See here:
|
|
73002
|
+
//src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) /255.0;");
|
|
72957
73003
|
src.push("vec4 clipPos = projMatrix * viewPosition;");
|
|
72958
73004
|
src.push("float tmp = clipPos.w;");
|
|
72959
73005
|
src.push("clipPos.xyzw /= tmp;");
|
|
@@ -72974,7 +73020,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72974
73020
|
const clipping = scene._sectionPlanesState.getNumAllocatedSectionPlanes() > 0;
|
|
72975
73021
|
const src = [];
|
|
72976
73022
|
src.push('#version 300 es');
|
|
72977
|
-
src.push("//
|
|
73023
|
+
src.push("// DTXTrianglesSnapInitRenderer fragment shader");
|
|
72978
73024
|
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
|
|
72979
73025
|
src.push("precision highp float;");
|
|
72980
73026
|
src.push("precision highp int;");
|
|
@@ -83099,31 +83145,6 @@ function createDTXBuckets(geometry, enableVertexWelding, enableIndexBucketing) {
|
|
|
83099
83145
|
return buckets;
|
|
83100
83146
|
}
|
|
83101
83147
|
|
|
83102
|
-
/**
|
|
83103
|
-
* @desc A high-performance model representation for efficient rendering and low memory usage.
|
|
83104
|
-
*
|
|
83105
|
-
* * PerformanceModel was replaced with {@link SceneModel} in ````xeokit-sdk v2.4````.
|
|
83106
|
-
* * PerformanceModel currently extends {@link SceneModel}, in order to maintain backward-compatibility until we remove PerformanceModel.
|
|
83107
|
-
* * See {@link SceneModel} for API details.
|
|
83108
|
-
*
|
|
83109
|
-
* @deprecated
|
|
83110
|
-
* @implements {Drawable}
|
|
83111
|
-
* @implements {Entity}
|
|
83112
|
-
* @extends {SceneModel}
|
|
83113
|
-
*/
|
|
83114
|
-
class PerformanceModel extends SceneModel {
|
|
83115
|
-
|
|
83116
|
-
/**
|
|
83117
|
-
* See {@link VBOSceneModel} for details.
|
|
83118
|
-
*
|
|
83119
|
-
* @param owner
|
|
83120
|
-
* @param cfg
|
|
83121
|
-
*/
|
|
83122
|
-
constructor(owner, cfg = {}) {
|
|
83123
|
-
super(owner, cfg);
|
|
83124
|
-
}
|
|
83125
|
-
}
|
|
83126
|
-
|
|
83127
83148
|
/**
|
|
83128
83149
|
* A set of 3D line segments.
|
|
83129
83150
|
*
|
|
@@ -91572,6 +91593,31 @@ class QuadraticBezierCurve extends Curve {
|
|
|
91572
91593
|
}
|
|
91573
91594
|
}
|
|
91574
91595
|
|
|
91596
|
+
/**
|
|
91597
|
+
* @desc A high-performance model representation for efficient rendering and low memory usage.
|
|
91598
|
+
*
|
|
91599
|
+
* * PerformanceModel was replaced with {@link SceneModel} in ````xeokit-sdk v2.4````.
|
|
91600
|
+
* * PerformanceModel currently extends {@link SceneModel}, in order to maintain backward-compatibility until we remove PerformanceModel.
|
|
91601
|
+
* * See {@link SceneModel} for API details.
|
|
91602
|
+
*
|
|
91603
|
+
* @deprecated
|
|
91604
|
+
* @implements {Drawable}
|
|
91605
|
+
* @implements {Entity}
|
|
91606
|
+
* @extends {SceneModel}
|
|
91607
|
+
*/
|
|
91608
|
+
class PerformanceModel extends SceneModel {
|
|
91609
|
+
|
|
91610
|
+
/**
|
|
91611
|
+
* See {@link VBOSceneModel} for details.
|
|
91612
|
+
*
|
|
91613
|
+
* @param owner
|
|
91614
|
+
* @param cfg
|
|
91615
|
+
*/
|
|
91616
|
+
constructor(owner, cfg = {}) {
|
|
91617
|
+
super(owner, cfg);
|
|
91618
|
+
}
|
|
91619
|
+
}
|
|
91620
|
+
|
|
91575
91621
|
/**
|
|
91576
91622
|
* @desc A Skybox.
|
|
91577
91623
|
*/
|
|
@@ -118095,9 +118141,9 @@ const EMPTY_IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAA
|
|
|
118095
118141
|
/**
|
|
118096
118142
|
* @desc A {@link Viewer} plugin that provides methods for visualizing IfcBuildingStoreys.
|
|
118097
118143
|
*
|
|
118098
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
118144
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/navigation/#StoreyViewsPlugin_recipe3"><img src="http://xeokit.io/img/docs/StoreyViewsPlugin/minimap.gif"></a>
|
|
118099
118145
|
*
|
|
118100
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
118146
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/navigation/#StoreyViewsPlugin_recipe3)]
|
|
118101
118147
|
*
|
|
118102
118148
|
* ## Overview
|
|
118103
118149
|
*
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -10156,24 +10156,26 @@ class SceneModelEntity {
|
|
|
10156
10156
|
if (this._isObject) {
|
|
10157
10157
|
scene._deregisterObject(this);
|
|
10158
10158
|
if (this.visible) {
|
|
10159
|
-
scene.
|
|
10159
|
+
scene._deRegisterVisibleObject(this);
|
|
10160
10160
|
}
|
|
10161
10161
|
if (this.xrayed) {
|
|
10162
|
-
scene.
|
|
10162
|
+
scene._deRegisterXRayedObject(this);
|
|
10163
10163
|
}
|
|
10164
10164
|
if (this.selected) {
|
|
10165
|
-
scene.
|
|
10165
|
+
scene._deRegisterSelectedObject(this);
|
|
10166
10166
|
}
|
|
10167
10167
|
if (this.highlighted) {
|
|
10168
|
-
scene.
|
|
10168
|
+
scene._deRegisterHighlightedObject(this);
|
|
10169
10169
|
}
|
|
10170
|
-
if (this.
|
|
10171
|
-
this.scene.
|
|
10170
|
+
if (this._colorizeUpdated) {
|
|
10171
|
+
this.scene._deRegisterColorizedObject(this);
|
|
10172
10172
|
}
|
|
10173
10173
|
if (this._opacityUpdated) {
|
|
10174
|
-
this.scene.
|
|
10174
|
+
this.scene._deRegisterOpacityObject(this);
|
|
10175
|
+
}
|
|
10176
|
+
if (this._offset && (this._offset[0] !== 0 || this._offset[1] !== 0 || this._offset[2] !== 0)) {
|
|
10177
|
+
this.scene._deRegisterOffsetObject(this);
|
|
10175
10178
|
}
|
|
10176
|
-
this.scene._objectOffsetUpdated(this, false);
|
|
10177
10179
|
}
|
|
10178
10180
|
for (let i = 0, len = this.meshes.length; i < len; i++) {
|
|
10179
10181
|
this.meshes[i]._destroy();
|
|
@@ -28419,12 +28421,12 @@ class Scene extends Component {
|
|
|
28419
28421
|
}
|
|
28420
28422
|
};
|
|
28421
28423
|
|
|
28422
|
-
this.setNumCachedSectionPlanes = function(numCachedSectionPlanes) {
|
|
28424
|
+
this.setNumCachedSectionPlanes = function (numCachedSectionPlanes) {
|
|
28423
28425
|
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28424
28426
|
hash = null;
|
|
28425
28427
|
};
|
|
28426
28428
|
|
|
28427
|
-
this.getNumCachedSectionPlanes = function() {
|
|
28429
|
+
this.getNumCachedSectionPlanes = function () {
|
|
28428
28430
|
return this._numCachedSectionPlanes;
|
|
28429
28431
|
};
|
|
28430
28432
|
|
|
@@ -28817,6 +28819,12 @@ class Scene extends Component {
|
|
|
28817
28819
|
}
|
|
28818
28820
|
}
|
|
28819
28821
|
|
|
28822
|
+
_deRegisterVisibleObject(entity) {
|
|
28823
|
+
delete this.visibleObjects[entity.id];
|
|
28824
|
+
this._numVisibleObjects--;
|
|
28825
|
+
this._visibleObjectIds = null; // Lazy regenerate
|
|
28826
|
+
}
|
|
28827
|
+
|
|
28820
28828
|
_objectXRayedUpdated(entity, notify = true) {
|
|
28821
28829
|
if (entity.xrayed) {
|
|
28822
28830
|
this.xrayedObjects[entity.id] = entity;
|
|
@@ -28831,7 +28839,13 @@ class Scene extends Component {
|
|
|
28831
28839
|
}
|
|
28832
28840
|
}
|
|
28833
28841
|
|
|
28834
|
-
|
|
28842
|
+
_deRegisterXRayedObject(entity) {
|
|
28843
|
+
delete this.xrayedObjects[entity.id];
|
|
28844
|
+
this._numXRayedObjects--;
|
|
28845
|
+
this._xrayedObjectIds = null; // Lazy regenerate
|
|
28846
|
+
}
|
|
28847
|
+
|
|
28848
|
+
_objectHighlightedUpdated(entity) {
|
|
28835
28849
|
if (entity.highlighted) {
|
|
28836
28850
|
this.highlightedObjects[entity.id] = entity;
|
|
28837
28851
|
this._numHighlightedObjects++;
|
|
@@ -28840,9 +28854,12 @@ class Scene extends Component {
|
|
|
28840
28854
|
this._numHighlightedObjects--;
|
|
28841
28855
|
}
|
|
28842
28856
|
this._highlightedObjectIds = null; // Lazy regenerate
|
|
28843
|
-
|
|
28844
|
-
|
|
28845
|
-
|
|
28857
|
+
}
|
|
28858
|
+
|
|
28859
|
+
_deRegisterHighlightedObject(entity) {
|
|
28860
|
+
delete this.highlightedObjects[entity.id];
|
|
28861
|
+
this._numHighlightedObjects--;
|
|
28862
|
+
this._highlightedObjectIds = null; // Lazy regenerate
|
|
28846
28863
|
}
|
|
28847
28864
|
|
|
28848
28865
|
_objectSelectedUpdated(entity, notify = true) {
|
|
@@ -28859,6 +28876,13 @@ class Scene extends Component {
|
|
|
28859
28876
|
}
|
|
28860
28877
|
}
|
|
28861
28878
|
|
|
28879
|
+
_deRegisterSelectedObject(entity) {
|
|
28880
|
+
delete this.selectedObjects[entity.id];
|
|
28881
|
+
this._numSelectedObjects--;
|
|
28882
|
+
this._selectedObjectIds = null; // Lazy regenerate
|
|
28883
|
+
}
|
|
28884
|
+
|
|
28885
|
+
|
|
28862
28886
|
_objectColorizeUpdated(entity, colorized) {
|
|
28863
28887
|
if (colorized) {
|
|
28864
28888
|
this.colorizedObjects[entity.id] = entity;
|
|
@@ -28870,6 +28894,12 @@ class Scene extends Component {
|
|
|
28870
28894
|
this._colorizedObjectIds = null; // Lazy regenerate
|
|
28871
28895
|
}
|
|
28872
28896
|
|
|
28897
|
+
_deRegisterColorizedObject(entity) {
|
|
28898
|
+
delete this.colorizedObjects[entity.id];
|
|
28899
|
+
this._numColorizedObjects--;
|
|
28900
|
+
this._colorizedObjectIds = null; // Lazy regenerate
|
|
28901
|
+
}
|
|
28902
|
+
|
|
28873
28903
|
_objectOpacityUpdated(entity, opacityUpdated) {
|
|
28874
28904
|
if (opacityUpdated) {
|
|
28875
28905
|
this.opacityObjects[entity.id] = entity;
|
|
@@ -28881,6 +28911,12 @@ class Scene extends Component {
|
|
|
28881
28911
|
this._opacityObjectIds = null; // Lazy regenerate
|
|
28882
28912
|
}
|
|
28883
28913
|
|
|
28914
|
+
_deRegisterOpacityObject(entity) {
|
|
28915
|
+
delete this.opacityObjects[entity.id];
|
|
28916
|
+
this._numOpacityObjects--;
|
|
28917
|
+
this._opacityObjectIds = null; // Lazy regenerate
|
|
28918
|
+
}
|
|
28919
|
+
|
|
28884
28920
|
_objectOffsetUpdated(entity, offset) {
|
|
28885
28921
|
if (!offset || offset[0] === 0 && offset[1] === 0 && offset[2] === 0) {
|
|
28886
28922
|
this.offsetObjects[entity.id] = entity;
|
|
@@ -28892,6 +28928,12 @@ class Scene extends Component {
|
|
|
28892
28928
|
this._offsetObjectIds = null; // Lazy regenerate
|
|
28893
28929
|
}
|
|
28894
28930
|
|
|
28931
|
+
_deRegisterOffsetObject(entity) {
|
|
28932
|
+
delete this.offsetObjects[entity.id];
|
|
28933
|
+
this._numOffsetObjects--;
|
|
28934
|
+
this._offsetObjectIds = null; // Lazy regenerate
|
|
28935
|
+
}
|
|
28936
|
+
|
|
28895
28937
|
_webglContextLost() {
|
|
28896
28938
|
// this.loading++;
|
|
28897
28939
|
this.canvas.spinner.processes++;
|
|
@@ -63684,10 +63726,10 @@ class VBOBatchingPointsSnapInitRenderer extends VBORenderer {
|
|
|
63684
63726
|
}
|
|
63685
63727
|
src.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);");
|
|
63686
63728
|
|
|
63687
|
-
src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
63688
|
-
src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
63689
|
-
src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
63690
|
-
|
|
63729
|
+
// src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
63730
|
+
// src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
63731
|
+
// src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
63732
|
+
src.push(`outNormal = ivec4(1.0, 1.0, 1.0, 1.0);`);
|
|
63691
63733
|
src.push("outPickColor = uvec4(vPickColor);");
|
|
63692
63734
|
src.push("}");
|
|
63693
63735
|
return src;
|
|
@@ -66238,10 +66280,7 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
66238
66280
|
}
|
|
66239
66281
|
src.push("in highp vec3 relativeToOriginPosition;");
|
|
66240
66282
|
src.push("layout(location = 0) out highp ivec4 outCoords;");
|
|
66241
|
-
|
|
66242
|
-
// TODO: normal placeholder?
|
|
66243
|
-
// Primitive type?
|
|
66244
|
-
///////////////////////////////////////////
|
|
66283
|
+
src.push("layout(location = 1) out highp ivec4 outNormal;");
|
|
66245
66284
|
src.push("layout(location = 2) out lowp uvec4 outPickColor;");
|
|
66246
66285
|
src.push("void main(void) {");
|
|
66247
66286
|
if (clipping) {
|
|
@@ -66263,6 +66302,10 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
66263
66302
|
src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;");
|
|
66264
66303
|
}
|
|
66265
66304
|
src.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);");
|
|
66305
|
+
// src.push("vec3 xTangent = dFdx( vWorldPosition.xyz );");
|
|
66306
|
+
// src.push("vec3 yTangent = dFdy( vWorldPosition.xyz );");
|
|
66307
|
+
// src.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );");
|
|
66308
|
+
src.push(`outNormal = ivec4(1.0, 1.0, 1.0, 1.0);`);
|
|
66266
66309
|
src.push("outPickColor = uvec4(vPickColor);");
|
|
66267
66310
|
src.push("}");
|
|
66268
66311
|
return src;
|
|
@@ -72808,7 +72851,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72808
72851
|
const clipping = scene._sectionPlanesState.getNumAllocatedSectionPlanes() > 0;
|
|
72809
72852
|
const src = [];
|
|
72810
72853
|
src.push("#version 300 es");
|
|
72811
|
-
src.push("//
|
|
72854
|
+
src.push("// DTXTrianglesSnapInitRenderer vertex shader");
|
|
72812
72855
|
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
|
|
72813
72856
|
src.push("precision highp float;");
|
|
72814
72857
|
src.push("precision highp int;");
|
|
@@ -72950,6 +72993,9 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72950
72993
|
src.push("vFlags2 = flags2.r;");
|
|
72951
72994
|
}
|
|
72952
72995
|
src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));");
|
|
72996
|
+
|
|
72997
|
+
// TODO: Normalized color? See here:
|
|
72998
|
+
//src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) /255.0;");
|
|
72953
72999
|
src.push("vec4 clipPos = projMatrix * viewPosition;");
|
|
72954
73000
|
src.push("float tmp = clipPos.w;");
|
|
72955
73001
|
src.push("clipPos.xyzw /= tmp;");
|
|
@@ -72970,7 +73016,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
72970
73016
|
const clipping = scene._sectionPlanesState.getNumAllocatedSectionPlanes() > 0;
|
|
72971
73017
|
const src = [];
|
|
72972
73018
|
src.push('#version 300 es');
|
|
72973
|
-
src.push("//
|
|
73019
|
+
src.push("// DTXTrianglesSnapInitRenderer fragment shader");
|
|
72974
73020
|
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
|
|
72975
73021
|
src.push("precision highp float;");
|
|
72976
73022
|
src.push("precision highp int;");
|
|
@@ -83095,31 +83141,6 @@ function createDTXBuckets(geometry, enableVertexWelding, enableIndexBucketing) {
|
|
|
83095
83141
|
return buckets;
|
|
83096
83142
|
}
|
|
83097
83143
|
|
|
83098
|
-
/**
|
|
83099
|
-
* @desc A high-performance model representation for efficient rendering and low memory usage.
|
|
83100
|
-
*
|
|
83101
|
-
* * PerformanceModel was replaced with {@link SceneModel} in ````xeokit-sdk v2.4````.
|
|
83102
|
-
* * PerformanceModel currently extends {@link SceneModel}, in order to maintain backward-compatibility until we remove PerformanceModel.
|
|
83103
|
-
* * See {@link SceneModel} for API details.
|
|
83104
|
-
*
|
|
83105
|
-
* @deprecated
|
|
83106
|
-
* @implements {Drawable}
|
|
83107
|
-
* @implements {Entity}
|
|
83108
|
-
* @extends {SceneModel}
|
|
83109
|
-
*/
|
|
83110
|
-
class PerformanceModel extends SceneModel {
|
|
83111
|
-
|
|
83112
|
-
/**
|
|
83113
|
-
* See {@link VBOSceneModel} for details.
|
|
83114
|
-
*
|
|
83115
|
-
* @param owner
|
|
83116
|
-
* @param cfg
|
|
83117
|
-
*/
|
|
83118
|
-
constructor(owner, cfg = {}) {
|
|
83119
|
-
super(owner, cfg);
|
|
83120
|
-
}
|
|
83121
|
-
}
|
|
83122
|
-
|
|
83123
83144
|
/**
|
|
83124
83145
|
* A set of 3D line segments.
|
|
83125
83146
|
*
|
|
@@ -91568,6 +91589,31 @@ class QuadraticBezierCurve extends Curve {
|
|
|
91568
91589
|
}
|
|
91569
91590
|
}
|
|
91570
91591
|
|
|
91592
|
+
/**
|
|
91593
|
+
* @desc A high-performance model representation for efficient rendering and low memory usage.
|
|
91594
|
+
*
|
|
91595
|
+
* * PerformanceModel was replaced with {@link SceneModel} in ````xeokit-sdk v2.4````.
|
|
91596
|
+
* * PerformanceModel currently extends {@link SceneModel}, in order to maintain backward-compatibility until we remove PerformanceModel.
|
|
91597
|
+
* * See {@link SceneModel} for API details.
|
|
91598
|
+
*
|
|
91599
|
+
* @deprecated
|
|
91600
|
+
* @implements {Drawable}
|
|
91601
|
+
* @implements {Entity}
|
|
91602
|
+
* @extends {SceneModel}
|
|
91603
|
+
*/
|
|
91604
|
+
class PerformanceModel extends SceneModel {
|
|
91605
|
+
|
|
91606
|
+
/**
|
|
91607
|
+
* See {@link VBOSceneModel} for details.
|
|
91608
|
+
*
|
|
91609
|
+
* @param owner
|
|
91610
|
+
* @param cfg
|
|
91611
|
+
*/
|
|
91612
|
+
constructor(owner, cfg = {}) {
|
|
91613
|
+
super(owner, cfg);
|
|
91614
|
+
}
|
|
91615
|
+
}
|
|
91616
|
+
|
|
91571
91617
|
/**
|
|
91572
91618
|
* @desc A Skybox.
|
|
91573
91619
|
*/
|
|
@@ -118091,9 +118137,9 @@ const EMPTY_IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAA
|
|
|
118091
118137
|
/**
|
|
118092
118138
|
* @desc A {@link Viewer} plugin that provides methods for visualizing IfcBuildingStoreys.
|
|
118093
118139
|
*
|
|
118094
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
118140
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/navigation/#StoreyViewsPlugin_recipe3"><img src="http://xeokit.io/img/docs/StoreyViewsPlugin/minimap.gif"></a>
|
|
118095
118141
|
*
|
|
118096
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
118142
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/navigation/#StoreyViewsPlugin_recipe3)]
|
|
118097
118143
|
*
|
|
118098
118144
|
* ## Overview
|
|
118099
118145
|
*
|