@xeokit/xeokit-sdk 2.6.38 → 2.6.40
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 +68 -68
- package/dist/xeokit-sdk.es.js +68 -68
- package/dist/xeokit-sdk.es5.js +23 -22
- package/dist/xeokit-sdk.min.cjs.js +3 -3
- package/dist/xeokit-sdk.min.es.js +4 -4
- package/dist/xeokit-sdk.min.es5.js +3 -3
- package/package.json +1 -1
- package/src/extras/ContextMenu/ContextMenu.js +4 -6
- package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +10 -10
- package/src/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.js +38 -45
- package/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +6 -0
- package/src/plugins/TreeViewPlugin/RenderService.js +4 -1
- package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +12 -6
- package/src/viewer/scene/model/vbo/batching/triangles/VBOBatchingTrianglesBuffer.js +3 -3
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +2 -0
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +2 -0
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -688,7 +688,7 @@ class ContextMenu {
|
|
|
688
688
|
'</li>');
|
|
689
689
|
if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
|
|
690
690
|
html.push(
|
|
691
|
-
'<li id="' + item.id + '" class="xeokit-context-menu-item-
|
|
691
|
+
'<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
|
|
692
692
|
);
|
|
693
693
|
}
|
|
694
694
|
|
|
@@ -700,7 +700,7 @@ class ContextMenu {
|
|
|
700
700
|
'</li>');
|
|
701
701
|
if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
|
|
702
702
|
html.push(
|
|
703
|
-
'<li id="' + item.id + '" class="xeokit-context-menu-item-
|
|
703
|
+
'<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
|
|
704
704
|
);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
@@ -900,12 +900,10 @@ class ContextMenu {
|
|
|
900
900
|
const shown = getShown(this._context);
|
|
901
901
|
item.shown = shown;
|
|
902
902
|
if (!shown) {
|
|
903
|
-
itemElement.
|
|
904
|
-
itemElement.classList.add("xeokit-context-menu-item-hidden");
|
|
903
|
+
itemElement.style.display = "none";
|
|
905
904
|
continue;
|
|
906
905
|
} else {
|
|
907
|
-
itemElement.
|
|
908
|
-
itemElement.classList.add("xeokit-context-menu-item-visible");
|
|
906
|
+
itemElement.style.display = "";
|
|
909
907
|
|
|
910
908
|
}
|
|
911
909
|
const enabled = getEnabled(this._context);
|
|
@@ -88172,6 +88170,16 @@ class DistanceMeasurement extends Component {
|
|
|
88172
88170
|
const scene = this.plugin.viewer.scene;
|
|
88173
88171
|
|
|
88174
88172
|
if (this._wpDirty) {
|
|
88173
|
+
const delta = math.subVec3(
|
|
88174
|
+
this._targetWorld,
|
|
88175
|
+
this._originWorld,
|
|
88176
|
+
tmpVec3
|
|
88177
|
+
);
|
|
88178
|
+
|
|
88179
|
+
/**
|
|
88180
|
+
* The length detected for each measurement axis.
|
|
88181
|
+
*/
|
|
88182
|
+
this._factors = math.transformVec3(this._axesBasis, delta);
|
|
88175
88183
|
|
|
88176
88184
|
this._measurementOrientation = determineMeasurementOrientation(this._originWorld, this._targetWorld, 0);
|
|
88177
88185
|
if(this._measurementOrientation === 'Vertical' && this.useRotationAdjustment){
|
|
@@ -88196,16 +88204,6 @@ class DistanceMeasurement extends Component {
|
|
|
88196
88204
|
this._wp[15] = 1.0;
|
|
88197
88205
|
}
|
|
88198
88206
|
else {
|
|
88199
|
-
const delta = math.subVec3(
|
|
88200
|
-
this._targetWorld,
|
|
88201
|
-
this._originWorld,
|
|
88202
|
-
tmpVec3
|
|
88203
|
-
);
|
|
88204
|
-
|
|
88205
|
-
/**
|
|
88206
|
-
* The length detected for each measurement axis.
|
|
88207
|
-
*/
|
|
88208
|
-
this._factors = math.transformVec3(this._axesBasis, delta);
|
|
88209
88207
|
|
|
88210
88208
|
this._wp[0] = this._originWorld[0];
|
|
88211
88209
|
this._wp[1] = this._originWorld[1];
|
|
@@ -126039,12 +126037,15 @@ class RenderService {
|
|
|
126039
126037
|
return element.checked;
|
|
126040
126038
|
}
|
|
126041
126039
|
|
|
126042
|
-
setCheckbox(nodeId, checked) {
|
|
126040
|
+
setCheckbox(nodeId, checked, indeterminate = false) {
|
|
126043
126041
|
const checkbox = document.getElementById(`checkbox-${nodeId}`);
|
|
126044
126042
|
if (checkbox) {
|
|
126045
126043
|
if (checked !== checkbox.checked) {
|
|
126046
126044
|
checkbox.checked = checked;
|
|
126047
126045
|
}
|
|
126046
|
+
if (indeterminate !== checkbox.indeterminate) {
|
|
126047
|
+
checkbox.indeterminate = indeterminate;
|
|
126048
|
+
}
|
|
126048
126049
|
}
|
|
126049
126050
|
}
|
|
126050
126051
|
|
|
@@ -126432,6 +126433,7 @@ class TreeViewPlugin extends Plugin {
|
|
|
126432
126433
|
* vertical World axis. For all hierarchy types, other node types will be ordered in the ascending alphanumeric order of their titles.
|
|
126433
126434
|
* @param {Boolean} [cfg.pruneEmptyNodes=true] When true, will not contain nodes that don't have content in the {@link Scene}. These are nodes whose {@link MetaObject}s don't have {@link Entity}s.
|
|
126434
126435
|
* @param {RenderService} [cfg.renderService] Optional {@link RenderService} to use. Defaults to the {@link TreeViewPlugin}'s default {@link RenderService}.
|
|
126436
|
+
* @param {Boolean} [cfg.showIndeterminate=false] When true, will show indeterminate state for checkboxes when some but not all child nodes are checked
|
|
126435
126437
|
*/
|
|
126436
126438
|
constructor(viewer, cfg = {}) {
|
|
126437
126439
|
|
|
@@ -126483,6 +126485,7 @@ class TreeViewPlugin extends Plugin {
|
|
|
126483
126485
|
this._pruneEmptyNodes = cfg.pruneEmptyNodes;
|
|
126484
126486
|
this._showListItemElementId = null;
|
|
126485
126487
|
this._renderService = cfg.renderService || new RenderService();
|
|
126488
|
+
this._showIndeterminate = cfg.showIndeterminate ?? false;
|
|
126486
126489
|
|
|
126487
126490
|
if (!this._renderService) {
|
|
126488
126491
|
throw new Error('TreeViewPlugin: no render service set');
|
|
@@ -126524,8 +126527,10 @@ class TreeViewPlugin extends Plugin {
|
|
|
126524
126527
|
} else {
|
|
126525
126528
|
parent.numVisibleEntities--;
|
|
126526
126529
|
}
|
|
126527
|
-
|
|
126528
|
-
|
|
126530
|
+
const indeterminate = this._showIndeterminate
|
|
126531
|
+
&& parent.numVisibleEntities > 0
|
|
126532
|
+
&& parent.numVisibleEntities < parent.numEntities;
|
|
126533
|
+
this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
|
|
126529
126534
|
|
|
126530
126535
|
parent = parent.parent;
|
|
126531
126536
|
}
|
|
@@ -126607,8 +126612,10 @@ class TreeViewPlugin extends Plugin {
|
|
|
126607
126612
|
} else {
|
|
126608
126613
|
parent.numVisibleEntities -= numUpdated;
|
|
126609
126614
|
}
|
|
126610
|
-
|
|
126611
|
-
|
|
126615
|
+
const indeterminate = this._showIndeterminate
|
|
126616
|
+
&& parent.numVisibleEntities > 0
|
|
126617
|
+
&& parent.numVisibleEntities < parent.numEntities;
|
|
126618
|
+
this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
|
|
126612
126619
|
|
|
126613
126620
|
parent = parent.parent;
|
|
126614
126621
|
}
|
|
@@ -126848,8 +126855,8 @@ class TreeViewPlugin extends Plugin {
|
|
|
126848
126855
|
collapse() {
|
|
126849
126856
|
for (let i = 0, len = this._rootNodes.length; i < len; i++) {
|
|
126850
126857
|
const rootNode = this._rootNodes[i];
|
|
126851
|
-
const
|
|
126852
|
-
this._collapseNode(
|
|
126858
|
+
const nodeId = rootNode.nodeId;
|
|
126859
|
+
this._collapseNode(nodeId);
|
|
126853
126860
|
}
|
|
126854
126861
|
}
|
|
126855
126862
|
|
|
@@ -139495,8 +139502,8 @@ class DotBIMDefaultDataSource {
|
|
|
139495
139502
|
* set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
|
|
139496
139503
|
* * When loading, can set the World-space position, scale and rotation of each model within World space,
|
|
139497
139504
|
* along with initial properties for all the model's {@link Entity}s.
|
|
139498
|
-
* * Allows to mask which
|
|
139499
|
-
* * Allows to configure initial viewer state for specified
|
|
139505
|
+
* * Allows to mask which types we want to load.
|
|
139506
|
+
* * Allows to configure initial viewer state for specified types (color, visibility, selection, highlighted, X-rayed, pickable, etc).
|
|
139500
139507
|
*
|
|
139501
139508
|
* ## Usage
|
|
139502
139509
|
*
|
|
@@ -139566,9 +139573,9 @@ class DotBIMDefaultDataSource {
|
|
|
139566
139573
|
* });
|
|
139567
139574
|
* ````
|
|
139568
139575
|
*
|
|
139569
|
-
* ## Including and excluding
|
|
139576
|
+
* ## Including and excluding types
|
|
139570
139577
|
*
|
|
139571
|
-
* We can also load only those objects that have the specified
|
|
139578
|
+
* We can also load only those objects that have the specified types. In the example below, we'll load only the
|
|
139572
139579
|
* objects that represent walls.
|
|
139573
139580
|
*
|
|
139574
139581
|
* ````javascript
|
|
@@ -139579,7 +139586,7 @@ class DotBIMDefaultDataSource {
|
|
|
139579
139586
|
* });
|
|
139580
139587
|
* ````
|
|
139581
139588
|
*
|
|
139582
|
-
* We can also load only those objects that **don't** have the specified
|
|
139589
|
+
* We can also load only those objects that **don't** have the specified types. In the example below, we'll load only the
|
|
139583
139590
|
* objects that do not represent empty space.
|
|
139584
139591
|
*
|
|
139585
139592
|
* ````javascript
|
|
@@ -139590,13 +139597,13 @@ class DotBIMDefaultDataSource {
|
|
|
139590
139597
|
* });
|
|
139591
139598
|
* ````
|
|
139592
139599
|
*
|
|
139593
|
-
* # Configuring initial
|
|
139600
|
+
* # Configuring initial object appearances
|
|
139594
139601
|
*
|
|
139595
|
-
* We can specify the custom initial appearance of loaded objects according to their
|
|
139602
|
+
* We can specify the custom initial appearance of loaded objects according to their types.
|
|
139596
139603
|
*
|
|
139597
139604
|
* This is useful for things like:
|
|
139598
139605
|
*
|
|
139599
|
-
* * setting the colors to our objects according to their
|
|
139606
|
+
* * setting the colors to our objects according to their types,
|
|
139600
139607
|
* * automatically hiding ````IfcSpace```` objects, and
|
|
139601
139608
|
* * ensuring that ````IfcWindow```` objects are always transparent.
|
|
139602
139609
|
* <br>
|
|
@@ -139628,7 +139635,7 @@ class DotBIMDefaultDataSource {
|
|
|
139628
139635
|
* });
|
|
139629
139636
|
* ````
|
|
139630
139637
|
*
|
|
139631
|
-
* When we don't customize the appearance of
|
|
139638
|
+
* When we don't customize the appearance of types, as just above, then IfcSpace elements tend to obscure other
|
|
139632
139639
|
* elements, which can be confusing.
|
|
139633
139640
|
*
|
|
139634
139641
|
* It's often helpful to make IfcSpaces transparent and unpickable, like this:
|
|
@@ -139828,36 +139835,36 @@ class DotBIMLoaderPlugin extends Plugin {
|
|
|
139828
139835
|
|
|
139829
139836
|
const dbMeshLoaded = {};
|
|
139830
139837
|
|
|
139831
|
-
const
|
|
139832
|
-
const
|
|
139833
|
-
const
|
|
139834
|
-
const
|
|
139838
|
+
const projectId = math.createUUID();
|
|
139839
|
+
const siteId = math.createUUID();
|
|
139840
|
+
const buildingId = math.createUUID();
|
|
139841
|
+
const buildingStoryId = math.createUUID();
|
|
139835
139842
|
|
|
139836
139843
|
const metaModelData = {
|
|
139837
139844
|
metaObjects: [
|
|
139838
139845
|
{
|
|
139839
|
-
id:
|
|
139840
|
-
name: "
|
|
139841
|
-
type: "
|
|
139846
|
+
id: projectId,
|
|
139847
|
+
name: "Project",
|
|
139848
|
+
type: "Project",
|
|
139842
139849
|
parent: null
|
|
139843
139850
|
},
|
|
139844
139851
|
{
|
|
139845
|
-
id:
|
|
139846
|
-
name: "
|
|
139847
|
-
type: "
|
|
139848
|
-
parent:
|
|
139852
|
+
id: siteId,
|
|
139853
|
+
name: "Site",
|
|
139854
|
+
type: "Site",
|
|
139855
|
+
parent: projectId
|
|
139849
139856
|
},
|
|
139850
139857
|
{
|
|
139851
|
-
id:
|
|
139852
|
-
name: "
|
|
139853
|
-
type: "
|
|
139854
|
-
parent:
|
|
139858
|
+
id: buildingId,
|
|
139859
|
+
name: "Building",
|
|
139860
|
+
type: "Building",
|
|
139861
|
+
parent: siteId
|
|
139855
139862
|
},
|
|
139856
139863
|
{
|
|
139857
|
-
id:
|
|
139858
|
-
name: "
|
|
139859
|
-
type: "
|
|
139860
|
-
parent:
|
|
139864
|
+
id: buildingStoryId,
|
|
139865
|
+
name: "BuildingStorey",
|
|
139866
|
+
type: "BuildingStorey",
|
|
139867
|
+
parent: buildingId
|
|
139861
139868
|
}
|
|
139862
139869
|
],
|
|
139863
139870
|
propertySets: []
|
|
@@ -140024,30 +140031,23 @@ class DotBIMLoaderPlugin extends Plugin {
|
|
|
140024
140031
|
});
|
|
140025
140032
|
}
|
|
140026
140033
|
|
|
140034
|
+
let properties = [];
|
|
140027
140035
|
for (let infoKey in info) {
|
|
140028
|
-
|
|
140029
|
-
|
|
140030
|
-
|
|
140031
|
-
|
|
140032
|
-
}
|
|
140033
|
-
properties.push({
|
|
140034
|
-
name: infoKey,
|
|
140035
|
-
value: info[infoKey]
|
|
140036
|
-
});
|
|
140037
|
-
}
|
|
140038
|
-
if (properties) {
|
|
140039
|
-
metaModelData.propertySets.push({
|
|
140040
|
-
id: objectId,
|
|
140041
|
-
properties
|
|
140042
|
-
});
|
|
140043
|
-
}
|
|
140036
|
+
properties.push({
|
|
140037
|
+
name: infoKey,
|
|
140038
|
+
value: info[infoKey]
|
|
140039
|
+
});
|
|
140044
140040
|
}
|
|
140041
|
+
metaModelData.propertySets.push({
|
|
140042
|
+
id: objectId,
|
|
140043
|
+
properties
|
|
140044
|
+
});
|
|
140045
140045
|
|
|
140046
140046
|
metaModelData.metaObjects.push({
|
|
140047
140047
|
id: objectId,
|
|
140048
140048
|
name: info && info.Name && info.Name !== "None" ? info.Name : `${element.type} ${objectId}`,
|
|
140049
140049
|
type: element.type,
|
|
140050
|
-
parent:
|
|
140050
|
+
parent: buildingStoryId,
|
|
140051
140051
|
propertySetIds: [objectId]
|
|
140052
140052
|
});
|
|
140053
140053
|
}
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -684,7 +684,7 @@ class ContextMenu {
|
|
|
684
684
|
'</li>');
|
|
685
685
|
if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
|
|
686
686
|
html.push(
|
|
687
|
-
'<li id="' + item.id + '" class="xeokit-context-menu-item-
|
|
687
|
+
'<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
|
|
688
688
|
);
|
|
689
689
|
}
|
|
690
690
|
|
|
@@ -696,7 +696,7 @@ class ContextMenu {
|
|
|
696
696
|
'</li>');
|
|
697
697
|
if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
|
|
698
698
|
html.push(
|
|
699
|
-
'<li id="' + item.id + '" class="xeokit-context-menu-item-
|
|
699
|
+
'<li id="' + item.id + '" class="xeokit-context-menu-item-separator"></li>'
|
|
700
700
|
);
|
|
701
701
|
}
|
|
702
702
|
}
|
|
@@ -896,12 +896,10 @@ class ContextMenu {
|
|
|
896
896
|
const shown = getShown(this._context);
|
|
897
897
|
item.shown = shown;
|
|
898
898
|
if (!shown) {
|
|
899
|
-
itemElement.
|
|
900
|
-
itemElement.classList.add("xeokit-context-menu-item-hidden");
|
|
899
|
+
itemElement.style.display = "none";
|
|
901
900
|
continue;
|
|
902
901
|
} else {
|
|
903
|
-
itemElement.
|
|
904
|
-
itemElement.classList.add("xeokit-context-menu-item-visible");
|
|
902
|
+
itemElement.style.display = "";
|
|
905
903
|
|
|
906
904
|
}
|
|
907
905
|
const enabled = getEnabled(this._context);
|
|
@@ -88168,6 +88166,16 @@ class DistanceMeasurement extends Component {
|
|
|
88168
88166
|
const scene = this.plugin.viewer.scene;
|
|
88169
88167
|
|
|
88170
88168
|
if (this._wpDirty) {
|
|
88169
|
+
const delta = math.subVec3(
|
|
88170
|
+
this._targetWorld,
|
|
88171
|
+
this._originWorld,
|
|
88172
|
+
tmpVec3
|
|
88173
|
+
);
|
|
88174
|
+
|
|
88175
|
+
/**
|
|
88176
|
+
* The length detected for each measurement axis.
|
|
88177
|
+
*/
|
|
88178
|
+
this._factors = math.transformVec3(this._axesBasis, delta);
|
|
88171
88179
|
|
|
88172
88180
|
this._measurementOrientation = determineMeasurementOrientation(this._originWorld, this._targetWorld, 0);
|
|
88173
88181
|
if(this._measurementOrientation === 'Vertical' && this.useRotationAdjustment){
|
|
@@ -88192,16 +88200,6 @@ class DistanceMeasurement extends Component {
|
|
|
88192
88200
|
this._wp[15] = 1.0;
|
|
88193
88201
|
}
|
|
88194
88202
|
else {
|
|
88195
|
-
const delta = math.subVec3(
|
|
88196
|
-
this._targetWorld,
|
|
88197
|
-
this._originWorld,
|
|
88198
|
-
tmpVec3
|
|
88199
|
-
);
|
|
88200
|
-
|
|
88201
|
-
/**
|
|
88202
|
-
* The length detected for each measurement axis.
|
|
88203
|
-
*/
|
|
88204
|
-
this._factors = math.transformVec3(this._axesBasis, delta);
|
|
88205
88203
|
|
|
88206
88204
|
this._wp[0] = this._originWorld[0];
|
|
88207
88205
|
this._wp[1] = this._originWorld[1];
|
|
@@ -126035,12 +126033,15 @@ class RenderService {
|
|
|
126035
126033
|
return element.checked;
|
|
126036
126034
|
}
|
|
126037
126035
|
|
|
126038
|
-
setCheckbox(nodeId, checked) {
|
|
126036
|
+
setCheckbox(nodeId, checked, indeterminate = false) {
|
|
126039
126037
|
const checkbox = document.getElementById(`checkbox-${nodeId}`);
|
|
126040
126038
|
if (checkbox) {
|
|
126041
126039
|
if (checked !== checkbox.checked) {
|
|
126042
126040
|
checkbox.checked = checked;
|
|
126043
126041
|
}
|
|
126042
|
+
if (indeterminate !== checkbox.indeterminate) {
|
|
126043
|
+
checkbox.indeterminate = indeterminate;
|
|
126044
|
+
}
|
|
126044
126045
|
}
|
|
126045
126046
|
}
|
|
126046
126047
|
|
|
@@ -126428,6 +126429,7 @@ class TreeViewPlugin extends Plugin {
|
|
|
126428
126429
|
* vertical World axis. For all hierarchy types, other node types will be ordered in the ascending alphanumeric order of their titles.
|
|
126429
126430
|
* @param {Boolean} [cfg.pruneEmptyNodes=true] When true, will not contain nodes that don't have content in the {@link Scene}. These are nodes whose {@link MetaObject}s don't have {@link Entity}s.
|
|
126430
126431
|
* @param {RenderService} [cfg.renderService] Optional {@link RenderService} to use. Defaults to the {@link TreeViewPlugin}'s default {@link RenderService}.
|
|
126432
|
+
* @param {Boolean} [cfg.showIndeterminate=false] When true, will show indeterminate state for checkboxes when some but not all child nodes are checked
|
|
126431
126433
|
*/
|
|
126432
126434
|
constructor(viewer, cfg = {}) {
|
|
126433
126435
|
|
|
@@ -126479,6 +126481,7 @@ class TreeViewPlugin extends Plugin {
|
|
|
126479
126481
|
this._pruneEmptyNodes = cfg.pruneEmptyNodes;
|
|
126480
126482
|
this._showListItemElementId = null;
|
|
126481
126483
|
this._renderService = cfg.renderService || new RenderService();
|
|
126484
|
+
this._showIndeterminate = cfg.showIndeterminate ?? false;
|
|
126482
126485
|
|
|
126483
126486
|
if (!this._renderService) {
|
|
126484
126487
|
throw new Error('TreeViewPlugin: no render service set');
|
|
@@ -126520,8 +126523,10 @@ class TreeViewPlugin extends Plugin {
|
|
|
126520
126523
|
} else {
|
|
126521
126524
|
parent.numVisibleEntities--;
|
|
126522
126525
|
}
|
|
126523
|
-
|
|
126524
|
-
|
|
126526
|
+
const indeterminate = this._showIndeterminate
|
|
126527
|
+
&& parent.numVisibleEntities > 0
|
|
126528
|
+
&& parent.numVisibleEntities < parent.numEntities;
|
|
126529
|
+
this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
|
|
126525
126530
|
|
|
126526
126531
|
parent = parent.parent;
|
|
126527
126532
|
}
|
|
@@ -126603,8 +126608,10 @@ class TreeViewPlugin extends Plugin {
|
|
|
126603
126608
|
} else {
|
|
126604
126609
|
parent.numVisibleEntities -= numUpdated;
|
|
126605
126610
|
}
|
|
126606
|
-
|
|
126607
|
-
|
|
126611
|
+
const indeterminate = this._showIndeterminate
|
|
126612
|
+
&& parent.numVisibleEntities > 0
|
|
126613
|
+
&& parent.numVisibleEntities < parent.numEntities;
|
|
126614
|
+
this._renderService.setCheckbox(parent.nodeId, (parent.numVisibleEntities > 0), indeterminate);
|
|
126608
126615
|
|
|
126609
126616
|
parent = parent.parent;
|
|
126610
126617
|
}
|
|
@@ -126844,8 +126851,8 @@ class TreeViewPlugin extends Plugin {
|
|
|
126844
126851
|
collapse() {
|
|
126845
126852
|
for (let i = 0, len = this._rootNodes.length; i < len; i++) {
|
|
126846
126853
|
const rootNode = this._rootNodes[i];
|
|
126847
|
-
const
|
|
126848
|
-
this._collapseNode(
|
|
126854
|
+
const nodeId = rootNode.nodeId;
|
|
126855
|
+
this._collapseNode(nodeId);
|
|
126849
126856
|
}
|
|
126850
126857
|
}
|
|
126851
126858
|
|
|
@@ -139491,8 +139498,8 @@ class DotBIMDefaultDataSource {
|
|
|
139491
139498
|
* set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
|
|
139492
139499
|
* * When loading, can set the World-space position, scale and rotation of each model within World space,
|
|
139493
139500
|
* along with initial properties for all the model's {@link Entity}s.
|
|
139494
|
-
* * Allows to mask which
|
|
139495
|
-
* * Allows to configure initial viewer state for specified
|
|
139501
|
+
* * Allows to mask which types we want to load.
|
|
139502
|
+
* * Allows to configure initial viewer state for specified types (color, visibility, selection, highlighted, X-rayed, pickable, etc).
|
|
139496
139503
|
*
|
|
139497
139504
|
* ## Usage
|
|
139498
139505
|
*
|
|
@@ -139562,9 +139569,9 @@ class DotBIMDefaultDataSource {
|
|
|
139562
139569
|
* });
|
|
139563
139570
|
* ````
|
|
139564
139571
|
*
|
|
139565
|
-
* ## Including and excluding
|
|
139572
|
+
* ## Including and excluding types
|
|
139566
139573
|
*
|
|
139567
|
-
* We can also load only those objects that have the specified
|
|
139574
|
+
* We can also load only those objects that have the specified types. In the example below, we'll load only the
|
|
139568
139575
|
* objects that represent walls.
|
|
139569
139576
|
*
|
|
139570
139577
|
* ````javascript
|
|
@@ -139575,7 +139582,7 @@ class DotBIMDefaultDataSource {
|
|
|
139575
139582
|
* });
|
|
139576
139583
|
* ````
|
|
139577
139584
|
*
|
|
139578
|
-
* We can also load only those objects that **don't** have the specified
|
|
139585
|
+
* We can also load only those objects that **don't** have the specified types. In the example below, we'll load only the
|
|
139579
139586
|
* objects that do not represent empty space.
|
|
139580
139587
|
*
|
|
139581
139588
|
* ````javascript
|
|
@@ -139586,13 +139593,13 @@ class DotBIMDefaultDataSource {
|
|
|
139586
139593
|
* });
|
|
139587
139594
|
* ````
|
|
139588
139595
|
*
|
|
139589
|
-
* # Configuring initial
|
|
139596
|
+
* # Configuring initial object appearances
|
|
139590
139597
|
*
|
|
139591
|
-
* We can specify the custom initial appearance of loaded objects according to their
|
|
139598
|
+
* We can specify the custom initial appearance of loaded objects according to their types.
|
|
139592
139599
|
*
|
|
139593
139600
|
* This is useful for things like:
|
|
139594
139601
|
*
|
|
139595
|
-
* * setting the colors to our objects according to their
|
|
139602
|
+
* * setting the colors to our objects according to their types,
|
|
139596
139603
|
* * automatically hiding ````IfcSpace```` objects, and
|
|
139597
139604
|
* * ensuring that ````IfcWindow```` objects are always transparent.
|
|
139598
139605
|
* <br>
|
|
@@ -139624,7 +139631,7 @@ class DotBIMDefaultDataSource {
|
|
|
139624
139631
|
* });
|
|
139625
139632
|
* ````
|
|
139626
139633
|
*
|
|
139627
|
-
* When we don't customize the appearance of
|
|
139634
|
+
* When we don't customize the appearance of types, as just above, then IfcSpace elements tend to obscure other
|
|
139628
139635
|
* elements, which can be confusing.
|
|
139629
139636
|
*
|
|
139630
139637
|
* It's often helpful to make IfcSpaces transparent and unpickable, like this:
|
|
@@ -139824,36 +139831,36 @@ class DotBIMLoaderPlugin extends Plugin {
|
|
|
139824
139831
|
|
|
139825
139832
|
const dbMeshLoaded = {};
|
|
139826
139833
|
|
|
139827
|
-
const
|
|
139828
|
-
const
|
|
139829
|
-
const
|
|
139830
|
-
const
|
|
139834
|
+
const projectId = math.createUUID();
|
|
139835
|
+
const siteId = math.createUUID();
|
|
139836
|
+
const buildingId = math.createUUID();
|
|
139837
|
+
const buildingStoryId = math.createUUID();
|
|
139831
139838
|
|
|
139832
139839
|
const metaModelData = {
|
|
139833
139840
|
metaObjects: [
|
|
139834
139841
|
{
|
|
139835
|
-
id:
|
|
139836
|
-
name: "
|
|
139837
|
-
type: "
|
|
139842
|
+
id: projectId,
|
|
139843
|
+
name: "Project",
|
|
139844
|
+
type: "Project",
|
|
139838
139845
|
parent: null
|
|
139839
139846
|
},
|
|
139840
139847
|
{
|
|
139841
|
-
id:
|
|
139842
|
-
name: "
|
|
139843
|
-
type: "
|
|
139844
|
-
parent:
|
|
139848
|
+
id: siteId,
|
|
139849
|
+
name: "Site",
|
|
139850
|
+
type: "Site",
|
|
139851
|
+
parent: projectId
|
|
139845
139852
|
},
|
|
139846
139853
|
{
|
|
139847
|
-
id:
|
|
139848
|
-
name: "
|
|
139849
|
-
type: "
|
|
139850
|
-
parent:
|
|
139854
|
+
id: buildingId,
|
|
139855
|
+
name: "Building",
|
|
139856
|
+
type: "Building",
|
|
139857
|
+
parent: siteId
|
|
139851
139858
|
},
|
|
139852
139859
|
{
|
|
139853
|
-
id:
|
|
139854
|
-
name: "
|
|
139855
|
-
type: "
|
|
139856
|
-
parent:
|
|
139860
|
+
id: buildingStoryId,
|
|
139861
|
+
name: "BuildingStorey",
|
|
139862
|
+
type: "BuildingStorey",
|
|
139863
|
+
parent: buildingId
|
|
139857
139864
|
}
|
|
139858
139865
|
],
|
|
139859
139866
|
propertySets: []
|
|
@@ -140020,30 +140027,23 @@ class DotBIMLoaderPlugin extends Plugin {
|
|
|
140020
140027
|
});
|
|
140021
140028
|
}
|
|
140022
140029
|
|
|
140030
|
+
let properties = [];
|
|
140023
140031
|
for (let infoKey in info) {
|
|
140024
|
-
|
|
140025
|
-
|
|
140026
|
-
|
|
140027
|
-
|
|
140028
|
-
}
|
|
140029
|
-
properties.push({
|
|
140030
|
-
name: infoKey,
|
|
140031
|
-
value: info[infoKey]
|
|
140032
|
-
});
|
|
140033
|
-
}
|
|
140034
|
-
if (properties) {
|
|
140035
|
-
metaModelData.propertySets.push({
|
|
140036
|
-
id: objectId,
|
|
140037
|
-
properties
|
|
140038
|
-
});
|
|
140039
|
-
}
|
|
140032
|
+
properties.push({
|
|
140033
|
+
name: infoKey,
|
|
140034
|
+
value: info[infoKey]
|
|
140035
|
+
});
|
|
140040
140036
|
}
|
|
140037
|
+
metaModelData.propertySets.push({
|
|
140038
|
+
id: objectId,
|
|
140039
|
+
properties
|
|
140040
|
+
});
|
|
140041
140041
|
|
|
140042
140042
|
metaModelData.metaObjects.push({
|
|
140043
140043
|
id: objectId,
|
|
140044
140044
|
name: info && info.Name && info.Name !== "None" ? info.Name : `${element.type} ${objectId}`,
|
|
140045
140045
|
type: element.type,
|
|
140046
|
-
parent:
|
|
140046
|
+
parent: buildingStoryId,
|
|
140047
140047
|
propertySetIds: [objectId]
|
|
140048
140048
|
});
|
|
140049
140049
|
}
|