@xeokit/xeokit-sdk 2.4.0-alpha-20 → 2.4.0-alpha-21
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
CHANGED
|
@@ -9524,6 +9524,12 @@ class Wire {
|
|
|
9524
9524
|
});
|
|
9525
9525
|
}
|
|
9526
9526
|
|
|
9527
|
+
if (cfg.onMouseWheel) {
|
|
9528
|
+
wireClickable.addEventListener('wheel', (event) => {
|
|
9529
|
+
cfg.onMouseWheel(event, this);
|
|
9530
|
+
});
|
|
9531
|
+
}
|
|
9532
|
+
|
|
9527
9533
|
if (cfg.onContextMenu) {
|
|
9528
9534
|
wireClickable.addEventListener('contextmenu', (event) => {
|
|
9529
9535
|
cfg.onContextMenu(event, this);
|
|
@@ -9679,6 +9685,12 @@ class Dot {
|
|
|
9679
9685
|
});
|
|
9680
9686
|
}
|
|
9681
9687
|
|
|
9688
|
+
if (cfg.onMouseWheel) {
|
|
9689
|
+
dotClickable.addEventListener('wheel', (event) => {
|
|
9690
|
+
cfg.onMouseWheel(event, this);
|
|
9691
|
+
});
|
|
9692
|
+
}
|
|
9693
|
+
|
|
9682
9694
|
if (cfg.onContextMenu) {
|
|
9683
9695
|
dotClickable.addEventListener('contextmenu', (event) => {
|
|
9684
9696
|
cfg.onContextMenu(event, this);
|
|
@@ -9803,6 +9815,12 @@ class Label {
|
|
|
9803
9815
|
});
|
|
9804
9816
|
}
|
|
9805
9817
|
|
|
9818
|
+
if (cfg.onMouseWheel) {
|
|
9819
|
+
label.addEventListener('wheel', (event) => {
|
|
9820
|
+
cfg.onMouseWheel(event, this);
|
|
9821
|
+
});
|
|
9822
|
+
}
|
|
9823
|
+
|
|
9806
9824
|
if (cfg.onContextMenu) {
|
|
9807
9825
|
label.addEventListener('contextmenu', (event) => {
|
|
9808
9826
|
cfg.onContextMenu(event, this);
|
|
@@ -62385,11 +62403,16 @@ class DistanceMeasurement extends Component {
|
|
|
62385
62403
|
cfg.onContextMenu(event, this);
|
|
62386
62404
|
} : null;
|
|
62387
62405
|
|
|
62406
|
+
const onMouseWheel = (event) => {
|
|
62407
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
62408
|
+
};
|
|
62409
|
+
|
|
62388
62410
|
this._originDot = new Dot(this._container, {
|
|
62389
62411
|
fillColor: this._color,
|
|
62390
62412
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 2 : undefined,
|
|
62391
62413
|
onMouseOver,
|
|
62392
62414
|
onMouseLeave,
|
|
62415
|
+
onMouseWheel,
|
|
62393
62416
|
onContextMenu
|
|
62394
62417
|
});
|
|
62395
62418
|
|
|
@@ -62398,6 +62421,7 @@ class DistanceMeasurement extends Component {
|
|
|
62398
62421
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 2 : undefined,
|
|
62399
62422
|
onMouseOver,
|
|
62400
62423
|
onMouseLeave,
|
|
62424
|
+
onMouseWheel,
|
|
62401
62425
|
onContextMenu
|
|
62402
62426
|
});
|
|
62403
62427
|
|
|
@@ -62408,6 +62432,7 @@ class DistanceMeasurement extends Component {
|
|
|
62408
62432
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62409
62433
|
onMouseOver,
|
|
62410
62434
|
onMouseLeave,
|
|
62435
|
+
onMouseWheel,
|
|
62411
62436
|
onContextMenu
|
|
62412
62437
|
});
|
|
62413
62438
|
|
|
@@ -62418,6 +62443,7 @@ class DistanceMeasurement extends Component {
|
|
|
62418
62443
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62419
62444
|
onMouseOver,
|
|
62420
62445
|
onMouseLeave,
|
|
62446
|
+
onMouseWheel,
|
|
62421
62447
|
onContextMenu
|
|
62422
62448
|
});
|
|
62423
62449
|
|
|
@@ -62428,6 +62454,7 @@ class DistanceMeasurement extends Component {
|
|
|
62428
62454
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62429
62455
|
onMouseOver,
|
|
62430
62456
|
onMouseLeave,
|
|
62457
|
+
onMouseWheel,
|
|
62431
62458
|
onContextMenu
|
|
62432
62459
|
});
|
|
62433
62460
|
|
|
@@ -62438,6 +62465,7 @@ class DistanceMeasurement extends Component {
|
|
|
62438
62465
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62439
62466
|
onMouseOver,
|
|
62440
62467
|
onMouseLeave,
|
|
62468
|
+
onMouseWheel,
|
|
62441
62469
|
onContextMenu
|
|
62442
62470
|
});
|
|
62443
62471
|
|
|
@@ -62448,6 +62476,7 @@ class DistanceMeasurement extends Component {
|
|
|
62448
62476
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 4 : undefined,
|
|
62449
62477
|
onMouseOver,
|
|
62450
62478
|
onMouseLeave,
|
|
62479
|
+
onMouseWheel,
|
|
62451
62480
|
onContextMenu
|
|
62452
62481
|
});
|
|
62453
62482
|
|
|
@@ -62458,6 +62487,7 @@ class DistanceMeasurement extends Component {
|
|
|
62458
62487
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62459
62488
|
onMouseOver,
|
|
62460
62489
|
onMouseLeave,
|
|
62490
|
+
onMouseWheel,
|
|
62461
62491
|
onContextMenu
|
|
62462
62492
|
});
|
|
62463
62493
|
|
|
@@ -62468,6 +62498,7 @@ class DistanceMeasurement extends Component {
|
|
|
62468
62498
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62469
62499
|
onMouseOver,
|
|
62470
62500
|
onMouseLeave,
|
|
62501
|
+
onMouseWheel,
|
|
62471
62502
|
onContextMenu
|
|
62472
62503
|
});
|
|
62473
62504
|
|
|
@@ -62478,6 +62509,7 @@ class DistanceMeasurement extends Component {
|
|
|
62478
62509
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62479
62510
|
onMouseOver,
|
|
62480
62511
|
onMouseLeave,
|
|
62512
|
+
onMouseWheel,
|
|
62481
62513
|
onContextMenu
|
|
62482
62514
|
});
|
|
62483
62515
|
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -9520,6 +9520,12 @@ class Wire {
|
|
|
9520
9520
|
});
|
|
9521
9521
|
}
|
|
9522
9522
|
|
|
9523
|
+
if (cfg.onMouseWheel) {
|
|
9524
|
+
wireClickable.addEventListener('wheel', (event) => {
|
|
9525
|
+
cfg.onMouseWheel(event, this);
|
|
9526
|
+
});
|
|
9527
|
+
}
|
|
9528
|
+
|
|
9523
9529
|
if (cfg.onContextMenu) {
|
|
9524
9530
|
wireClickable.addEventListener('contextmenu', (event) => {
|
|
9525
9531
|
cfg.onContextMenu(event, this);
|
|
@@ -9675,6 +9681,12 @@ class Dot {
|
|
|
9675
9681
|
});
|
|
9676
9682
|
}
|
|
9677
9683
|
|
|
9684
|
+
if (cfg.onMouseWheel) {
|
|
9685
|
+
dotClickable.addEventListener('wheel', (event) => {
|
|
9686
|
+
cfg.onMouseWheel(event, this);
|
|
9687
|
+
});
|
|
9688
|
+
}
|
|
9689
|
+
|
|
9678
9690
|
if (cfg.onContextMenu) {
|
|
9679
9691
|
dotClickable.addEventListener('contextmenu', (event) => {
|
|
9680
9692
|
cfg.onContextMenu(event, this);
|
|
@@ -9799,6 +9811,12 @@ class Label {
|
|
|
9799
9811
|
});
|
|
9800
9812
|
}
|
|
9801
9813
|
|
|
9814
|
+
if (cfg.onMouseWheel) {
|
|
9815
|
+
label.addEventListener('wheel', (event) => {
|
|
9816
|
+
cfg.onMouseWheel(event, this);
|
|
9817
|
+
});
|
|
9818
|
+
}
|
|
9819
|
+
|
|
9802
9820
|
if (cfg.onContextMenu) {
|
|
9803
9821
|
label.addEventListener('contextmenu', (event) => {
|
|
9804
9822
|
cfg.onContextMenu(event, this);
|
|
@@ -62381,11 +62399,16 @@ class DistanceMeasurement extends Component {
|
|
|
62381
62399
|
cfg.onContextMenu(event, this);
|
|
62382
62400
|
} : null;
|
|
62383
62401
|
|
|
62402
|
+
const onMouseWheel = (event) => {
|
|
62403
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
62404
|
+
};
|
|
62405
|
+
|
|
62384
62406
|
this._originDot = new Dot(this._container, {
|
|
62385
62407
|
fillColor: this._color,
|
|
62386
62408
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 2 : undefined,
|
|
62387
62409
|
onMouseOver,
|
|
62388
62410
|
onMouseLeave,
|
|
62411
|
+
onMouseWheel,
|
|
62389
62412
|
onContextMenu
|
|
62390
62413
|
});
|
|
62391
62414
|
|
|
@@ -62394,6 +62417,7 @@ class DistanceMeasurement extends Component {
|
|
|
62394
62417
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 2 : undefined,
|
|
62395
62418
|
onMouseOver,
|
|
62396
62419
|
onMouseLeave,
|
|
62420
|
+
onMouseWheel,
|
|
62397
62421
|
onContextMenu
|
|
62398
62422
|
});
|
|
62399
62423
|
|
|
@@ -62404,6 +62428,7 @@ class DistanceMeasurement extends Component {
|
|
|
62404
62428
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62405
62429
|
onMouseOver,
|
|
62406
62430
|
onMouseLeave,
|
|
62431
|
+
onMouseWheel,
|
|
62407
62432
|
onContextMenu
|
|
62408
62433
|
});
|
|
62409
62434
|
|
|
@@ -62414,6 +62439,7 @@ class DistanceMeasurement extends Component {
|
|
|
62414
62439
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62415
62440
|
onMouseOver,
|
|
62416
62441
|
onMouseLeave,
|
|
62442
|
+
onMouseWheel,
|
|
62417
62443
|
onContextMenu
|
|
62418
62444
|
});
|
|
62419
62445
|
|
|
@@ -62424,6 +62450,7 @@ class DistanceMeasurement extends Component {
|
|
|
62424
62450
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62425
62451
|
onMouseOver,
|
|
62426
62452
|
onMouseLeave,
|
|
62453
|
+
onMouseWheel,
|
|
62427
62454
|
onContextMenu
|
|
62428
62455
|
});
|
|
62429
62456
|
|
|
@@ -62434,6 +62461,7 @@ class DistanceMeasurement extends Component {
|
|
|
62434
62461
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 1 : undefined,
|
|
62435
62462
|
onMouseOver,
|
|
62436
62463
|
onMouseLeave,
|
|
62464
|
+
onMouseWheel,
|
|
62437
62465
|
onContextMenu
|
|
62438
62466
|
});
|
|
62439
62467
|
|
|
@@ -62444,6 +62472,7 @@ class DistanceMeasurement extends Component {
|
|
|
62444
62472
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 4 : undefined,
|
|
62445
62473
|
onMouseOver,
|
|
62446
62474
|
onMouseLeave,
|
|
62475
|
+
onMouseWheel,
|
|
62447
62476
|
onContextMenu
|
|
62448
62477
|
});
|
|
62449
62478
|
|
|
@@ -62454,6 +62483,7 @@ class DistanceMeasurement extends Component {
|
|
|
62454
62483
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62455
62484
|
onMouseOver,
|
|
62456
62485
|
onMouseLeave,
|
|
62486
|
+
onMouseWheel,
|
|
62457
62487
|
onContextMenu
|
|
62458
62488
|
});
|
|
62459
62489
|
|
|
@@ -62464,6 +62494,7 @@ class DistanceMeasurement extends Component {
|
|
|
62464
62494
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62465
62495
|
onMouseOver,
|
|
62466
62496
|
onMouseLeave,
|
|
62497
|
+
onMouseWheel,
|
|
62467
62498
|
onContextMenu
|
|
62468
62499
|
});
|
|
62469
62500
|
|
|
@@ -62474,6 +62505,7 @@ class DistanceMeasurement extends Component {
|
|
|
62474
62505
|
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 3 : undefined,
|
|
62475
62506
|
onMouseOver,
|
|
62476
62507
|
onMouseLeave,
|
|
62508
|
+
onMouseWheel,
|
|
62477
62509
|
onContextMenu
|
|
62478
62510
|
});
|
|
62479
62511
|
|
package/dist/xeokit-sdk.es5.js
CHANGED
|
@@ -2405,7 +2405,7 @@ _this7._onEntityModelDestroyed=null;});}else{this._onEntityDestroyed=this._entit
|
|
|
2405
2405
|
*/},{key:"visible",get:function get(){return!!this._visible;}/**
|
|
2406
2406
|
* Destroys this Marker.
|
|
2407
2407
|
*/},{key:"destroy",value:function destroy(){this.fire("destroyed",true);this.scene.camera.off(this._onCameraViewMatrix);this.scene.camera.off(this._onCameraProjMatrix);if(this._entity){if(this._onEntityDestroyed!==null){this._entity.off(this._onEntityDestroyed);}if(this._onEntityModelDestroyed!==null){this._entity.model.off(this._onEntityModelDestroyed);}}this._renderer.removeMarker(this);_get(_getPrototypeOf(Marker.prototype),"destroy",this).call(this);}}]);return Marker;}(Component);/** @private */var Wire=/*#__PURE__*/function(){function Wire(parentElement){var _this8=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Wire);this._color=cfg.color||"black";this._highlightClass="viewer-ruler-wire-highlighted";this._wire=document.createElement('div');this._wire.className+=this._wire.className?' viewer-ruler-wire':'viewer-ruler-wire';this._wireClickable=document.createElement('div');this._wireClickable.className+=this._wireClickable.className?' viewer-ruler-wire-clickable':'viewer-ruler-wire-clickable';this._thickness=cfg.thickness||1.0;this._thicknessClickable=cfg.thicknessClickable||6.0;var wire=this._wire;var wireStyle=wire.style;wireStyle.border="solid "+this._thickness+"px "+this._color;wireStyle.position="absolute";wireStyle["z-index"]=cfg.zIndex===undefined?"2000001":cfg.zIndex;wireStyle.width=0+"px";wireStyle.height=0+"px";wireStyle.visibility="visible";wireStyle.top=0+"px";wireStyle.left=0+"px";wireStyle['-webkit-transform-origin']="0 0";wireStyle['-moz-transform-origin']="0 0";wireStyle['-ms-transform-origin']="0 0";wireStyle['-o-transform-origin']="0 0";wireStyle['transform-origin']="0 0";wireStyle['-webkit-transform']='rotate(0deg)';wireStyle['-moz-transform']='rotate(0deg)';wireStyle['-ms-transform']='rotate(0deg)';wireStyle['-o-transform']='rotate(0deg)';wireStyle['transform']='rotate(0deg)';wireStyle["opacity"]=1.0;wireStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(wire);var wireClickable=this._wireClickable;var wireClickableStyle=wireClickable.style;wireClickableStyle.border="solid "+this._thicknessClickable+"px "+this._color;wireClickableStyle.position="absolute";wireClickableStyle["z-index"]=cfg.zIndex===undefined?"2000002":cfg.zIndex+1;wireClickableStyle.width=0+"px";wireClickableStyle.height=0+"px";wireClickableStyle.visibility="visible";wireClickableStyle.top=0+"px";wireClickableStyle.left=0+"px";// wireClickableStyle["pointer-events"] = "none";
|
|
2408
|
-
wireClickableStyle['-webkit-transform-origin']="0 0";wireClickableStyle['-moz-transform-origin']="0 0";wireClickableStyle['-ms-transform-origin']="0 0";wireClickableStyle['-o-transform-origin']="0 0";wireClickableStyle['transform-origin']="0 0";wireClickableStyle['-webkit-transform']='rotate(0deg)';wireClickableStyle['-moz-transform']='rotate(0deg)';wireClickableStyle['-ms-transform']='rotate(0deg)';wireClickableStyle['-o-transform']='rotate(0deg)';wireClickableStyle['transform']='rotate(0deg)';wireClickableStyle["opacity"]=0.0;wireClickableStyle["pointer-events"]="all";if(cfg.onContextMenu);parentElement.appendChild(wireClickable);if(cfg.onMouseOver){wireClickable.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this8);});}if(cfg.onMouseLeave){wireClickable.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this8);});}if(cfg.onContextMenu){wireClickable.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this8);event.preventDefault();});}this._x1=0;this._y1=0;this._x2=0;this._y2=0;this._update();}_createClass(Wire,[{key:"_visible",get:function get(){return this._wire.style.visibility==="visible";}},{key:"_update",value:function _update(){var length=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2)));var angle=Math.atan2(this._y2-this._y1,this._x2-this._x1)*180.0/Math.PI;var wireStyle=this._wire.style;wireStyle["width"]=Math.round(length)+'px';wireStyle["left"]=Math.round(this._x1)+'px';wireStyle["top"]=Math.round(this._y1)+'px';wireStyle['-webkit-transform']='rotate('+angle+'deg)';wireStyle['-moz-transform']='rotate('+angle+'deg)';wireStyle['-ms-transform']='rotate('+angle+'deg)';wireStyle['-o-transform']='rotate('+angle+'deg)';wireStyle['transform']='rotate('+angle+'deg)';var wireClickableStyle=this._wireClickable.style;wireClickableStyle["width"]=Math.round(length)+'px';wireClickableStyle["left"]=Math.round(this._x1)+'px';wireClickableStyle["top"]=Math.round(this._y1)+'px';wireClickableStyle['-webkit-transform']='rotate('+angle+'deg)';wireClickableStyle['-moz-transform']='rotate('+angle+'deg)';wireClickableStyle['-ms-transform']='rotate('+angle+'deg)';wireClickableStyle['-o-transform']='rotate('+angle+'deg)';wireClickableStyle['transform']='rotate('+angle+'deg)';}},{key:"setStartAndEnd",value:function setStartAndEnd(x1,y1,x2,y2){this._x1=x1;this._y1=y1;this._x2=x2;this._y2=y2;this._update();}},{key:"setColor",value:function setColor(color){this._color=color||"black";this._wire.style.border="solid "+this._thickness+"px "+this._color;}},{key:"setOpacity",value:function setOpacity(opacity){this._wire.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){visible=!!visible;if(this._visible===visible){return;}this._wire.style.visibility=visible?"visible":"hidden";}},{key:"setClickable",value:function setClickable(clickable){this._wireClickable.style["pointer-events"]=!!clickable?"all":"none";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._wire.classList.add(this._highlightClass);}else{this._wire.classList.remove(this._highlightClass);}}},{key:"destroy",value:function destroy(visible){this._wire.parentElement.removeChild(this._wire);this._wireClickable.parentElement.removeChild(this._wireClickable);}}]);return Wire;}();/** @private */var Dot=/*#__PURE__*/function(){function Dot(parentElement){var _this9=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Dot);this._highlightClass="viewer-ruler-dot-highlighted";this._x=0;this._y=0;this._visible=true;this._dot=document.createElement('div');this._dot.className+=this._dot.className?' viewer-ruler-dot':'viewer-ruler-dot';this._dotClickable=document.createElement('div');this._dotClickable.className+=this._dotClickable.className?' viewer-ruler-dot-clickable':'viewer-ruler-dot-clickable';var dot=this._dot;var dotStyle=dot.style;dotStyle["border-radius"]=25+"px";dotStyle.border="solid 2px white";dotStyle.background="lightgreen";dotStyle.position="absolute";dotStyle["z-index"]=cfg.zIndex===undefined?"40000005":cfg.zIndex;dotStyle.width=8+"px";dotStyle.height=8+"px";dotStyle.visibility=cfg.visible!==false?"visible":"hidden";dotStyle.top=0+"px";dotStyle.left=0+"px";dotStyle["box-shadow"]="0 2px 5px 0 #182A3D;";dotStyle["opacity"]=1.0;dotStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(dot);var dotClickable=this._dotClickable;var dotClickableStyle=dotClickable.style;dotClickableStyle["border-radius"]=35+"px";dotClickableStyle.border="solid 10px white";dotClickableStyle.position="absolute";dotClickableStyle["z-index"]=cfg.zIndex===undefined?"40000007":cfg.zIndex+1;dotClickableStyle.width=8+"px";dotClickableStyle.height=8+"px";dotClickableStyle.visibility="visible";dotClickableStyle.top=0+"px";dotClickableStyle.left=0+"px";dotClickableStyle["opacity"]=0.0;dotClickableStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(dotClickable);if(cfg.onMouseOver){dotClickable.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this9);});}if(cfg.onMouseLeave){dotClickable.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this9);});}if(cfg.onContextMenu){dotClickable.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this9);event.preventDefault();});}this.setPos(cfg.x||0,cfg.y||0);this.setFillColor(cfg.fillColor);this.setBorderColor(cfg.borderColor);}_createClass(Dot,[{key:"setPos",value:function setPos(x,y){this._x=x;this._y=y;var dotStyle=this._dot.style;dotStyle["left"]=Math.round(x)-4+'px';dotStyle["top"]=Math.round(y)-4+'px';var dotClickableStyle=this._dotClickable.style;dotClickableStyle["left"]=Math.round(x)-9+'px';dotClickableStyle["top"]=Math.round(y)-9+'px';}},{key:"setFillColor",value:function setFillColor(color){this._dot.style.background=color||"lightgreen";}},{key:"setBorderColor",value:function setBorderColor(color){this._dot.style.border="solid 2px"+(color||"black");}},{key:"setOpacity",value:function setOpacity(opacity){this._dot.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._dot.style.visibility=this._visible?"visible":"hidden";}},{key:"setClickable",value:function setClickable(clickable){this._dotClickable.style["pointer-events"]=!!clickable?"all":"none";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._dot.classList.add(this._highlightClass);}else{this._dot.classList.remove(this._highlightClass);}}},{key:"destroy",value:function destroy(){this.setVisible(false);this._dot.parentElement.removeChild(this._dot);this._dotClickable.parentElement.removeChild(this._dotClickable);}}]);return Dot;}();/** @private */var Label=/*#__PURE__*/function(){function Label(parentElement){var _this10=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Label);this._highlightClass="viewer-ruler-label-highlighted";this._prefix=cfg.prefix||"";this._x=0;this._y=0;this._visible=true;this._culled=false;this._label=document.createElement('div');this._label.className+=this._label.className?' viewer-ruler-label':'viewer-ruler-label';var label=this._label;var style=label.style;style["border-radius"]=5+"px";style.color="white";style.padding="4px";style.border="solid 1px";style.background="lightgreen";style.position="absolute";style["z-index"]=cfg.zIndex===undefined?"5000005":cfg.zIndex;style.width="auto";style.height="auto";style.visibility="visible";style.top=0+"px";style.left=0+"px";style["pointer-events"]="all";style["opacity"]=1.0;if(cfg.onContextMenu);label.innerText="";parentElement.appendChild(label);this.setPos(cfg.x||0,cfg.y||0);this.setFillColor(cfg.fillColor);this.setBorderColor(cfg.fillColor);this.setText(cfg.text);if(cfg.onMouseOver){label.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this10);event.preventDefault();});}if(cfg.onMouseLeave){label.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this10);event.preventDefault();});}if(cfg.onContextMenu){label.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this10);event.preventDefault();});}}_createClass(Label,[{key:"setPos",value:function setPos(x,y){this._x=x;this._y=y;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosOnWire",value:function setPosOnWire(x1,y1,x2,y2){var x=x1+(x2-x1)*0.5;var y=y1+(y2-y1)*0.5;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosBetweenWires",value:function setPosBetweenWires(x1,y1,x2,y2,x3,y3){var x=(x1+x2+x3)/3;var y=(y1+y2+y3)/3;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setText",value:function setText(text){this._label.innerHTML=this._prefix+(text||"");}},{key:"setFillColor",value:function setFillColor(color){this._fillColor=color||"lightgreen";this._label.style.background=this._fillColor;}},{key:"setBorderColor",value:function setBorderColor(color){this._borderColor=color||"black";this._label.style.border="solid 1px "+this._borderColor;}},{key:"setOpacity",value:function setOpacity(opacity){this._label.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setCulled",value:function setCulled(culled){if(this._culled===culled){return;}this._culled=!!culled;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._label.classList.add(this._highlightClass);}else{this._label.classList.remove(this._highlightClass);}}},{key:"setClickable",value:function setClickable(clickable){this._label.style["pointer-events"]=!!clickable?"all":"none";}},{key:"destroy",value:function destroy(){this._label.parentElement.removeChild(this._label);}}]);return Label;}();var originVec=math.vec3();var targetVec=math.vec3();/**
|
|
2408
|
+
wireClickableStyle['-webkit-transform-origin']="0 0";wireClickableStyle['-moz-transform-origin']="0 0";wireClickableStyle['-ms-transform-origin']="0 0";wireClickableStyle['-o-transform-origin']="0 0";wireClickableStyle['transform-origin']="0 0";wireClickableStyle['-webkit-transform']='rotate(0deg)';wireClickableStyle['-moz-transform']='rotate(0deg)';wireClickableStyle['-ms-transform']='rotate(0deg)';wireClickableStyle['-o-transform']='rotate(0deg)';wireClickableStyle['transform']='rotate(0deg)';wireClickableStyle["opacity"]=0.0;wireClickableStyle["pointer-events"]="all";if(cfg.onContextMenu);parentElement.appendChild(wireClickable);if(cfg.onMouseOver){wireClickable.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this8);});}if(cfg.onMouseLeave){wireClickable.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this8);});}if(cfg.onMouseWheel){wireClickable.addEventListener('wheel',function(event){cfg.onMouseWheel(event,_this8);});}if(cfg.onContextMenu){wireClickable.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this8);event.preventDefault();});}this._x1=0;this._y1=0;this._x2=0;this._y2=0;this._update();}_createClass(Wire,[{key:"_visible",get:function get(){return this._wire.style.visibility==="visible";}},{key:"_update",value:function _update(){var length=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2)));var angle=Math.atan2(this._y2-this._y1,this._x2-this._x1)*180.0/Math.PI;var wireStyle=this._wire.style;wireStyle["width"]=Math.round(length)+'px';wireStyle["left"]=Math.round(this._x1)+'px';wireStyle["top"]=Math.round(this._y1)+'px';wireStyle['-webkit-transform']='rotate('+angle+'deg)';wireStyle['-moz-transform']='rotate('+angle+'deg)';wireStyle['-ms-transform']='rotate('+angle+'deg)';wireStyle['-o-transform']='rotate('+angle+'deg)';wireStyle['transform']='rotate('+angle+'deg)';var wireClickableStyle=this._wireClickable.style;wireClickableStyle["width"]=Math.round(length)+'px';wireClickableStyle["left"]=Math.round(this._x1)+'px';wireClickableStyle["top"]=Math.round(this._y1)+'px';wireClickableStyle['-webkit-transform']='rotate('+angle+'deg)';wireClickableStyle['-moz-transform']='rotate('+angle+'deg)';wireClickableStyle['-ms-transform']='rotate('+angle+'deg)';wireClickableStyle['-o-transform']='rotate('+angle+'deg)';wireClickableStyle['transform']='rotate('+angle+'deg)';}},{key:"setStartAndEnd",value:function setStartAndEnd(x1,y1,x2,y2){this._x1=x1;this._y1=y1;this._x2=x2;this._y2=y2;this._update();}},{key:"setColor",value:function setColor(color){this._color=color||"black";this._wire.style.border="solid "+this._thickness+"px "+this._color;}},{key:"setOpacity",value:function setOpacity(opacity){this._wire.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){visible=!!visible;if(this._visible===visible){return;}this._wire.style.visibility=visible?"visible":"hidden";}},{key:"setClickable",value:function setClickable(clickable){this._wireClickable.style["pointer-events"]=!!clickable?"all":"none";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._wire.classList.add(this._highlightClass);}else{this._wire.classList.remove(this._highlightClass);}}},{key:"destroy",value:function destroy(visible){this._wire.parentElement.removeChild(this._wire);this._wireClickable.parentElement.removeChild(this._wireClickable);}}]);return Wire;}();/** @private */var Dot=/*#__PURE__*/function(){function Dot(parentElement){var _this9=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Dot);this._highlightClass="viewer-ruler-dot-highlighted";this._x=0;this._y=0;this._visible=true;this._dot=document.createElement('div');this._dot.className+=this._dot.className?' viewer-ruler-dot':'viewer-ruler-dot';this._dotClickable=document.createElement('div');this._dotClickable.className+=this._dotClickable.className?' viewer-ruler-dot-clickable':'viewer-ruler-dot-clickable';var dot=this._dot;var dotStyle=dot.style;dotStyle["border-radius"]=25+"px";dotStyle.border="solid 2px white";dotStyle.background="lightgreen";dotStyle.position="absolute";dotStyle["z-index"]=cfg.zIndex===undefined?"40000005":cfg.zIndex;dotStyle.width=8+"px";dotStyle.height=8+"px";dotStyle.visibility=cfg.visible!==false?"visible":"hidden";dotStyle.top=0+"px";dotStyle.left=0+"px";dotStyle["box-shadow"]="0 2px 5px 0 #182A3D;";dotStyle["opacity"]=1.0;dotStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(dot);var dotClickable=this._dotClickable;var dotClickableStyle=dotClickable.style;dotClickableStyle["border-radius"]=35+"px";dotClickableStyle.border="solid 10px white";dotClickableStyle.position="absolute";dotClickableStyle["z-index"]=cfg.zIndex===undefined?"40000007":cfg.zIndex+1;dotClickableStyle.width=8+"px";dotClickableStyle.height=8+"px";dotClickableStyle.visibility="visible";dotClickableStyle.top=0+"px";dotClickableStyle.left=0+"px";dotClickableStyle["opacity"]=0.0;dotClickableStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(dotClickable);if(cfg.onMouseOver){dotClickable.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this9);});}if(cfg.onMouseLeave){dotClickable.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this9);});}if(cfg.onMouseWheel){dotClickable.addEventListener('wheel',function(event){cfg.onMouseWheel(event,_this9);});}if(cfg.onContextMenu){dotClickable.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this9);event.preventDefault();});}this.setPos(cfg.x||0,cfg.y||0);this.setFillColor(cfg.fillColor);this.setBorderColor(cfg.borderColor);}_createClass(Dot,[{key:"setPos",value:function setPos(x,y){this._x=x;this._y=y;var dotStyle=this._dot.style;dotStyle["left"]=Math.round(x)-4+'px';dotStyle["top"]=Math.round(y)-4+'px';var dotClickableStyle=this._dotClickable.style;dotClickableStyle["left"]=Math.round(x)-9+'px';dotClickableStyle["top"]=Math.round(y)-9+'px';}},{key:"setFillColor",value:function setFillColor(color){this._dot.style.background=color||"lightgreen";}},{key:"setBorderColor",value:function setBorderColor(color){this._dot.style.border="solid 2px"+(color||"black");}},{key:"setOpacity",value:function setOpacity(opacity){this._dot.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._dot.style.visibility=this._visible?"visible":"hidden";}},{key:"setClickable",value:function setClickable(clickable){this._dotClickable.style["pointer-events"]=!!clickable?"all":"none";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._dot.classList.add(this._highlightClass);}else{this._dot.classList.remove(this._highlightClass);}}},{key:"destroy",value:function destroy(){this.setVisible(false);this._dot.parentElement.removeChild(this._dot);this._dotClickable.parentElement.removeChild(this._dotClickable);}}]);return Dot;}();/** @private */var Label=/*#__PURE__*/function(){function Label(parentElement){var _this10=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Label);this._highlightClass="viewer-ruler-label-highlighted";this._prefix=cfg.prefix||"";this._x=0;this._y=0;this._visible=true;this._culled=false;this._label=document.createElement('div');this._label.className+=this._label.className?' viewer-ruler-label':'viewer-ruler-label';var label=this._label;var style=label.style;style["border-radius"]=5+"px";style.color="white";style.padding="4px";style.border="solid 1px";style.background="lightgreen";style.position="absolute";style["z-index"]=cfg.zIndex===undefined?"5000005":cfg.zIndex;style.width="auto";style.height="auto";style.visibility="visible";style.top=0+"px";style.left=0+"px";style["pointer-events"]="all";style["opacity"]=1.0;if(cfg.onContextMenu);label.innerText="";parentElement.appendChild(label);this.setPos(cfg.x||0,cfg.y||0);this.setFillColor(cfg.fillColor);this.setBorderColor(cfg.fillColor);this.setText(cfg.text);if(cfg.onMouseOver){label.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this10);event.preventDefault();});}if(cfg.onMouseLeave){label.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this10);event.preventDefault();});}if(cfg.onMouseWheel){label.addEventListener('wheel',function(event){cfg.onMouseWheel(event,_this10);});}if(cfg.onContextMenu){label.addEventListener('contextmenu',function(event){cfg.onContextMenu(event,_this10);event.preventDefault();});}}_createClass(Label,[{key:"setPos",value:function setPos(x,y){this._x=x;this._y=y;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosOnWire",value:function setPosOnWire(x1,y1,x2,y2){var x=x1+(x2-x1)*0.5;var y=y1+(y2-y1)*0.5;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosBetweenWires",value:function setPosBetweenWires(x1,y1,x2,y2,x3,y3){var x=(x1+x2+x3)/3;var y=(y1+y2+y3)/3;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setText",value:function setText(text){this._label.innerHTML=this._prefix+(text||"");}},{key:"setFillColor",value:function setFillColor(color){this._fillColor=color||"lightgreen";this._label.style.background=this._fillColor;}},{key:"setBorderColor",value:function setBorderColor(color){this._borderColor=color||"black";this._label.style.border="solid 1px "+this._borderColor;}},{key:"setOpacity",value:function setOpacity(opacity){this._label.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setCulled",value:function setCulled(culled){if(this._culled===culled){return;}this._culled=!!culled;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._label.classList.add(this._highlightClass);}else{this._label.classList.remove(this._highlightClass);}}},{key:"setClickable",value:function setClickable(clickable){this._label.style["pointer-events"]=!!clickable?"all":"none";}},{key:"destroy",value:function destroy(){this._label.parentElement.removeChild(this._label);}}]);return Label;}();var originVec=math.vec3();var targetVec=math.vec3();/**
|
|
2409
2409
|
* @desc Measures the angle indicated by three 3D points.
|
|
2410
2410
|
*
|
|
2411
2411
|
* See {@link AngleMeasurementsPlugin} for more info.
|
|
@@ -15990,7 +15990,7 @@ origin:eye,direction:look});look=hit?hit.worldPos:math.addVec3(eye,look,tempVec3
|
|
|
15990
15990
|
*/function DistanceMeasurement(plugin){var _this67;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurement);_this67=_super44.call(this,plugin.viewer.scene,cfg);/**
|
|
15991
15991
|
* The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurement.
|
|
15992
15992
|
* @type {DistanceMeasurementsPlugin}
|
|
15993
|
-
*/_this67.plugin=plugin;_this67._container=cfg.container;if(!_this67._container){throw"config missing: container";}_this67._eventSubs={};var scene=_this67.plugin.viewer.scene;_this67._originMarker=new Marker(scene,cfg.origin);_this67._targetMarker=new Marker(scene,cfg.target);_this67._originWorld=math.vec3();_this67._targetWorld=math.vec3();_this67._wp=new Float64Array(24);_this67._vp=new Float64Array(24);_this67._pp=new Float64Array(24);_this67._cp=new Float64Array(8);_this67._xAxisLabelCulled=false;_this67._yAxisLabelCulled=false;_this67._zAxisLabelCulled=false;_this67._color=cfg.color||_this67.plugin.defaultColor;var onMouseOver=cfg.onMouseOver?function(event){cfg.onMouseOver(event,_assertThisInitialized(_this67));}:null;var onMouseLeave=cfg.onMouseLeave?function(event){cfg.onMouseLeave(event,_assertThisInitialized(_this67));}:null;var onContextMenu=cfg.onContextMenu?function(event){cfg.onContextMenu(event,_assertThisInitialized(_this67));}:null;_this67._originDot=new Dot(_this67._container,{fillColor:_this67._color,zIndex:plugin.zIndex!==undefined?plugin.zIndex+2:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._targetDot=new Dot(_this67._container,{fillColor:_this67._color,zIndex:plugin.zIndex!==undefined?plugin.zIndex+2:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._lengthWire=new Wire(_this67._container,{color:_this67._color,thickness:2,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._xAxisWire=new Wire(_this67._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._yAxisWire=new Wire(_this67._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._zAxisWire=new Wire(_this67._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._lengthLabel=new Label(_this67._container,{fillColor:_this67._color,prefix:"",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+4:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._xAxisLabel=new Label(_this67._container,{fillColor:"red",prefix:"X",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._yAxisLabel=new Label(_this67._container,{fillColor:"green",prefix:"Y",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._zAxisLabel=new Label(_this67._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onContextMenu:onContextMenu});_this67._wpDirty=false;_this67._vpDirty=false;_this67._cpDirty=false;_this67._visible=false;_this67._originVisible=false;_this67._targetVisible=false;_this67._wireVisible=false;_this67._axisVisible=false;_this67._xAxisVisible=false;_this67._yAxisVisible=false;_this67._zAxisVisible=false;_this67._axisEnabled=true;_this67._labelsVisible=false;_this67._clickable=false;_this67._originMarker.on("worldPos",function(value){_this67._originWorld.set(value||[0,0,0]);_this67._wpDirty=true;_this67._needUpdate(0);// No lag
|
|
15993
|
+
*/_this67.plugin=plugin;_this67._container=cfg.container;if(!_this67._container){throw"config missing: container";}_this67._eventSubs={};var scene=_this67.plugin.viewer.scene;_this67._originMarker=new Marker(scene,cfg.origin);_this67._targetMarker=new Marker(scene,cfg.target);_this67._originWorld=math.vec3();_this67._targetWorld=math.vec3();_this67._wp=new Float64Array(24);_this67._vp=new Float64Array(24);_this67._pp=new Float64Array(24);_this67._cp=new Float64Array(8);_this67._xAxisLabelCulled=false;_this67._yAxisLabelCulled=false;_this67._zAxisLabelCulled=false;_this67._color=cfg.color||_this67.plugin.defaultColor;var onMouseOver=cfg.onMouseOver?function(event){cfg.onMouseOver(event,_assertThisInitialized(_this67));}:null;var onMouseLeave=cfg.onMouseLeave?function(event){cfg.onMouseLeave(event,_assertThisInitialized(_this67));}:null;var onContextMenu=cfg.onContextMenu?function(event){cfg.onContextMenu(event,_assertThisInitialized(_this67));}:null;var onMouseWheel=function onMouseWheel(event){_this67.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel',event));};_this67._originDot=new Dot(_this67._container,{fillColor:_this67._color,zIndex:plugin.zIndex!==undefined?plugin.zIndex+2:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._targetDot=new Dot(_this67._container,{fillColor:_this67._color,zIndex:plugin.zIndex!==undefined?plugin.zIndex+2:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._lengthWire=new Wire(_this67._container,{color:_this67._color,thickness:2,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._xAxisWire=new Wire(_this67._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._yAxisWire=new Wire(_this67._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._zAxisWire=new Wire(_this67._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:plugin.zIndex!==undefined?plugin.zIndex+1:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._lengthLabel=new Label(_this67._container,{fillColor:_this67._color,prefix:"",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+4:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._xAxisLabel=new Label(_this67._container,{fillColor:"red",prefix:"X",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._yAxisLabel=new Label(_this67._container,{fillColor:"green",prefix:"Y",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._zAxisLabel=new Label(_this67._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:plugin.zIndex!==undefined?plugin.zIndex+3:undefined,onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,onMouseWheel:onMouseWheel,onContextMenu:onContextMenu});_this67._wpDirty=false;_this67._vpDirty=false;_this67._cpDirty=false;_this67._visible=false;_this67._originVisible=false;_this67._targetVisible=false;_this67._wireVisible=false;_this67._axisVisible=false;_this67._xAxisVisible=false;_this67._yAxisVisible=false;_this67._zAxisVisible=false;_this67._axisEnabled=true;_this67._labelsVisible=false;_this67._clickable=false;_this67._originMarker.on("worldPos",function(value){_this67._originWorld.set(value||[0,0,0]);_this67._wpDirty=true;_this67._needUpdate(0);// No lag
|
|
15994
15994
|
});_this67._targetMarker.on("worldPos",function(value){_this67._targetWorld.set(value||[0,0,0]);_this67._wpDirty=true;_this67._needUpdate(0);// No lag
|
|
15995
15995
|
});_this67._onViewMatrix=scene.camera.on("viewMatrix",function(){_this67._vpDirty=true;_this67._needUpdate(0);// No lag
|
|
15996
15996
|
});_this67._onProjMatrix=scene.camera.on("projMatrix",function(){_this67._cpDirty=true;_this67._needUpdate();});_this67._onCanvasBoundary=scene.canvas.on("boundary",function(){_this67._cpDirty=true;_this67._needUpdate(0);// No lag
|