@xeokit/xeokit-sdk 2.3.3 → 2.3.5
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 +150 -24
- package/dist/xeokit-sdk.es.js +150 -24
- package/dist/xeokit-sdk.es5.js +52 -10
- package/dist/xeokit-sdk.min.cjs.js +2 -2
- package/dist/xeokit-sdk.min.es.js +2 -2
- package/dist/xeokit-sdk.min.es5.js +1 -1
- package/package.json +1 -1
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -81143,6 +81143,9 @@ class DistanceMeasurement extends Component {
|
|
|
81143
81143
|
this._targetVisible = false;
|
|
81144
81144
|
this._wireVisible = false;
|
|
81145
81145
|
this._axisVisible = false;
|
|
81146
|
+
this._xAxisVisible = false;
|
|
81147
|
+
this._yAxisVisible = false;
|
|
81148
|
+
this._zAxisVisible = false;
|
|
81146
81149
|
this._axisEnabled = true;
|
|
81147
81150
|
this._labelsVisible = false;
|
|
81148
81151
|
this._clickable = true;
|
|
@@ -81195,6 +81198,9 @@ class DistanceMeasurement extends Component {
|
|
|
81195
81198
|
this.targetVisible = cfg.targetVisible;
|
|
81196
81199
|
this.wireVisible = cfg.wireVisible;
|
|
81197
81200
|
this.axisVisible = cfg.axisVisible;
|
|
81201
|
+
this.xAxisVisible = cfg.xAxisVisible;
|
|
81202
|
+
this.yAxisVisible = cfg.yAxisVisible;
|
|
81203
|
+
this.zAxisVisible = cfg.zAxisVisible;
|
|
81198
81204
|
this.labelsVisible = cfg.labelsVisible;
|
|
81199
81205
|
}
|
|
81200
81206
|
|
|
@@ -81360,9 +81366,11 @@ class DistanceMeasurement extends Component {
|
|
|
81360
81366
|
|
|
81361
81367
|
this._originDot.setVisible(this._visible && this._originVisible);
|
|
81362
81368
|
this._targetDot.setVisible(this._visible && this._targetVisible);
|
|
81363
|
-
|
|
81364
|
-
this.
|
|
81365
|
-
this.
|
|
81369
|
+
|
|
81370
|
+
this._xAxisWire.setVisible(this.axisVisible && this.xAxisVisible);
|
|
81371
|
+
this._yAxisWire.setVisible(this.axisVisible && this.yAxisVisible);
|
|
81372
|
+
this._zAxisWire.setVisible(this.axisVisible && this.zAxisVisible);
|
|
81373
|
+
|
|
81366
81374
|
this._lengthWire.setVisible(this.wireVisible);
|
|
81367
81375
|
this._lengthLabel.setCulled(!this.wireVisible);
|
|
81368
81376
|
|
|
@@ -81445,20 +81453,30 @@ class DistanceMeasurement extends Component {
|
|
|
81445
81453
|
* @type {Boolean}
|
|
81446
81454
|
*/
|
|
81447
81455
|
set visible(value) {
|
|
81456
|
+
|
|
81448
81457
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultVisible;
|
|
81458
|
+
|
|
81449
81459
|
this._visible = value;
|
|
81460
|
+
|
|
81450
81461
|
this._originDot.setVisible(this._visible && this._originVisible);
|
|
81451
81462
|
this._targetDot.setVisible(this._visible && this._targetVisible);
|
|
81452
81463
|
this._lengthWire.setVisible(this._visible && this._wireVisible);
|
|
81453
81464
|
this._lengthLabel.setVisible(this._visible && this._wireVisible);
|
|
81454
|
-
|
|
81455
|
-
this.
|
|
81456
|
-
this.
|
|
81457
|
-
this.
|
|
81458
|
-
|
|
81459
|
-
this.
|
|
81460
|
-
this.
|
|
81465
|
+
|
|
81466
|
+
const xAxisVisible = this._visible && this._axisVisible && this._xAxisVisible;
|
|
81467
|
+
const yAxisVisible = this._visible && this._axisVisible && this._yAxisVisible;
|
|
81468
|
+
const zAxisVisible = this._visible && this._axisVisible && this._zAxisVisible;
|
|
81469
|
+
|
|
81470
|
+
this._xAxisWire.setVisible(xAxisVisible);
|
|
81471
|
+
this._yAxisWire.setVisible(yAxisVisible);
|
|
81472
|
+
this._zAxisWire.setVisible(zAxisVisible);
|
|
81473
|
+
|
|
81474
|
+
this._xAxisLabel.setVisible(xAxisVisible && !this._xAxisLabelCulled);
|
|
81475
|
+
this._yAxisLabel.setVisible(yAxisVisible && !this._yAxisLabelCulled);
|
|
81476
|
+
this._zAxisLabel.setVisible(zAxisVisible && !this._zAxisLabelCulled);
|
|
81477
|
+
|
|
81461
81478
|
this._cpDirty = true;
|
|
81479
|
+
|
|
81462
81480
|
this._needUpdate();
|
|
81463
81481
|
}
|
|
81464
81482
|
|
|
@@ -81522,12 +81540,12 @@ class DistanceMeasurement extends Component {
|
|
|
81522
81540
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81523
81541
|
this._axisEnabled = value;
|
|
81524
81542
|
var axisVisible = this._visible && this._axisVisible && this._axisEnabled;
|
|
81525
|
-
this._xAxisWire.setVisible(axisVisible);
|
|
81526
|
-
this._yAxisWire.setVisible(axisVisible);
|
|
81527
|
-
this._zAxisWire.setVisible(axisVisible);
|
|
81528
|
-
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled);
|
|
81529
|
-
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled);
|
|
81530
|
-
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled);
|
|
81543
|
+
this._xAxisWire.setVisible(axisVisible && this._xAxisVisible);
|
|
81544
|
+
this._yAxisWire.setVisible(axisVisible && this._yAxisVisible);
|
|
81545
|
+
this._zAxisWire.setVisible(axisVisible && this._zAxisVisible);
|
|
81546
|
+
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled&& this._xAxisVisible);
|
|
81547
|
+
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled&& this._xAxisVisible);
|
|
81548
|
+
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled&& this._xAxisVisible);
|
|
81531
81549
|
this._cpDirty = true;
|
|
81532
81550
|
this._needUpdate();
|
|
81533
81551
|
}
|
|
@@ -81554,25 +81572,109 @@ class DistanceMeasurement extends Component {
|
|
|
81554
81572
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81555
81573
|
this._axisVisible = value;
|
|
81556
81574
|
var axisVisible = this._visible && this._axisVisible && this._axisEnabled;
|
|
81575
|
+
this._xAxisWire.setVisible(axisVisible && this._xAxisVisible);
|
|
81576
|
+
this._yAxisWire.setVisible(axisVisible && this._yAxisVisible);
|
|
81577
|
+
this._zAxisWire.setVisible(axisVisible && this._zAxisVisible);
|
|
81578
|
+
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled&& this._xAxisVisible);
|
|
81579
|
+
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled&& this._yAxisVisible);
|
|
81580
|
+
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled&& this._zAxisVisible);
|
|
81581
|
+
this._cpDirty = true;
|
|
81582
|
+
this._needUpdate();
|
|
81583
|
+
}
|
|
81584
|
+
|
|
81585
|
+
/**
|
|
81586
|
+
* Gets if the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81587
|
+
*
|
|
81588
|
+
* Wires are only shown if enabled and visible.
|
|
81589
|
+
*
|
|
81590
|
+
* @type {Boolean}
|
|
81591
|
+
*/
|
|
81592
|
+
get axisVisible() {
|
|
81593
|
+
return this._axisVisible;
|
|
81594
|
+
}
|
|
81595
|
+
|
|
81596
|
+
/**
|
|
81597
|
+
* Sets if the X-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81598
|
+
*
|
|
81599
|
+
* Wires are only shown if enabled and visible.
|
|
81600
|
+
*
|
|
81601
|
+
* @type {Boolean}
|
|
81602
|
+
*/
|
|
81603
|
+
set xAxisVisible(value) {
|
|
81604
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81605
|
+
this._xAxisVisible = value;
|
|
81606
|
+
const axisVisible = this._visible && this._axisVisible && this._xAxisVisible && this._axisEnabled;
|
|
81557
81607
|
this._xAxisWire.setVisible(axisVisible);
|
|
81558
|
-
this._yAxisWire.setVisible(axisVisible);
|
|
81559
|
-
this._zAxisWire.setVisible(axisVisible);
|
|
81560
81608
|
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled);
|
|
81609
|
+
this._cpDirty = true;
|
|
81610
|
+
this._needUpdate();
|
|
81611
|
+
}
|
|
81612
|
+
|
|
81613
|
+
/**
|
|
81614
|
+
* Gets if the X-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81615
|
+
*
|
|
81616
|
+
* Wires are only shown if enabled and visible.
|
|
81617
|
+
*
|
|
81618
|
+
* @type {Boolean}
|
|
81619
|
+
*/
|
|
81620
|
+
get xAxisVisible() {
|
|
81621
|
+
return this._xAxisVisible;
|
|
81622
|
+
}
|
|
81623
|
+
|
|
81624
|
+
/**
|
|
81625
|
+
* Sets if the Y-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81626
|
+
*
|
|
81627
|
+
* Wires are only shown if enabled and visible.
|
|
81628
|
+
*
|
|
81629
|
+
* @type {Boolean}
|
|
81630
|
+
*/
|
|
81631
|
+
set yAxisVisible(value) {
|
|
81632
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81633
|
+
this._yAxisVisible = value;
|
|
81634
|
+
const axisVisible = this._visible && this._axisVisible && this._yAxisVisible && this._axisEnabled;
|
|
81635
|
+
this._yAxisWire.setVisible(axisVisible);
|
|
81561
81636
|
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled);
|
|
81637
|
+
this._cpDirty = true;
|
|
81638
|
+
this._needUpdate();
|
|
81639
|
+
}
|
|
81640
|
+
|
|
81641
|
+
/**
|
|
81642
|
+
* Gets if the Y-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81643
|
+
*
|
|
81644
|
+
* Wires are only shown if enabled and visible.
|
|
81645
|
+
*
|
|
81646
|
+
* @type {Boolean}
|
|
81647
|
+
*/
|
|
81648
|
+
get yAxisVisible() {
|
|
81649
|
+
return this._yAxisVisible;
|
|
81650
|
+
}
|
|
81651
|
+
|
|
81652
|
+
/**
|
|
81653
|
+
* Sets if the Z-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81654
|
+
*
|
|
81655
|
+
* Wires are only shown if enabled and visible.
|
|
81656
|
+
*
|
|
81657
|
+
* @type {Boolean}
|
|
81658
|
+
*/
|
|
81659
|
+
set zAxisVisible(value) {
|
|
81660
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81661
|
+
this._zAxisVisible = value;
|
|
81662
|
+
const axisVisible = this._visible && this._axisVisible && this._zAxisVisible && this._axisEnabled;
|
|
81663
|
+
this._zAxisWire.setVisible(axisVisible);
|
|
81562
81664
|
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled);
|
|
81563
81665
|
this._cpDirty = true;
|
|
81564
81666
|
this._needUpdate();
|
|
81565
81667
|
}
|
|
81566
81668
|
|
|
81567
81669
|
/**
|
|
81568
|
-
* Gets if the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81670
|
+
* Gets if the Z-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81569
81671
|
*
|
|
81570
81672
|
* Wires are only shown if enabled and visible.
|
|
81571
81673
|
*
|
|
81572
81674
|
* @type {Boolean}
|
|
81573
81675
|
*/
|
|
81574
|
-
get
|
|
81575
|
-
return this.
|
|
81676
|
+
get zAxisVisible() {
|
|
81677
|
+
return this._zAxisVisible;
|
|
81576
81678
|
}
|
|
81577
81679
|
|
|
81578
81680
|
/**
|
|
@@ -87603,6 +87705,9 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87603
87705
|
this._currentDistanceMeasurementByMouseInittouchState = {
|
|
87604
87706
|
wireVisible: null,
|
|
87605
87707
|
axisVisible: null,
|
|
87708
|
+
xAxisVisible: null,
|
|
87709
|
+
yaxisVisible: null,
|
|
87710
|
+
zAxisVisible: null,
|
|
87606
87711
|
targetVisible: null,
|
|
87607
87712
|
};
|
|
87608
87713
|
|
|
@@ -87690,6 +87795,9 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87690
87795
|
if (this._currentDistanceMeasurementByMouse) {
|
|
87691
87796
|
this._currentDistanceMeasurementByMouse.wireVisible = this._currentDistanceMeasurementByMouseInittouchState.wireVisible;
|
|
87692
87797
|
this._currentDistanceMeasurementByMouse.axisVisible = this._currentDistanceMeasurementByMouseInittouchState.axisVisible && this.plugin.defaultAxisVisible;
|
|
87798
|
+
this._currentDistanceMeasurementByMouse.xAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.xAxisVisible && this.plugin.defaultXAxisVisible;
|
|
87799
|
+
this._currentDistanceMeasurementByMouse.yAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.yAxisVisible && this.plugin.defaultYAxisVisible;
|
|
87800
|
+
this._currentDistanceMeasurementByMouse.zAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.zAxisVisible && this.plugin.defaultZAxisVisible;
|
|
87693
87801
|
this._currentDistanceMeasurementByMouse.targetVisible = this._currentDistanceMeasurementByMouseInittouchState.targetVisible;
|
|
87694
87802
|
this._currentDistanceMeasurementByMouse.target.entity = mouseHoverEntity;
|
|
87695
87803
|
this._currentDistanceMeasurementByMouse.target.worldPos = mouseWorldPos;
|
|
@@ -87754,6 +87862,11 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87754
87862
|
approximate: true
|
|
87755
87863
|
});
|
|
87756
87864
|
this._currentDistanceMeasurementByMouseInittouchState.axisVisible = this._currentDistanceMeasurementByMouse.axisVisible && this.plugin.defaultAxisVisible;
|
|
87865
|
+
|
|
87866
|
+
this._currentDistanceMeasurementByMouseInittouchState.xAxisVisible = this._currentDistanceMeasurementByMouse.xAxisVisible && this.plugin.defaultXAxisVisible;
|
|
87867
|
+
this._currentDistanceMeasurementByMouseInittouchState.yAxisVisible = this._currentDistanceMeasurementByMouse.yAxisVisible && this.plugin.defaultYAxisVisible;
|
|
87868
|
+
this._currentDistanceMeasurementByMouseInittouchState.zAxisVisible = this._currentDistanceMeasurementByMouse.zAxisVisible && this.plugin.defaultZAxisVisible;
|
|
87869
|
+
|
|
87757
87870
|
this._currentDistanceMeasurementByMouseInittouchState.wireVisible = this._currentDistanceMeasurementByMouse.wireVisible;
|
|
87758
87871
|
this._currentDistanceMeasurementByMouseInittouchState.targetVisible = this._currentDistanceMeasurementByMouse.targetVisible;
|
|
87759
87872
|
this._currentDistanceMeasurementByMouse.clickable = false;
|
|
@@ -88141,6 +88254,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88141
88254
|
* @param {boolean} [cfg.defaultWireVisible=true] The default value of the DistanceMeasurements `wireVisible` property.
|
|
88142
88255
|
* @param {boolean} [cfg.defaultLabelsVisible=true] The default value of the DistanceMeasurements `labelsVisible` property.
|
|
88143
88256
|
* @param {boolean} [cfg.defaultAxisVisible=true] The default value of the DistanceMeasurements `axisVisible` property.
|
|
88257
|
+
* @param {boolean} [cfg.defaultXAxisVisible=true] The default value of the DistanceMeasurements `xAxisVisible` property.
|
|
88258
|
+
* @param {boolean} [cfg.defaultYAxisVisible=true] The default value of the DistanceMeasurements `yAxisVisible` property.
|
|
88259
|
+
* @param {boolean} [cfg.defaultZAxisVisible=true] The default value of the DistanceMeasurements `zAxisVisible` property.
|
|
88144
88260
|
* @param {string} [cfg.defaultColor=#00BBFF] The default color of the length dots, wire and label.
|
|
88145
88261
|
* @param {number} [cfg.zIndex] If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels).
|
|
88146
88262
|
*
|
|
@@ -88163,6 +88279,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88163
88279
|
this.defaultWireVisible = cfg.defaultWireVisible !== false;
|
|
88164
88280
|
this.defaultLabelsVisible = cfg.defaultLabelsVisible !== false;
|
|
88165
88281
|
this.defaultAxisVisible = cfg.defaultAxisVisible !== false;
|
|
88282
|
+
this.defaultXAxisVisible = cfg.defaultXAxisVisible !== false;
|
|
88283
|
+
this.defaultYAxisVisible = cfg.defaultYAxisVisible !== false;
|
|
88284
|
+
this.defaultZAxisVisible = cfg.defaultZAxisVisible !== false;
|
|
88166
88285
|
this.defaultColor = cfg.defaultColor !== undefined ? cfg.defaultColor : "#00BBFF";
|
|
88167
88286
|
this.zIndex = cfg.zIndex || 10000;
|
|
88168
88287
|
|
|
@@ -88259,6 +88378,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88259
88378
|
* @param {Boolean} [params.targetVisible=true] Whether to initially show the {@link DistanceMeasurement} target.
|
|
88260
88379
|
* @param {Boolean} [params.wireVisible=true] Whether to initially show the direct point-to-point wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88261
88380
|
* @param {Boolean} [params.axisVisible=true] Whether to initially show the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88381
|
+
* @param {Boolean} [params.xAxisVisible=true] Whether to initially show the X-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88382
|
+
* @param {Boolean} [params.yAxisVisible=true] Whether to initially show the Y-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88383
|
+
* @param {Boolean} [params.zAxisVisible=true] Whether to initially show the Z-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88262
88384
|
* @param {Boolean} [params.labelsVisible=true] Whether to initially show the labels.
|
|
88263
88385
|
* @param {string} [params.color] The color of the length dot, wire and label.
|
|
88264
88386
|
* @returns {DistanceMeasurement} The new {@link DistanceMeasurement}.
|
|
@@ -88285,6 +88407,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88285
88407
|
visible: params.visible,
|
|
88286
88408
|
wireVisible: params.wireVisible,
|
|
88287
88409
|
axisVisible: params.axisVisible !== false && this.defaultAxisVisible !== false,
|
|
88410
|
+
xAxisVisible: params.xAxisVisible !== false && this.defaultXAxisVisible !== false,
|
|
88411
|
+
yAxisVisible: params.yAxisVisible !== false && this.defaultYAxisVisible !== false,
|
|
88412
|
+
zAxisVisible: params.zAxisVisible !== false && this.defaultZAxisVisible !== false,
|
|
88288
88413
|
labelsVisible: params.labelsVisible !== false && this.defaultLabelsVisible !== false,
|
|
88289
88414
|
originVisible: params.originVisible,
|
|
88290
88415
|
targetVisible: params.targetVisible,
|
|
@@ -88327,6 +88452,7 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88327
88452
|
}
|
|
88328
88453
|
}
|
|
88329
88454
|
|
|
88455
|
+
|
|
88330
88456
|
/**
|
|
88331
88457
|
* Destroys all {@link DistanceMeasurement}s.
|
|
88332
88458
|
*/
|
|
@@ -164318,7 +164444,7 @@ class LASLoaderPlugin extends Plugin {
|
|
|
164318
164444
|
* @param {Number|String} value Valid values are 8, 16 and "auto".
|
|
164319
164445
|
*/
|
|
164320
164446
|
set colorDepth(value) {
|
|
164321
|
-
this._colorDepth =
|
|
164447
|
+
this._colorDepth = value || "auto";
|
|
164322
164448
|
}
|
|
164323
164449
|
|
|
164324
164450
|
/**
|
|
@@ -164473,10 +164599,10 @@ class LASLoaderPlugin extends Plugin {
|
|
|
164473
164599
|
reject("No positions found in file");
|
|
164474
164600
|
return;
|
|
164475
164601
|
}
|
|
164476
|
-
|
|
164602
|
+
|
|
164477
164603
|
let positionsValue;
|
|
164478
164604
|
let colorsCompressed;
|
|
164479
|
-
|
|
164605
|
+
|
|
164480
164606
|
switch (pointsFormatId) {
|
|
164481
164607
|
case 0:
|
|
164482
164608
|
positionsValue = readPositions(attributes.POSITION);
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -81139,6 +81139,9 @@ class DistanceMeasurement extends Component {
|
|
|
81139
81139
|
this._targetVisible = false;
|
|
81140
81140
|
this._wireVisible = false;
|
|
81141
81141
|
this._axisVisible = false;
|
|
81142
|
+
this._xAxisVisible = false;
|
|
81143
|
+
this._yAxisVisible = false;
|
|
81144
|
+
this._zAxisVisible = false;
|
|
81142
81145
|
this._axisEnabled = true;
|
|
81143
81146
|
this._labelsVisible = false;
|
|
81144
81147
|
this._clickable = true;
|
|
@@ -81191,6 +81194,9 @@ class DistanceMeasurement extends Component {
|
|
|
81191
81194
|
this.targetVisible = cfg.targetVisible;
|
|
81192
81195
|
this.wireVisible = cfg.wireVisible;
|
|
81193
81196
|
this.axisVisible = cfg.axisVisible;
|
|
81197
|
+
this.xAxisVisible = cfg.xAxisVisible;
|
|
81198
|
+
this.yAxisVisible = cfg.yAxisVisible;
|
|
81199
|
+
this.zAxisVisible = cfg.zAxisVisible;
|
|
81194
81200
|
this.labelsVisible = cfg.labelsVisible;
|
|
81195
81201
|
}
|
|
81196
81202
|
|
|
@@ -81356,9 +81362,11 @@ class DistanceMeasurement extends Component {
|
|
|
81356
81362
|
|
|
81357
81363
|
this._originDot.setVisible(this._visible && this._originVisible);
|
|
81358
81364
|
this._targetDot.setVisible(this._visible && this._targetVisible);
|
|
81359
|
-
|
|
81360
|
-
this.
|
|
81361
|
-
this.
|
|
81365
|
+
|
|
81366
|
+
this._xAxisWire.setVisible(this.axisVisible && this.xAxisVisible);
|
|
81367
|
+
this._yAxisWire.setVisible(this.axisVisible && this.yAxisVisible);
|
|
81368
|
+
this._zAxisWire.setVisible(this.axisVisible && this.zAxisVisible);
|
|
81369
|
+
|
|
81362
81370
|
this._lengthWire.setVisible(this.wireVisible);
|
|
81363
81371
|
this._lengthLabel.setCulled(!this.wireVisible);
|
|
81364
81372
|
|
|
@@ -81441,20 +81449,30 @@ class DistanceMeasurement extends Component {
|
|
|
81441
81449
|
* @type {Boolean}
|
|
81442
81450
|
*/
|
|
81443
81451
|
set visible(value) {
|
|
81452
|
+
|
|
81444
81453
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultVisible;
|
|
81454
|
+
|
|
81445
81455
|
this._visible = value;
|
|
81456
|
+
|
|
81446
81457
|
this._originDot.setVisible(this._visible && this._originVisible);
|
|
81447
81458
|
this._targetDot.setVisible(this._visible && this._targetVisible);
|
|
81448
81459
|
this._lengthWire.setVisible(this._visible && this._wireVisible);
|
|
81449
81460
|
this._lengthLabel.setVisible(this._visible && this._wireVisible);
|
|
81450
|
-
|
|
81451
|
-
this.
|
|
81452
|
-
this.
|
|
81453
|
-
this.
|
|
81454
|
-
|
|
81455
|
-
this.
|
|
81456
|
-
this.
|
|
81461
|
+
|
|
81462
|
+
const xAxisVisible = this._visible && this._axisVisible && this._xAxisVisible;
|
|
81463
|
+
const yAxisVisible = this._visible && this._axisVisible && this._yAxisVisible;
|
|
81464
|
+
const zAxisVisible = this._visible && this._axisVisible && this._zAxisVisible;
|
|
81465
|
+
|
|
81466
|
+
this._xAxisWire.setVisible(xAxisVisible);
|
|
81467
|
+
this._yAxisWire.setVisible(yAxisVisible);
|
|
81468
|
+
this._zAxisWire.setVisible(zAxisVisible);
|
|
81469
|
+
|
|
81470
|
+
this._xAxisLabel.setVisible(xAxisVisible && !this._xAxisLabelCulled);
|
|
81471
|
+
this._yAxisLabel.setVisible(yAxisVisible && !this._yAxisLabelCulled);
|
|
81472
|
+
this._zAxisLabel.setVisible(zAxisVisible && !this._zAxisLabelCulled);
|
|
81473
|
+
|
|
81457
81474
|
this._cpDirty = true;
|
|
81475
|
+
|
|
81458
81476
|
this._needUpdate();
|
|
81459
81477
|
}
|
|
81460
81478
|
|
|
@@ -81518,12 +81536,12 @@ class DistanceMeasurement extends Component {
|
|
|
81518
81536
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81519
81537
|
this._axisEnabled = value;
|
|
81520
81538
|
var axisVisible = this._visible && this._axisVisible && this._axisEnabled;
|
|
81521
|
-
this._xAxisWire.setVisible(axisVisible);
|
|
81522
|
-
this._yAxisWire.setVisible(axisVisible);
|
|
81523
|
-
this._zAxisWire.setVisible(axisVisible);
|
|
81524
|
-
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled);
|
|
81525
|
-
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled);
|
|
81526
|
-
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled);
|
|
81539
|
+
this._xAxisWire.setVisible(axisVisible && this._xAxisVisible);
|
|
81540
|
+
this._yAxisWire.setVisible(axisVisible && this._yAxisVisible);
|
|
81541
|
+
this._zAxisWire.setVisible(axisVisible && this._zAxisVisible);
|
|
81542
|
+
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled&& this._xAxisVisible);
|
|
81543
|
+
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled&& this._xAxisVisible);
|
|
81544
|
+
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled&& this._xAxisVisible);
|
|
81527
81545
|
this._cpDirty = true;
|
|
81528
81546
|
this._needUpdate();
|
|
81529
81547
|
}
|
|
@@ -81550,25 +81568,109 @@ class DistanceMeasurement extends Component {
|
|
|
81550
81568
|
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81551
81569
|
this._axisVisible = value;
|
|
81552
81570
|
var axisVisible = this._visible && this._axisVisible && this._axisEnabled;
|
|
81571
|
+
this._xAxisWire.setVisible(axisVisible && this._xAxisVisible);
|
|
81572
|
+
this._yAxisWire.setVisible(axisVisible && this._yAxisVisible);
|
|
81573
|
+
this._zAxisWire.setVisible(axisVisible && this._zAxisVisible);
|
|
81574
|
+
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled&& this._xAxisVisible);
|
|
81575
|
+
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled&& this._yAxisVisible);
|
|
81576
|
+
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled&& this._zAxisVisible);
|
|
81577
|
+
this._cpDirty = true;
|
|
81578
|
+
this._needUpdate();
|
|
81579
|
+
}
|
|
81580
|
+
|
|
81581
|
+
/**
|
|
81582
|
+
* Gets if the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81583
|
+
*
|
|
81584
|
+
* Wires are only shown if enabled and visible.
|
|
81585
|
+
*
|
|
81586
|
+
* @type {Boolean}
|
|
81587
|
+
*/
|
|
81588
|
+
get axisVisible() {
|
|
81589
|
+
return this._axisVisible;
|
|
81590
|
+
}
|
|
81591
|
+
|
|
81592
|
+
/**
|
|
81593
|
+
* Sets if the X-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81594
|
+
*
|
|
81595
|
+
* Wires are only shown if enabled and visible.
|
|
81596
|
+
*
|
|
81597
|
+
* @type {Boolean}
|
|
81598
|
+
*/
|
|
81599
|
+
set xAxisVisible(value) {
|
|
81600
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81601
|
+
this._xAxisVisible = value;
|
|
81602
|
+
const axisVisible = this._visible && this._axisVisible && this._xAxisVisible && this._axisEnabled;
|
|
81553
81603
|
this._xAxisWire.setVisible(axisVisible);
|
|
81554
|
-
this._yAxisWire.setVisible(axisVisible);
|
|
81555
|
-
this._zAxisWire.setVisible(axisVisible);
|
|
81556
81604
|
this._xAxisLabel.setVisible(axisVisible && !this._xAxisLabelCulled);
|
|
81605
|
+
this._cpDirty = true;
|
|
81606
|
+
this._needUpdate();
|
|
81607
|
+
}
|
|
81608
|
+
|
|
81609
|
+
/**
|
|
81610
|
+
* Gets if the X-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81611
|
+
*
|
|
81612
|
+
* Wires are only shown if enabled and visible.
|
|
81613
|
+
*
|
|
81614
|
+
* @type {Boolean}
|
|
81615
|
+
*/
|
|
81616
|
+
get xAxisVisible() {
|
|
81617
|
+
return this._xAxisVisible;
|
|
81618
|
+
}
|
|
81619
|
+
|
|
81620
|
+
/**
|
|
81621
|
+
* Sets if the Y-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81622
|
+
*
|
|
81623
|
+
* Wires are only shown if enabled and visible.
|
|
81624
|
+
*
|
|
81625
|
+
* @type {Boolean}
|
|
81626
|
+
*/
|
|
81627
|
+
set yAxisVisible(value) {
|
|
81628
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81629
|
+
this._yAxisVisible = value;
|
|
81630
|
+
const axisVisible = this._visible && this._axisVisible && this._yAxisVisible && this._axisEnabled;
|
|
81631
|
+
this._yAxisWire.setVisible(axisVisible);
|
|
81557
81632
|
this._yAxisLabel.setVisible(axisVisible && !this._yAxisLabelCulled);
|
|
81633
|
+
this._cpDirty = true;
|
|
81634
|
+
this._needUpdate();
|
|
81635
|
+
}
|
|
81636
|
+
|
|
81637
|
+
/**
|
|
81638
|
+
* Gets if the Y-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81639
|
+
*
|
|
81640
|
+
* Wires are only shown if enabled and visible.
|
|
81641
|
+
*
|
|
81642
|
+
* @type {Boolean}
|
|
81643
|
+
*/
|
|
81644
|
+
get yAxisVisible() {
|
|
81645
|
+
return this._yAxisVisible;
|
|
81646
|
+
}
|
|
81647
|
+
|
|
81648
|
+
/**
|
|
81649
|
+
* Sets if the Z-axis-aligned wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} is visible.
|
|
81650
|
+
*
|
|
81651
|
+
* Wires are only shown if enabled and visible.
|
|
81652
|
+
*
|
|
81653
|
+
* @type {Boolean}
|
|
81654
|
+
*/
|
|
81655
|
+
set zAxisVisible(value) {
|
|
81656
|
+
value = value !== undefined ? Boolean(value) : this.plugin.defaultAxisVisible;
|
|
81657
|
+
this._zAxisVisible = value;
|
|
81658
|
+
const axisVisible = this._visible && this._axisVisible && this._zAxisVisible && this._axisEnabled;
|
|
81659
|
+
this._zAxisWire.setVisible(axisVisible);
|
|
81558
81660
|
this._zAxisLabel.setVisible(axisVisible && !this._zAxisLabelCulled);
|
|
81559
81661
|
this._cpDirty = true;
|
|
81560
81662
|
this._needUpdate();
|
|
81561
81663
|
}
|
|
81562
81664
|
|
|
81563
81665
|
/**
|
|
81564
|
-
* Gets if the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81666
|
+
* Gets if the Z-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are visible.
|
|
81565
81667
|
*
|
|
81566
81668
|
* Wires are only shown if enabled and visible.
|
|
81567
81669
|
*
|
|
81568
81670
|
* @type {Boolean}
|
|
81569
81671
|
*/
|
|
81570
|
-
get
|
|
81571
|
-
return this.
|
|
81672
|
+
get zAxisVisible() {
|
|
81673
|
+
return this._zAxisVisible;
|
|
81572
81674
|
}
|
|
81573
81675
|
|
|
81574
81676
|
/**
|
|
@@ -87599,6 +87701,9 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87599
87701
|
this._currentDistanceMeasurementByMouseInittouchState = {
|
|
87600
87702
|
wireVisible: null,
|
|
87601
87703
|
axisVisible: null,
|
|
87704
|
+
xAxisVisible: null,
|
|
87705
|
+
yaxisVisible: null,
|
|
87706
|
+
zAxisVisible: null,
|
|
87602
87707
|
targetVisible: null,
|
|
87603
87708
|
};
|
|
87604
87709
|
|
|
@@ -87686,6 +87791,9 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87686
87791
|
if (this._currentDistanceMeasurementByMouse) {
|
|
87687
87792
|
this._currentDistanceMeasurementByMouse.wireVisible = this._currentDistanceMeasurementByMouseInittouchState.wireVisible;
|
|
87688
87793
|
this._currentDistanceMeasurementByMouse.axisVisible = this._currentDistanceMeasurementByMouseInittouchState.axisVisible && this.plugin.defaultAxisVisible;
|
|
87794
|
+
this._currentDistanceMeasurementByMouse.xAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.xAxisVisible && this.plugin.defaultXAxisVisible;
|
|
87795
|
+
this._currentDistanceMeasurementByMouse.yAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.yAxisVisible && this.plugin.defaultYAxisVisible;
|
|
87796
|
+
this._currentDistanceMeasurementByMouse.zAxisVisible = this._currentDistanceMeasurementByMouseInittouchState.zAxisVisible && this.plugin.defaultZAxisVisible;
|
|
87689
87797
|
this._currentDistanceMeasurementByMouse.targetVisible = this._currentDistanceMeasurementByMouseInittouchState.targetVisible;
|
|
87690
87798
|
this._currentDistanceMeasurementByMouse.target.entity = mouseHoverEntity;
|
|
87691
87799
|
this._currentDistanceMeasurementByMouse.target.worldPos = mouseWorldPos;
|
|
@@ -87750,6 +87858,11 @@ class DistanceMeasurementsControl extends Component {
|
|
|
87750
87858
|
approximate: true
|
|
87751
87859
|
});
|
|
87752
87860
|
this._currentDistanceMeasurementByMouseInittouchState.axisVisible = this._currentDistanceMeasurementByMouse.axisVisible && this.plugin.defaultAxisVisible;
|
|
87861
|
+
|
|
87862
|
+
this._currentDistanceMeasurementByMouseInittouchState.xAxisVisible = this._currentDistanceMeasurementByMouse.xAxisVisible && this.plugin.defaultXAxisVisible;
|
|
87863
|
+
this._currentDistanceMeasurementByMouseInittouchState.yAxisVisible = this._currentDistanceMeasurementByMouse.yAxisVisible && this.plugin.defaultYAxisVisible;
|
|
87864
|
+
this._currentDistanceMeasurementByMouseInittouchState.zAxisVisible = this._currentDistanceMeasurementByMouse.zAxisVisible && this.plugin.defaultZAxisVisible;
|
|
87865
|
+
|
|
87753
87866
|
this._currentDistanceMeasurementByMouseInittouchState.wireVisible = this._currentDistanceMeasurementByMouse.wireVisible;
|
|
87754
87867
|
this._currentDistanceMeasurementByMouseInittouchState.targetVisible = this._currentDistanceMeasurementByMouse.targetVisible;
|
|
87755
87868
|
this._currentDistanceMeasurementByMouse.clickable = false;
|
|
@@ -88137,6 +88250,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88137
88250
|
* @param {boolean} [cfg.defaultWireVisible=true] The default value of the DistanceMeasurements `wireVisible` property.
|
|
88138
88251
|
* @param {boolean} [cfg.defaultLabelsVisible=true] The default value of the DistanceMeasurements `labelsVisible` property.
|
|
88139
88252
|
* @param {boolean} [cfg.defaultAxisVisible=true] The default value of the DistanceMeasurements `axisVisible` property.
|
|
88253
|
+
* @param {boolean} [cfg.defaultXAxisVisible=true] The default value of the DistanceMeasurements `xAxisVisible` property.
|
|
88254
|
+
* @param {boolean} [cfg.defaultYAxisVisible=true] The default value of the DistanceMeasurements `yAxisVisible` property.
|
|
88255
|
+
* @param {boolean} [cfg.defaultZAxisVisible=true] The default value of the DistanceMeasurements `zAxisVisible` property.
|
|
88140
88256
|
* @param {string} [cfg.defaultColor=#00BBFF] The default color of the length dots, wire and label.
|
|
88141
88257
|
* @param {number} [cfg.zIndex] If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels).
|
|
88142
88258
|
*
|
|
@@ -88159,6 +88275,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88159
88275
|
this.defaultWireVisible = cfg.defaultWireVisible !== false;
|
|
88160
88276
|
this.defaultLabelsVisible = cfg.defaultLabelsVisible !== false;
|
|
88161
88277
|
this.defaultAxisVisible = cfg.defaultAxisVisible !== false;
|
|
88278
|
+
this.defaultXAxisVisible = cfg.defaultXAxisVisible !== false;
|
|
88279
|
+
this.defaultYAxisVisible = cfg.defaultYAxisVisible !== false;
|
|
88280
|
+
this.defaultZAxisVisible = cfg.defaultZAxisVisible !== false;
|
|
88162
88281
|
this.defaultColor = cfg.defaultColor !== undefined ? cfg.defaultColor : "#00BBFF";
|
|
88163
88282
|
this.zIndex = cfg.zIndex || 10000;
|
|
88164
88283
|
|
|
@@ -88255,6 +88374,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88255
88374
|
* @param {Boolean} [params.targetVisible=true] Whether to initially show the {@link DistanceMeasurement} target.
|
|
88256
88375
|
* @param {Boolean} [params.wireVisible=true] Whether to initially show the direct point-to-point wire between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88257
88376
|
* @param {Boolean} [params.axisVisible=true] Whether to initially show the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88377
|
+
* @param {Boolean} [params.xAxisVisible=true] Whether to initially show the X-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88378
|
+
* @param {Boolean} [params.yAxisVisible=true] Whether to initially show the Y-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88379
|
+
* @param {Boolean} [params.zAxisVisible=true] Whether to initially show the Z-axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target}.
|
|
88258
88380
|
* @param {Boolean} [params.labelsVisible=true] Whether to initially show the labels.
|
|
88259
88381
|
* @param {string} [params.color] The color of the length dot, wire and label.
|
|
88260
88382
|
* @returns {DistanceMeasurement} The new {@link DistanceMeasurement}.
|
|
@@ -88281,6 +88403,9 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88281
88403
|
visible: params.visible,
|
|
88282
88404
|
wireVisible: params.wireVisible,
|
|
88283
88405
|
axisVisible: params.axisVisible !== false && this.defaultAxisVisible !== false,
|
|
88406
|
+
xAxisVisible: params.xAxisVisible !== false && this.defaultXAxisVisible !== false,
|
|
88407
|
+
yAxisVisible: params.yAxisVisible !== false && this.defaultYAxisVisible !== false,
|
|
88408
|
+
zAxisVisible: params.zAxisVisible !== false && this.defaultZAxisVisible !== false,
|
|
88284
88409
|
labelsVisible: params.labelsVisible !== false && this.defaultLabelsVisible !== false,
|
|
88285
88410
|
originVisible: params.originVisible,
|
|
88286
88411
|
targetVisible: params.targetVisible,
|
|
@@ -88323,6 +88448,7 @@ class DistanceMeasurementsPlugin extends Plugin {
|
|
|
88323
88448
|
}
|
|
88324
88449
|
}
|
|
88325
88450
|
|
|
88451
|
+
|
|
88326
88452
|
/**
|
|
88327
88453
|
* Destroys all {@link DistanceMeasurement}s.
|
|
88328
88454
|
*/
|
|
@@ -164314,7 +164440,7 @@ class LASLoaderPlugin extends Plugin {
|
|
|
164314
164440
|
* @param {Number|String} value Valid values are 8, 16 and "auto".
|
|
164315
164441
|
*/
|
|
164316
164442
|
set colorDepth(value) {
|
|
164317
|
-
this._colorDepth =
|
|
164443
|
+
this._colorDepth = value || "auto";
|
|
164318
164444
|
}
|
|
164319
164445
|
|
|
164320
164446
|
/**
|
|
@@ -164469,10 +164595,10 @@ class LASLoaderPlugin extends Plugin {
|
|
|
164469
164595
|
reject("No positions found in file");
|
|
164470
164596
|
return;
|
|
164471
164597
|
}
|
|
164472
|
-
|
|
164598
|
+
|
|
164473
164599
|
let positionsValue;
|
|
164474
164600
|
let colorsCompressed;
|
|
164475
|
-
|
|
164601
|
+
|
|
164476
164602
|
switch (pointsFormatId) {
|
|
164477
164603
|
case 0:
|
|
164478
164604
|
positionsValue = readPositions(attributes.POSITION);
|