@inweb/viewer-three 26.3.1 → 26.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +1 -1
- package/dist/viewer-three.js +392 -368
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +2 -2
- package/dist/viewer-three.module.js +107 -107
- package/dist/viewer-three.module.js.map +1 -1
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +2 -2
- package/src/Viewer/commands/ApplyModelTransform.ts +2 -2
- package/src/Viewer/commands/ClearMarkup.ts +2 -2
- package/src/Viewer/commands/ClearSelected.ts +5 -5
- package/src/Viewer/commands/ClearSlices.ts +2 -2
- package/src/Viewer/commands/CreatePreview.ts +2 -2
- package/src/Viewer/commands/Explode.ts +2 -2
- package/src/Viewer/commands/GetDefaultViewPositions.ts +2 -2
- package/src/Viewer/commands/GetModels.ts +2 -2
- package/src/Viewer/commands/GetSelected.ts +2 -2
- package/src/Viewer/commands/HideSelected.ts +2 -2
- package/src/Viewer/commands/IsolateSelected.ts +2 -2
- package/src/Viewer/commands/RegenerateAll.ts +2 -2
- package/src/Viewer/commands/ResetView.ts +2 -2
- package/src/Viewer/commands/SelectModel.ts +2 -2
- package/src/Viewer/commands/SetActiveDragger.ts +2 -2
- package/src/Viewer/commands/SetDefaultViewPosition.ts +2 -2
- package/src/Viewer/commands/SetMarkupColor.ts +2 -2
- package/src/Viewer/commands/SetSelected.ts +5 -5
- package/src/Viewer/commands/ShowAll.ts +2 -2
- package/src/Viewer/commands/ZoomTo.ts +2 -2
- package/src/Viewer/commands/ZoomToExtents.ts +2 -2
- package/src/Viewer/commands/ZoomToObjects.ts +2 -2
- package/src/Viewer/commands/ZoomToSelected.ts +2 -2
- package/src/Viewer/commands/index.ts +2 -2
- package/src/Viewer/components/AxesHelperComponent.ts +2 -2
- package/src/Viewer/components/BackgroundComponent.ts +2 -2
- package/src/Viewer/components/CameraComponent.ts +2 -2
- package/src/Viewer/components/ExtentsComponent.ts +2 -2
- package/src/Viewer/components/ExtentsHelperComponent.ts +2 -2
- package/src/Viewer/components/LightComponent.ts +2 -2
- package/src/Viewer/components/LightHelperComponent.ts +2 -2
- package/src/Viewer/components/RenderLoopComponent.ts +2 -2
- package/src/Viewer/components/ResizeCanvasComponent.ts +2 -2
- package/src/Viewer/components/SelectionComponent.ts +2 -2
- package/src/Viewer/components/ViewPositionComponent.ts +2 -2
- package/src/Viewer/components/WCSHelperComponent.ts +2 -2
- package/src/Viewer/components/index.ts +2 -2
- package/src/Viewer/controls/WalkControls.ts +2 -2
- package/src/Viewer/draggers/CuttingPlaneDragger.ts +2 -2
- package/src/Viewer/draggers/CuttingPlaneXAxis.ts +2 -2
- package/src/Viewer/draggers/CuttingPlaneYAxis.ts +2 -2
- package/src/Viewer/draggers/CuttingPlaneZAxis.ts +2 -2
- package/src/Viewer/draggers/MeasureLineDragger.ts +2 -2
- package/src/Viewer/draggers/OrbitDragger.ts +2 -2
- package/src/Viewer/draggers/PanDragger.ts +2 -2
- package/src/Viewer/draggers/WalkDragger.ts +2 -2
- package/src/Viewer/draggers/ZoomDragger.ts +2 -2
- package/src/Viewer/draggers/index.ts +2 -2
- package/src/Viewer/helpers/PlaneHelper.ts +2 -2
- package/src/Viewer/loaders/GLTFLoadingManager.ts +2 -2
- package/src/index.ts +2 -2
package/dist/viewer-three.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
const {handler: handler, thisArg: thisArg} = command;
|
|
41
41
|
const result = handler.apply(thisArg, [ viewer, ...args ]);
|
|
42
|
-
viewer === null || viewer ===
|
|
42
|
+
viewer === null || viewer === void 0 ? void 0 : viewer.emit({
|
|
43
43
|
type: "command",
|
|
44
44
|
data: id,
|
|
45
45
|
args: args
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
hasRequiredGlobal = 1;
|
|
485
485
|
(function (exports) {
|
|
486
486
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
487
|
-
exports._registerNode = exports.Konva = exports.glob =
|
|
487
|
+
exports._registerNode = exports.Konva = exports.glob = void 0;
|
|
488
488
|
const PI_OVER_180 = Math.PI / 180;
|
|
489
489
|
function detectBrowser() {
|
|
490
490
|
return (typeof window !== 'undefined' &&
|
|
@@ -500,7 +500,7 @@
|
|
|
500
500
|
: {};
|
|
501
501
|
exports.Konva = {
|
|
502
502
|
_global: exports.glob,
|
|
503
|
-
version: '9.3.
|
|
503
|
+
version: '9.3.20',
|
|
504
504
|
isBrowser: detectBrowser(),
|
|
505
505
|
isUnminified: /param/.test(function (param) { }.toString()),
|
|
506
506
|
dblClickWindow: 400,
|
|
@@ -532,7 +532,7 @@
|
|
|
532
532
|
},
|
|
533
533
|
isTransforming() {
|
|
534
534
|
var _a;
|
|
535
|
-
return (_a = exports.Konva['Transformer']) === null || _a ===
|
|
535
|
+
return (_a = exports.Konva['Transformer']) === null || _a === void 0 ? void 0 : _a.isTransforming();
|
|
536
536
|
},
|
|
537
537
|
isDragReady() {
|
|
538
538
|
return !!exports.Konva['DD'].node;
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
hasRequiredUtil = 1;
|
|
562
562
|
(function (exports) {
|
|
563
563
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
564
|
-
exports.Util = exports.Transform =
|
|
564
|
+
exports.Util = exports.Transform = void 0;
|
|
565
565
|
const Global_1 = requireGlobal();
|
|
566
566
|
class Transform {
|
|
567
567
|
constructor(m = [1, 0, 0, 1, 0, 0]) {
|
|
@@ -1579,7 +1579,7 @@
|
|
|
1579
1579
|
hasRequiredFactory = 1;
|
|
1580
1580
|
(function (exports) {
|
|
1581
1581
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1582
|
-
exports.Factory =
|
|
1582
|
+
exports.Factory = void 0;
|
|
1583
1583
|
const Util_1 = requireUtil();
|
|
1584
1584
|
const Validators_1 = requireValidators();
|
|
1585
1585
|
const GET = 'get';
|
|
@@ -1717,7 +1717,7 @@
|
|
|
1717
1717
|
if (hasRequiredContext) return Context;
|
|
1718
1718
|
hasRequiredContext = 1;
|
|
1719
1719
|
Object.defineProperty(Context, "__esModule", { value: true });
|
|
1720
|
-
Context.HitContext = Context.SceneContext = Context.Context =
|
|
1720
|
+
Context.HitContext = Context.SceneContext = Context.Context = void 0;
|
|
1721
1721
|
const Util_1 = requireUtil();
|
|
1722
1722
|
const Global_1 = requireGlobal();
|
|
1723
1723
|
function simplifyArray(arr) {
|
|
@@ -2206,7 +2206,7 @@
|
|
|
2206
2206
|
}
|
|
2207
2207
|
_applyShadow(shape) {
|
|
2208
2208
|
var _a, _b, _c;
|
|
2209
|
-
const color = (_a = shape.getShadowRGBA()) !== null && _a !==
|
|
2209
|
+
const color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {
|
|
2210
2210
|
x: 0,
|
|
2211
2211
|
y: 0,
|
|
2212
2212
|
}, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;
|
|
@@ -2265,12 +2265,10 @@
|
|
|
2265
2265
|
if (hasRequiredCanvas) return Canvas;
|
|
2266
2266
|
hasRequiredCanvas = 1;
|
|
2267
2267
|
Object.defineProperty(Canvas, "__esModule", { value: true });
|
|
2268
|
-
Canvas.HitCanvas = Canvas.SceneCanvas = Canvas.Canvas =
|
|
2268
|
+
Canvas.HitCanvas = Canvas.SceneCanvas = Canvas.Canvas = void 0;
|
|
2269
2269
|
const Util_1 = requireUtil();
|
|
2270
2270
|
const Context_1 = requireContext();
|
|
2271
2271
|
const Global_1 = requireGlobal();
|
|
2272
|
-
const Factory_1 = requireFactory();
|
|
2273
|
-
const Validators_1 = requireValidators();
|
|
2274
2272
|
let _pixelRatio;
|
|
2275
2273
|
function getDevicePixelRatio() {
|
|
2276
2274
|
if (_pixelRatio) {
|
|
@@ -2359,7 +2357,6 @@
|
|
|
2359
2357
|
}
|
|
2360
2358
|
};
|
|
2361
2359
|
Canvas.Canvas = Canvas$1;
|
|
2362
|
-
Factory_1.Factory.addGetterSetter(Canvas$1, 'pixelRatio', undefined, (0, Validators_1.getNumberValidator)());
|
|
2363
2360
|
class SceneCanvas extends Canvas$1 {
|
|
2364
2361
|
constructor(config = { width: 0, height: 0, willReadFrequently: false }) {
|
|
2365
2362
|
super(config);
|
|
@@ -2391,7 +2388,7 @@
|
|
|
2391
2388
|
hasRequiredDragAndDrop = 1;
|
|
2392
2389
|
(function (exports) {
|
|
2393
2390
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2394
|
-
exports.DD =
|
|
2391
|
+
exports.DD = void 0;
|
|
2395
2392
|
const Global_1 = requireGlobal();
|
|
2396
2393
|
const Util_1 = requireUtil();
|
|
2397
2394
|
exports.DD = {
|
|
@@ -2512,7 +2509,7 @@
|
|
|
2512
2509
|
if (hasRequiredNode) return Node;
|
|
2513
2510
|
hasRequiredNode = 1;
|
|
2514
2511
|
Object.defineProperty(Node, "__esModule", { value: true });
|
|
2515
|
-
Node.Node =
|
|
2512
|
+
Node.Node = void 0;
|
|
2516
2513
|
const Util_1 = requireUtil();
|
|
2517
2514
|
const Factory_1 = requireFactory();
|
|
2518
2515
|
const Canvas_1 = requireCanvas();
|
|
@@ -3417,7 +3414,7 @@
|
|
|
3417
3414
|
var _a, _b;
|
|
3418
3415
|
const m = this._cache.get(TRANSFORM) || new Util_1.Transform();
|
|
3419
3416
|
m.reset();
|
|
3420
|
-
const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !==
|
|
3417
|
+
const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;
|
|
3421
3418
|
if (x !== 0 || y !== 0) {
|
|
3422
3419
|
m.translate(x, y);
|
|
3423
3420
|
}
|
|
@@ -3619,7 +3616,7 @@
|
|
|
3619
3616
|
_requestDraw() {
|
|
3620
3617
|
if (Global_1.Konva.autoDrawEnabled) {
|
|
3621
3618
|
const drawNode = this.getLayer() || this.getStage();
|
|
3622
|
-
drawNode === null || drawNode ===
|
|
3619
|
+
drawNode === null || drawNode === void 0 ? void 0 : drawNode.batchDraw();
|
|
3623
3620
|
}
|
|
3624
3621
|
}
|
|
3625
3622
|
_setAttr(key, val) {
|
|
@@ -3680,13 +3677,13 @@
|
|
|
3680
3677
|
}
|
|
3681
3678
|
_getProtoListeners(eventType) {
|
|
3682
3679
|
var _a, _b, _c;
|
|
3683
|
-
const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !==
|
|
3684
|
-
let events = allListeners === null || allListeners ===
|
|
3680
|
+
const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !== void 0 ? _a : {};
|
|
3681
|
+
let events = allListeners === null || allListeners === void 0 ? void 0 : allListeners[eventType];
|
|
3685
3682
|
if (events === undefined) {
|
|
3686
3683
|
events = [];
|
|
3687
3684
|
let obj = Object.getPrototypeOf(this);
|
|
3688
3685
|
while (obj) {
|
|
3689
|
-
const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b ===
|
|
3686
|
+
const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b === void 0 ? void 0 : _b[eventType]) !== null && _c !== void 0 ? _c : [];
|
|
3690
3687
|
events.push(...hierarchyEvents);
|
|
3691
3688
|
obj = Object.getPrototypeOf(obj);
|
|
3692
3689
|
}
|
|
@@ -3952,7 +3949,7 @@
|
|
|
3952
3949
|
if (hasRequiredContainer) return Container;
|
|
3953
3950
|
hasRequiredContainer = 1;
|
|
3954
3951
|
Object.defineProperty(Container, "__esModule", { value: true });
|
|
3955
|
-
Container.Container =
|
|
3952
|
+
Container.Container = void 0;
|
|
3956
3953
|
const Factory_1 = requireFactory();
|
|
3957
3954
|
const Node_1 = requireNode();
|
|
3958
3955
|
const Validators_1 = requireValidators();
|
|
@@ -4109,13 +4106,13 @@
|
|
|
4109
4106
|
if (this.isCached()) {
|
|
4110
4107
|
return;
|
|
4111
4108
|
}
|
|
4112
|
-
(_a = this.children) === null || _a ===
|
|
4109
|
+
(_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {
|
|
4113
4110
|
node._clearSelfAndDescendantCache(attr);
|
|
4114
4111
|
});
|
|
4115
4112
|
}
|
|
4116
4113
|
_setChildrenIndices() {
|
|
4117
4114
|
var _a;
|
|
4118
|
-
(_a = this.children) === null || _a ===
|
|
4115
|
+
(_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child, n) {
|
|
4119
4116
|
child.index = n;
|
|
4120
4117
|
});
|
|
4121
4118
|
this._requestDraw();
|
|
@@ -4186,7 +4183,7 @@
|
|
|
4186
4183
|
context.save();
|
|
4187
4184
|
context._applyGlobalCompositeOperation(this);
|
|
4188
4185
|
}
|
|
4189
|
-
(_a = this.children) === null || _a ===
|
|
4186
|
+
(_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
|
|
4190
4187
|
child[drawMethod](canvas, top, bufferCanvas);
|
|
4191
4188
|
});
|
|
4192
4189
|
if (hasComposition) {
|
|
@@ -4208,7 +4205,7 @@
|
|
|
4208
4205
|
height: 0,
|
|
4209
4206
|
};
|
|
4210
4207
|
const that = this;
|
|
4211
|
-
(_a = this.children) === null || _a ===
|
|
4208
|
+
(_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
|
|
4212
4209
|
if (!child.visible()) {
|
|
4213
4210
|
return;
|
|
4214
4211
|
}
|
|
@@ -4340,7 +4337,7 @@
|
|
|
4340
4337
|
hasRequiredStage = 1;
|
|
4341
4338
|
(function (exports) {
|
|
4342
4339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4343
|
-
exports.Stage = exports.stages =
|
|
4340
|
+
exports.Stage = exports.stages = void 0;
|
|
4344
4341
|
const Util_1 = requireUtil();
|
|
4345
4342
|
const Factory_1 = requireFactory();
|
|
4346
4343
|
const Container_1 = requireContainer();
|
|
@@ -5057,7 +5054,7 @@
|
|
|
5057
5054
|
hasRequiredShape = 1;
|
|
5058
5055
|
(function (exports) {
|
|
5059
5056
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5060
|
-
exports.Shape = exports.shapes =
|
|
5057
|
+
exports.Shape = exports.shapes = void 0;
|
|
5061
5058
|
const Global_1 = requireGlobal();
|
|
5062
5059
|
const Util_1 = requireUtil();
|
|
5063
5060
|
const Factory_1 = requireFactory();
|
|
@@ -5290,7 +5287,7 @@
|
|
|
5290
5287
|
}
|
|
5291
5288
|
_useBufferCanvas(forceFill) {
|
|
5292
5289
|
var _a;
|
|
5293
|
-
const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !==
|
|
5290
|
+
const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== void 0 ? _a : true;
|
|
5294
5291
|
if (!perfectDrawEnabled) {
|
|
5295
5292
|
return false;
|
|
5296
5293
|
}
|
|
@@ -5610,7 +5607,7 @@
|
|
|
5610
5607
|
if (hasRequiredLayer) return Layer;
|
|
5611
5608
|
hasRequiredLayer = 1;
|
|
5612
5609
|
Object.defineProperty(Layer, "__esModule", { value: true });
|
|
5613
|
-
Layer.Layer =
|
|
5610
|
+
Layer.Layer = void 0;
|
|
5614
5611
|
const Util_1 = requireUtil();
|
|
5615
5612
|
const Container_1 = requireContainer();
|
|
5616
5613
|
const Node_1 = requireNode();
|
|
@@ -5928,7 +5925,7 @@
|
|
|
5928
5925
|
if (hasRequiredFastLayer) return FastLayer;
|
|
5929
5926
|
hasRequiredFastLayer = 1;
|
|
5930
5927
|
Object.defineProperty(FastLayer, "__esModule", { value: true });
|
|
5931
|
-
FastLayer.FastLayer =
|
|
5928
|
+
FastLayer.FastLayer = void 0;
|
|
5932
5929
|
const Util_1 = requireUtil();
|
|
5933
5930
|
const Layer_1 = requireLayer();
|
|
5934
5931
|
const Global_1 = requireGlobal();
|
|
@@ -5953,7 +5950,7 @@
|
|
|
5953
5950
|
if (hasRequiredGroup) return Group$1;
|
|
5954
5951
|
hasRequiredGroup = 1;
|
|
5955
5952
|
Object.defineProperty(Group$1, "__esModule", { value: true });
|
|
5956
|
-
Group$1.Group =
|
|
5953
|
+
Group$1.Group = void 0;
|
|
5957
5954
|
const Util_1 = requireUtil();
|
|
5958
5955
|
const Container_1 = requireContainer();
|
|
5959
5956
|
const Global_1 = requireGlobal();
|
|
@@ -5979,7 +5976,7 @@
|
|
|
5979
5976
|
if (hasRequiredAnimation) return Animation;
|
|
5980
5977
|
hasRequiredAnimation = 1;
|
|
5981
5978
|
Object.defineProperty(Animation, "__esModule", { value: true });
|
|
5982
|
-
Animation.Animation =
|
|
5979
|
+
Animation.Animation = void 0;
|
|
5983
5980
|
const Global_1 = requireGlobal();
|
|
5984
5981
|
const Util_1 = requireUtil();
|
|
5985
5982
|
const now = (function () {
|
|
@@ -6135,7 +6132,7 @@
|
|
|
6135
6132
|
hasRequiredTween = 1;
|
|
6136
6133
|
(function (exports) {
|
|
6137
6134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6138
|
-
exports.Easings = exports.Tween =
|
|
6135
|
+
exports.Easings = exports.Tween = void 0;
|
|
6139
6136
|
const Util_1 = requireUtil();
|
|
6140
6137
|
const Animation_1 = requireAnimation();
|
|
6141
6138
|
const Node_1 = requireNode();
|
|
@@ -6668,7 +6665,7 @@
|
|
|
6668
6665
|
hasRequired_CoreInternals = 1;
|
|
6669
6666
|
(function (exports) {
|
|
6670
6667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6671
|
-
exports.Konva =
|
|
6668
|
+
exports.Konva = void 0;
|
|
6672
6669
|
const Global_1 = requireGlobal();
|
|
6673
6670
|
const Util_1 = requireUtil();
|
|
6674
6671
|
const Node_1 = requireNode();
|
|
@@ -6715,7 +6712,7 @@
|
|
|
6715
6712
|
if (hasRequiredArc) return Arc;
|
|
6716
6713
|
hasRequiredArc = 1;
|
|
6717
6714
|
Object.defineProperty(Arc, "__esModule", { value: true });
|
|
6718
|
-
Arc.Arc =
|
|
6715
|
+
Arc.Arc = void 0;
|
|
6719
6716
|
const Factory_1 = requireFactory();
|
|
6720
6717
|
const Shape_1 = requireShape();
|
|
6721
6718
|
const Global_1 = requireGlobal();
|
|
@@ -6766,7 +6763,12 @@
|
|
|
6766
6763
|
Arc.Arc = Arc$1;
|
|
6767
6764
|
Arc$1.prototype._centroid = true;
|
|
6768
6765
|
Arc$1.prototype.className = 'Arc';
|
|
6769
|
-
Arc$1.prototype._attrsAffectingSize = [
|
|
6766
|
+
Arc$1.prototype._attrsAffectingSize = [
|
|
6767
|
+
'innerRadius',
|
|
6768
|
+
'outerRadius',
|
|
6769
|
+
'angle',
|
|
6770
|
+
'clockwise',
|
|
6771
|
+
];
|
|
6770
6772
|
(0, Global_2._registerNode)(Arc$1);
|
|
6771
6773
|
Factory_1.Factory.addGetterSetter(Arc$1, 'innerRadius', 0, (0, Validators_1.getNumberValidator)());
|
|
6772
6774
|
Factory_1.Factory.addGetterSetter(Arc$1, 'outerRadius', 0, (0, Validators_1.getNumberValidator)());
|
|
@@ -6785,7 +6787,7 @@
|
|
|
6785
6787
|
if (hasRequiredLine) return Line$1;
|
|
6786
6788
|
hasRequiredLine = 1;
|
|
6787
6789
|
Object.defineProperty(Line$1, "__esModule", { value: true });
|
|
6788
|
-
Line$1.Line =
|
|
6790
|
+
Line$1.Line = void 0;
|
|
6789
6791
|
const Factory_1 = requireFactory();
|
|
6790
6792
|
const Global_1 = requireGlobal();
|
|
6791
6793
|
const Shape_1 = requireShape();
|
|
@@ -6956,7 +6958,7 @@
|
|
|
6956
6958
|
hasRequiredBezierFunctions = 1;
|
|
6957
6959
|
(function (exports) {
|
|
6958
6960
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6959
|
-
exports.t2length = exports.getQuadraticArcLength = exports.getCubicArcLength = exports.binomialCoefficients = exports.cValues = exports.tValues =
|
|
6961
|
+
exports.t2length = exports.getQuadraticArcLength = exports.getCubicArcLength = exports.binomialCoefficients = exports.cValues = exports.tValues = void 0;
|
|
6960
6962
|
exports.tValues = [
|
|
6961
6963
|
[],
|
|
6962
6964
|
[],
|
|
@@ -7754,7 +7756,7 @@
|
|
|
7754
7756
|
if (hasRequiredPath) return Path;
|
|
7755
7757
|
hasRequiredPath = 1;
|
|
7756
7758
|
Object.defineProperty(Path, "__esModule", { value: true });
|
|
7757
|
-
Path.Path =
|
|
7759
|
+
Path.Path = void 0;
|
|
7758
7760
|
const Factory_1 = requireFactory();
|
|
7759
7761
|
const Shape_1 = requireShape();
|
|
7760
7762
|
const Global_1 = requireGlobal();
|
|
@@ -7937,8 +7939,8 @@
|
|
|
7937
7939
|
return null;
|
|
7938
7940
|
}
|
|
7939
7941
|
static getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX, fromY) {
|
|
7940
|
-
fromX = fromX !== null && fromX !==
|
|
7941
|
-
fromY = fromY !== null && fromY !==
|
|
7942
|
+
fromX = fromX !== null && fromX !== void 0 ? fromX : P1x;
|
|
7943
|
+
fromY = fromY !== null && fromY !== void 0 ? fromY : P1y;
|
|
7942
7944
|
const len = this.getLineLength(P1x, P1y, P2x, P2y);
|
|
7943
7945
|
if (len < 1e-10) {
|
|
7944
7946
|
return { x: P1x, y: P1y };
|
|
@@ -8367,7 +8369,7 @@
|
|
|
8367
8369
|
if (hasRequiredArrow) return Arrow;
|
|
8368
8370
|
hasRequiredArrow = 1;
|
|
8369
8371
|
Object.defineProperty(Arrow, "__esModule", { value: true });
|
|
8370
|
-
Arrow.Arrow =
|
|
8372
|
+
Arrow.Arrow = void 0;
|
|
8371
8373
|
const Factory_1 = requireFactory();
|
|
8372
8374
|
const Line_1 = requireLine();
|
|
8373
8375
|
const Validators_1 = requireValidators();
|
|
@@ -8479,7 +8481,7 @@
|
|
|
8479
8481
|
if (hasRequiredCircle) return Circle;
|
|
8480
8482
|
hasRequiredCircle = 1;
|
|
8481
8483
|
Object.defineProperty(Circle, "__esModule", { value: true });
|
|
8482
|
-
Circle.Circle =
|
|
8484
|
+
Circle.Circle = void 0;
|
|
8483
8485
|
const Factory_1 = requireFactory();
|
|
8484
8486
|
const Shape_1 = requireShape();
|
|
8485
8487
|
const Validators_1 = requireValidators();
|
|
@@ -8525,7 +8527,7 @@
|
|
|
8525
8527
|
if (hasRequiredEllipse) return Ellipse;
|
|
8526
8528
|
hasRequiredEllipse = 1;
|
|
8527
8529
|
Object.defineProperty(Ellipse, "__esModule", { value: true });
|
|
8528
|
-
Ellipse.Ellipse =
|
|
8530
|
+
Ellipse.Ellipse = void 0;
|
|
8529
8531
|
const Factory_1 = requireFactory();
|
|
8530
8532
|
const Shape_1 = requireShape();
|
|
8531
8533
|
const Validators_1 = requireValidators();
|
|
@@ -8575,7 +8577,7 @@
|
|
|
8575
8577
|
if (hasRequiredImage) return Image$1;
|
|
8576
8578
|
hasRequiredImage = 1;
|
|
8577
8579
|
Object.defineProperty(Image$1, "__esModule", { value: true });
|
|
8578
|
-
Image$1.Image =
|
|
8580
|
+
Image$1.Image = void 0;
|
|
8579
8581
|
const Util_1 = requireUtil();
|
|
8580
8582
|
const Factory_1 = requireFactory();
|
|
8581
8583
|
const Shape_1 = requireShape();
|
|
@@ -8584,7 +8586,11 @@
|
|
|
8584
8586
|
class Image extends Shape_1.Shape {
|
|
8585
8587
|
constructor(attrs) {
|
|
8586
8588
|
super(attrs);
|
|
8587
|
-
this.
|
|
8589
|
+
this._loadListener = () => {
|
|
8590
|
+
this._requestDraw();
|
|
8591
|
+
};
|
|
8592
|
+
this.on('imageChange.konva', (props) => {
|
|
8593
|
+
this._removeImageLoad(props.oldVal);
|
|
8588
8594
|
this._setImageLoad();
|
|
8589
8595
|
});
|
|
8590
8596
|
this._setImageLoad();
|
|
@@ -8598,11 +8604,19 @@
|
|
|
8598
8604
|
return;
|
|
8599
8605
|
}
|
|
8600
8606
|
if (image && image['addEventListener']) {
|
|
8601
|
-
image['addEventListener']('load',
|
|
8602
|
-
|
|
8603
|
-
|
|
8607
|
+
image['addEventListener']('load', this._loadListener);
|
|
8608
|
+
}
|
|
8609
|
+
}
|
|
8610
|
+
_removeImageLoad(image) {
|
|
8611
|
+
if (image && image['removeEventListener']) {
|
|
8612
|
+
image['removeEventListener']('load', this._loadListener);
|
|
8604
8613
|
}
|
|
8605
8614
|
}
|
|
8615
|
+
destroy() {
|
|
8616
|
+
this._removeImageLoad(this.image());
|
|
8617
|
+
super.destroy();
|
|
8618
|
+
return this;
|
|
8619
|
+
}
|
|
8606
8620
|
_useBufferCanvas() {
|
|
8607
8621
|
const hasCornerRadius = !!this.cornerRadius();
|
|
8608
8622
|
const hasShadow = this.hasShadow();
|
|
@@ -8666,11 +8680,11 @@
|
|
|
8666
8680
|
}
|
|
8667
8681
|
getWidth() {
|
|
8668
8682
|
var _a, _b;
|
|
8669
|
-
return (_a = this.attrs.width) !== null && _a !==
|
|
8683
|
+
return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.width;
|
|
8670
8684
|
}
|
|
8671
8685
|
getHeight() {
|
|
8672
8686
|
var _a, _b;
|
|
8673
|
-
return (_a = this.attrs.height) !== null && _a !==
|
|
8687
|
+
return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.height;
|
|
8674
8688
|
}
|
|
8675
8689
|
static fromURL(url, callback, onError = null) {
|
|
8676
8690
|
const img = Util_1.Util.createImageElement();
|
|
@@ -8706,7 +8720,7 @@
|
|
|
8706
8720
|
if (hasRequiredLabel) return Label;
|
|
8707
8721
|
hasRequiredLabel = 1;
|
|
8708
8722
|
Object.defineProperty(Label, "__esModule", { value: true });
|
|
8709
|
-
Label.Tag = Label.Label =
|
|
8723
|
+
Label.Tag = Label.Label = void 0;
|
|
8710
8724
|
const Factory_1 = requireFactory();
|
|
8711
8725
|
const Shape_1 = requireShape();
|
|
8712
8726
|
const Group_1 = requireGroup();
|
|
@@ -8893,7 +8907,7 @@
|
|
|
8893
8907
|
if (hasRequiredRect) return Rect;
|
|
8894
8908
|
hasRequiredRect = 1;
|
|
8895
8909
|
Object.defineProperty(Rect, "__esModule", { value: true });
|
|
8896
|
-
Rect.Rect =
|
|
8910
|
+
Rect.Rect = void 0;
|
|
8897
8911
|
const Factory_1 = requireFactory();
|
|
8898
8912
|
const Shape_1 = requireShape();
|
|
8899
8913
|
const Global_1 = requireGlobal();
|
|
@@ -8928,7 +8942,7 @@
|
|
|
8928
8942
|
if (hasRequiredRegularPolygon) return RegularPolygon;
|
|
8929
8943
|
hasRequiredRegularPolygon = 1;
|
|
8930
8944
|
Object.defineProperty(RegularPolygon, "__esModule", { value: true });
|
|
8931
|
-
RegularPolygon.RegularPolygon =
|
|
8945
|
+
RegularPolygon.RegularPolygon = void 0;
|
|
8932
8946
|
const Factory_1 = requireFactory();
|
|
8933
8947
|
const Shape_1 = requireShape();
|
|
8934
8948
|
const Validators_1 = requireValidators();
|
|
@@ -9006,7 +9020,7 @@
|
|
|
9006
9020
|
if (hasRequiredRing) return Ring;
|
|
9007
9021
|
hasRequiredRing = 1;
|
|
9008
9022
|
Object.defineProperty(Ring, "__esModule", { value: true });
|
|
9009
|
-
Ring.Ring =
|
|
9023
|
+
Ring.Ring = void 0;
|
|
9010
9024
|
const Factory_1 = requireFactory();
|
|
9011
9025
|
const Shape_1 = requireShape();
|
|
9012
9026
|
const Validators_1 = requireValidators();
|
|
@@ -9052,7 +9066,7 @@
|
|
|
9052
9066
|
if (hasRequiredSprite) return Sprite$1;
|
|
9053
9067
|
hasRequiredSprite = 1;
|
|
9054
9068
|
Object.defineProperty(Sprite$1, "__esModule", { value: true });
|
|
9055
|
-
Sprite$1.Sprite =
|
|
9069
|
+
Sprite$1.Sprite = void 0;
|
|
9056
9070
|
const Factory_1 = requireFactory();
|
|
9057
9071
|
const Shape_1 = requireShape();
|
|
9058
9072
|
const Animation_1 = requireAnimation();
|
|
@@ -9173,7 +9187,7 @@
|
|
|
9173
9187
|
if (hasRequiredStar) return Star;
|
|
9174
9188
|
hasRequiredStar = 1;
|
|
9175
9189
|
Object.defineProperty(Star, "__esModule", { value: true });
|
|
9176
|
-
Star.Star =
|
|
9190
|
+
Star.Star = void 0;
|
|
9177
9191
|
const Factory_1 = requireFactory();
|
|
9178
9192
|
const Shape_1 = requireShape();
|
|
9179
9193
|
const Validators_1 = requireValidators();
|
|
@@ -9224,7 +9238,7 @@
|
|
|
9224
9238
|
if (hasRequiredText) return Text;
|
|
9225
9239
|
hasRequiredText = 1;
|
|
9226
9240
|
Object.defineProperty(Text, "__esModule", { value: true });
|
|
9227
|
-
Text.Text =
|
|
9241
|
+
Text.Text = void 0;
|
|
9228
9242
|
Text.stringToArray = stringToArray;
|
|
9229
9243
|
const Util_1 = requireUtil();
|
|
9230
9244
|
const Factory_1 = requireFactory();
|
|
@@ -9470,17 +9484,17 @@
|
|
|
9470
9484
|
_context.restore();
|
|
9471
9485
|
const scaleFactor = fontSize / 100;
|
|
9472
9486
|
return {
|
|
9473
|
-
actualBoundingBoxAscent: (_a = metrics.actualBoundingBoxAscent) !== null && _a !==
|
|
9474
|
-
actualBoundingBoxDescent: (_b = metrics.actualBoundingBoxDescent) !== null && _b !==
|
|
9475
|
-
actualBoundingBoxLeft: (_c = metrics.actualBoundingBoxLeft) !== null && _c !==
|
|
9476
|
-
actualBoundingBoxRight: (_d = metrics.actualBoundingBoxRight) !== null && _d !==
|
|
9477
|
-
alphabeticBaseline: (_e = metrics.alphabeticBaseline) !== null && _e !==
|
|
9478
|
-
emHeightAscent: (_f = metrics.emHeightAscent) !== null && _f !==
|
|
9479
|
-
emHeightDescent: (_g = metrics.emHeightDescent) !== null && _g !==
|
|
9480
|
-
fontBoundingBoxAscent: (_h = metrics.fontBoundingBoxAscent) !== null && _h !==
|
|
9481
|
-
fontBoundingBoxDescent: (_j = metrics.fontBoundingBoxDescent) !== null && _j !==
|
|
9482
|
-
hangingBaseline: (_k = metrics.hangingBaseline) !== null && _k !==
|
|
9483
|
-
ideographicBaseline: (_l = metrics.ideographicBaseline) !== null && _l !==
|
|
9487
|
+
actualBoundingBoxAscent: (_a = metrics.actualBoundingBoxAscent) !== null && _a !== void 0 ? _a : 71.58203125 * scaleFactor,
|
|
9488
|
+
actualBoundingBoxDescent: (_b = metrics.actualBoundingBoxDescent) !== null && _b !== void 0 ? _b : 0,
|
|
9489
|
+
actualBoundingBoxLeft: (_c = metrics.actualBoundingBoxLeft) !== null && _c !== void 0 ? _c : -7.421875 * scaleFactor,
|
|
9490
|
+
actualBoundingBoxRight: (_d = metrics.actualBoundingBoxRight) !== null && _d !== void 0 ? _d : 75.732421875 * scaleFactor,
|
|
9491
|
+
alphabeticBaseline: (_e = metrics.alphabeticBaseline) !== null && _e !== void 0 ? _e : 0,
|
|
9492
|
+
emHeightAscent: (_f = metrics.emHeightAscent) !== null && _f !== void 0 ? _f : 100 * scaleFactor,
|
|
9493
|
+
emHeightDescent: (_g = metrics.emHeightDescent) !== null && _g !== void 0 ? _g : -20 * scaleFactor,
|
|
9494
|
+
fontBoundingBoxAscent: (_h = metrics.fontBoundingBoxAscent) !== null && _h !== void 0 ? _h : 91 * scaleFactor,
|
|
9495
|
+
fontBoundingBoxDescent: (_j = metrics.fontBoundingBoxDescent) !== null && _j !== void 0 ? _j : 21 * scaleFactor,
|
|
9496
|
+
hangingBaseline: (_k = metrics.hangingBaseline) !== null && _k !== void 0 ? _k : 72.80000305175781 * scaleFactor,
|
|
9497
|
+
ideographicBaseline: (_l = metrics.ideographicBaseline) !== null && _l !== void 0 ? _l : -21 * scaleFactor,
|
|
9484
9498
|
width: metrics.width,
|
|
9485
9499
|
height: fontSize,
|
|
9486
9500
|
};
|
|
@@ -9524,8 +9538,14 @@
|
|
|
9524
9538
|
while (line.length > 0) {
|
|
9525
9539
|
let low = 0, high = stringToArray(line).length, match = '', matchWidth = 0;
|
|
9526
9540
|
while (low < high) {
|
|
9527
|
-
const mid = (low + high) >>> 1, lineArray = stringToArray(line), substr = lineArray.slice(0, mid + 1).join(''), substrWidth = this._getTextWidth(substr)
|
|
9528
|
-
|
|
9541
|
+
const mid = (low + high) >>> 1, lineArray = stringToArray(line), substr = lineArray.slice(0, mid + 1).join(''), substrWidth = this._getTextWidth(substr);
|
|
9542
|
+
const shouldConsiderEllipsis = shouldAddEllipsis &&
|
|
9543
|
+
fixedHeight &&
|
|
9544
|
+
currentHeightPx + lineHeightPx > maxHeightPx;
|
|
9545
|
+
const effectiveWidth = shouldConsiderEllipsis
|
|
9546
|
+
? substrWidth + additionalWidth
|
|
9547
|
+
: substrWidth;
|
|
9548
|
+
if (effectiveWidth <= maxWidth) {
|
|
9529
9549
|
low = mid + 1;
|
|
9530
9550
|
match = substr;
|
|
9531
9551
|
matchWidth = substrWidth;
|
|
@@ -9672,7 +9692,7 @@
|
|
|
9672
9692
|
if (hasRequiredTextPath) return TextPath;
|
|
9673
9693
|
hasRequiredTextPath = 1;
|
|
9674
9694
|
Object.defineProperty(TextPath, "__esModule", { value: true });
|
|
9675
|
-
TextPath.TextPath =
|
|
9695
|
+
TextPath.TextPath = void 0;
|
|
9676
9696
|
const Util_1 = requireUtil();
|
|
9677
9697
|
const Factory_1 = requireFactory();
|
|
9678
9698
|
const Shape_1 = requireShape();
|
|
@@ -9922,7 +9942,7 @@
|
|
|
9922
9942
|
if (hasRequiredTransformer) return Transformer;
|
|
9923
9943
|
hasRequiredTransformer = 1;
|
|
9924
9944
|
Object.defineProperty(Transformer, "__esModule", { value: true });
|
|
9925
|
-
Transformer.Transformer =
|
|
9945
|
+
Transformer.Transformer = void 0;
|
|
9926
9946
|
const Util_1 = requireUtil();
|
|
9927
9947
|
const Factory_1 = requireFactory();
|
|
9928
9948
|
const Node_1 = requireNode();
|
|
@@ -10119,10 +10139,12 @@
|
|
|
10119
10139
|
this.update();
|
|
10120
10140
|
}
|
|
10121
10141
|
};
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10142
|
+
if (node._attrsAffectingSize.length) {
|
|
10143
|
+
const additionalEvents = node._attrsAffectingSize
|
|
10144
|
+
.map((prop) => prop + 'Change.' + this._getEventNamespace())
|
|
10145
|
+
.join(' ');
|
|
10146
|
+
node.on(additionalEvents, onChange);
|
|
10147
|
+
}
|
|
10126
10148
|
node.on(TRANSFORM_CHANGE_STR.map((e) => e + `.${this._getEventNamespace()}`).join(' '), onChange);
|
|
10127
10149
|
node.on(`absoluteTransformChange.${this._getEventNamespace()}`, onChange);
|
|
10128
10150
|
this._proxyDrag(node);
|
|
@@ -10597,12 +10619,12 @@
|
|
|
10597
10619
|
const node = this.getNode();
|
|
10598
10620
|
activeTransformersCount--;
|
|
10599
10621
|
this._fire('transformend', { evt: e, target: node });
|
|
10600
|
-
(_a = this.getLayer()) === null || _a ===
|
|
10622
|
+
(_a = this.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
|
|
10601
10623
|
if (node) {
|
|
10602
10624
|
this._nodes.forEach((target) => {
|
|
10603
10625
|
var _a;
|
|
10604
10626
|
target._fire('transformend', { evt: e, target });
|
|
10605
|
-
(_a = target.getLayer()) === null || _a ===
|
|
10627
|
+
(_a = target.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
|
|
10606
10628
|
});
|
|
10607
10629
|
}
|
|
10608
10630
|
this._movingAnchorName = null;
|
|
@@ -10715,7 +10737,7 @@
|
|
|
10715
10737
|
.multiply(localTransform);
|
|
10716
10738
|
const attrs = newLocalTransform.decompose();
|
|
10717
10739
|
node.setAttrs(attrs);
|
|
10718
|
-
(_a = node.getLayer()) === null || _a ===
|
|
10740
|
+
(_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
|
|
10719
10741
|
});
|
|
10720
10742
|
this.rotation(Util_1.Util._getRotation(newAttrs.rotation));
|
|
10721
10743
|
this._nodes.forEach((node) => {
|
|
@@ -10830,7 +10852,7 @@
|
|
|
10830
10852
|
styleFunc(node);
|
|
10831
10853
|
});
|
|
10832
10854
|
}
|
|
10833
|
-
(_a = this.getLayer()) === null || _a ===
|
|
10855
|
+
(_a = this.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
|
|
10834
10856
|
}
|
|
10835
10857
|
isTransforming() {
|
|
10836
10858
|
return this._transforming;
|
|
@@ -10937,7 +10959,7 @@
|
|
|
10937
10959
|
if (hasRequiredWedge) return Wedge;
|
|
10938
10960
|
hasRequiredWedge = 1;
|
|
10939
10961
|
Object.defineProperty(Wedge, "__esModule", { value: true });
|
|
10940
|
-
Wedge.Wedge =
|
|
10962
|
+
Wedge.Wedge = void 0;
|
|
10941
10963
|
const Factory_1 = requireFactory();
|
|
10942
10964
|
const Shape_1 = requireShape();
|
|
10943
10965
|
const Global_1 = requireGlobal();
|
|
@@ -10988,7 +11010,7 @@
|
|
|
10988
11010
|
if (hasRequiredBlur) return Blur;
|
|
10989
11011
|
hasRequiredBlur = 1;
|
|
10990
11012
|
Object.defineProperty(Blur, "__esModule", { value: true });
|
|
10991
|
-
Blur.Blur =
|
|
11013
|
+
Blur.Blur = void 0;
|
|
10992
11014
|
const Factory_1 = requireFactory();
|
|
10993
11015
|
const Node_1 = requireNode();
|
|
10994
11016
|
const Validators_1 = requireValidators();
|
|
@@ -11236,7 +11258,7 @@
|
|
|
11236
11258
|
if (hasRequiredBrighten) return Brighten;
|
|
11237
11259
|
hasRequiredBrighten = 1;
|
|
11238
11260
|
Object.defineProperty(Brighten, "__esModule", { value: true });
|
|
11239
|
-
Brighten.Brighten =
|
|
11261
|
+
Brighten.Brighten = void 0;
|
|
11240
11262
|
const Factory_1 = requireFactory();
|
|
11241
11263
|
const Node_1 = requireNode();
|
|
11242
11264
|
const Validators_1 = requireValidators();
|
|
@@ -11261,7 +11283,7 @@
|
|
|
11261
11283
|
if (hasRequiredContrast) return Contrast;
|
|
11262
11284
|
hasRequiredContrast = 1;
|
|
11263
11285
|
Object.defineProperty(Contrast, "__esModule", { value: true });
|
|
11264
|
-
Contrast.Contrast =
|
|
11286
|
+
Contrast.Contrast = void 0;
|
|
11265
11287
|
const Factory_1 = requireFactory();
|
|
11266
11288
|
const Node_1 = requireNode();
|
|
11267
11289
|
const Validators_1 = requireValidators();
|
|
@@ -11309,7 +11331,7 @@
|
|
|
11309
11331
|
if (hasRequiredEmboss) return Emboss;
|
|
11310
11332
|
hasRequiredEmboss = 1;
|
|
11311
11333
|
Object.defineProperty(Emboss, "__esModule", { value: true });
|
|
11312
|
-
Emboss.Emboss =
|
|
11334
|
+
Emboss.Emboss = void 0;
|
|
11313
11335
|
const Factory_1 = requireFactory();
|
|
11314
11336
|
const Node_1 = requireNode();
|
|
11315
11337
|
const Util_1 = requireUtil();
|
|
@@ -11425,7 +11447,7 @@
|
|
|
11425
11447
|
if (hasRequiredEnhance) return Enhance;
|
|
11426
11448
|
hasRequiredEnhance = 1;
|
|
11427
11449
|
Object.defineProperty(Enhance, "__esModule", { value: true });
|
|
11428
|
-
Enhance.Enhance =
|
|
11450
|
+
Enhance.Enhance = void 0;
|
|
11429
11451
|
const Factory_1 = requireFactory();
|
|
11430
11452
|
const Node_1 = requireNode();
|
|
11431
11453
|
const Validators_1 = requireValidators();
|
|
@@ -11522,7 +11544,7 @@
|
|
|
11522
11544
|
if (hasRequiredGrayscale) return Grayscale;
|
|
11523
11545
|
hasRequiredGrayscale = 1;
|
|
11524
11546
|
Object.defineProperty(Grayscale, "__esModule", { value: true });
|
|
11525
|
-
Grayscale.Grayscale =
|
|
11547
|
+
Grayscale.Grayscale = void 0;
|
|
11526
11548
|
const Grayscale$1 = function (imageData) {
|
|
11527
11549
|
const data = imageData.data, len = data.length;
|
|
11528
11550
|
for (let i = 0; i < len; i += 4) {
|
|
@@ -11544,7 +11566,7 @@
|
|
|
11544
11566
|
if (hasRequiredHSL) return HSL;
|
|
11545
11567
|
hasRequiredHSL = 1;
|
|
11546
11568
|
Object.defineProperty(HSL, "__esModule", { value: true });
|
|
11547
|
-
HSL.HSL =
|
|
11569
|
+
HSL.HSL = void 0;
|
|
11548
11570
|
const Factory_1 = requireFactory();
|
|
11549
11571
|
const Node_1 = requireNode();
|
|
11550
11572
|
const Validators_1 = requireValidators();
|
|
@@ -11581,7 +11603,7 @@
|
|
|
11581
11603
|
if (hasRequiredHSV) return HSV;
|
|
11582
11604
|
hasRequiredHSV = 1;
|
|
11583
11605
|
Object.defineProperty(HSV, "__esModule", { value: true });
|
|
11584
|
-
HSV.HSV =
|
|
11606
|
+
HSV.HSV = void 0;
|
|
11585
11607
|
const Factory_1 = requireFactory();
|
|
11586
11608
|
const Node_1 = requireNode();
|
|
11587
11609
|
const Validators_1 = requireValidators();
|
|
@@ -11618,7 +11640,7 @@
|
|
|
11618
11640
|
if (hasRequiredInvert) return Invert;
|
|
11619
11641
|
hasRequiredInvert = 1;
|
|
11620
11642
|
Object.defineProperty(Invert, "__esModule", { value: true });
|
|
11621
|
-
Invert.Invert =
|
|
11643
|
+
Invert.Invert = void 0;
|
|
11622
11644
|
const Invert$1 = function (imageData) {
|
|
11623
11645
|
const data = imageData.data, len = data.length;
|
|
11624
11646
|
for (let i = 0; i < len; i += 4) {
|
|
@@ -11639,7 +11661,7 @@
|
|
|
11639
11661
|
if (hasRequiredKaleidoscope) return Kaleidoscope;
|
|
11640
11662
|
hasRequiredKaleidoscope = 1;
|
|
11641
11663
|
Object.defineProperty(Kaleidoscope, "__esModule", { value: true });
|
|
11642
|
-
Kaleidoscope.Kaleidoscope =
|
|
11664
|
+
Kaleidoscope.Kaleidoscope = void 0;
|
|
11643
11665
|
const Factory_1 = requireFactory();
|
|
11644
11666
|
const Node_1 = requireNode();
|
|
11645
11667
|
const Util_1 = requireUtil();
|
|
@@ -11785,7 +11807,7 @@
|
|
|
11785
11807
|
if (hasRequiredMask) return Mask;
|
|
11786
11808
|
hasRequiredMask = 1;
|
|
11787
11809
|
Object.defineProperty(Mask, "__esModule", { value: true });
|
|
11788
|
-
Mask.Mask =
|
|
11810
|
+
Mask.Mask = void 0;
|
|
11789
11811
|
const Factory_1 = requireFactory();
|
|
11790
11812
|
const Node_1 = requireNode();
|
|
11791
11813
|
const Validators_1 = requireValidators();
|
|
@@ -11939,7 +11961,7 @@
|
|
|
11939
11961
|
if (hasRequiredNoise) return Noise;
|
|
11940
11962
|
hasRequiredNoise = 1;
|
|
11941
11963
|
Object.defineProperty(Noise, "__esModule", { value: true });
|
|
11942
|
-
Noise.Noise =
|
|
11964
|
+
Noise.Noise = void 0;
|
|
11943
11965
|
const Factory_1 = requireFactory();
|
|
11944
11966
|
const Node_1 = requireNode();
|
|
11945
11967
|
const Validators_1 = requireValidators();
|
|
@@ -11964,7 +11986,7 @@
|
|
|
11964
11986
|
if (hasRequiredPixelate) return Pixelate;
|
|
11965
11987
|
hasRequiredPixelate = 1;
|
|
11966
11988
|
Object.defineProperty(Pixelate, "__esModule", { value: true });
|
|
11967
|
-
Pixelate.Pixelate =
|
|
11989
|
+
Pixelate.Pixelate = void 0;
|
|
11968
11990
|
const Factory_1 = requireFactory();
|
|
11969
11991
|
const Util_1 = requireUtil();
|
|
11970
11992
|
const Node_1 = requireNode();
|
|
@@ -12037,7 +12059,7 @@
|
|
|
12037
12059
|
if (hasRequiredPosterize) return Posterize;
|
|
12038
12060
|
hasRequiredPosterize = 1;
|
|
12039
12061
|
Object.defineProperty(Posterize, "__esModule", { value: true });
|
|
12040
|
-
Posterize.Posterize =
|
|
12062
|
+
Posterize.Posterize = void 0;
|
|
12041
12063
|
const Factory_1 = requireFactory();
|
|
12042
12064
|
const Node_1 = requireNode();
|
|
12043
12065
|
const Validators_1 = requireValidators();
|
|
@@ -12060,7 +12082,7 @@
|
|
|
12060
12082
|
if (hasRequiredRGB) return RGB;
|
|
12061
12083
|
hasRequiredRGB = 1;
|
|
12062
12084
|
Object.defineProperty(RGB, "__esModule", { value: true });
|
|
12063
|
-
RGB.RGB =
|
|
12085
|
+
RGB.RGB = void 0;
|
|
12064
12086
|
const Factory_1 = requireFactory();
|
|
12065
12087
|
const Node_1 = requireNode();
|
|
12066
12088
|
const Validators_1 = requireValidators();
|
|
@@ -12111,7 +12133,7 @@
|
|
|
12111
12133
|
if (hasRequiredRGBA) return RGBA;
|
|
12112
12134
|
hasRequiredRGBA = 1;
|
|
12113
12135
|
Object.defineProperty(RGBA, "__esModule", { value: true });
|
|
12114
|
-
RGBA.RGBA =
|
|
12136
|
+
RGBA.RGBA = void 0;
|
|
12115
12137
|
const Factory_1 = requireFactory();
|
|
12116
12138
|
const Node_1 = requireNode();
|
|
12117
12139
|
const Validators_1 = requireValidators();
|
|
@@ -12173,7 +12195,7 @@
|
|
|
12173
12195
|
if (hasRequiredSepia) return Sepia;
|
|
12174
12196
|
hasRequiredSepia = 1;
|
|
12175
12197
|
Object.defineProperty(Sepia, "__esModule", { value: true });
|
|
12176
|
-
Sepia.Sepia =
|
|
12198
|
+
Sepia.Sepia = void 0;
|
|
12177
12199
|
const Sepia$1 = function (imageData) {
|
|
12178
12200
|
const data = imageData.data, nPixels = data.length;
|
|
12179
12201
|
for (let i = 0; i < nPixels; i += 4) {
|
|
@@ -12197,7 +12219,7 @@
|
|
|
12197
12219
|
if (hasRequiredSolarize) return Solarize;
|
|
12198
12220
|
hasRequiredSolarize = 1;
|
|
12199
12221
|
Object.defineProperty(Solarize, "__esModule", { value: true });
|
|
12200
|
-
Solarize.Solarize =
|
|
12222
|
+
Solarize.Solarize = void 0;
|
|
12201
12223
|
const Solarize$1 = function (imageData) {
|
|
12202
12224
|
const data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4;
|
|
12203
12225
|
let y = h;
|
|
@@ -12236,7 +12258,7 @@
|
|
|
12236
12258
|
if (hasRequiredThreshold) return Threshold;
|
|
12237
12259
|
hasRequiredThreshold = 1;
|
|
12238
12260
|
Object.defineProperty(Threshold, "__esModule", { value: true });
|
|
12239
|
-
Threshold.Threshold =
|
|
12261
|
+
Threshold.Threshold = void 0;
|
|
12240
12262
|
const Factory_1 = requireFactory();
|
|
12241
12263
|
const Node_1 = requireNode();
|
|
12242
12264
|
const Validators_1 = requireValidators();
|
|
@@ -12257,7 +12279,7 @@
|
|
|
12257
12279
|
if (hasRequired_FullInternals) return _FullInternals;
|
|
12258
12280
|
hasRequired_FullInternals = 1;
|
|
12259
12281
|
Object.defineProperty(_FullInternals, "__esModule", { value: true });
|
|
12260
|
-
_FullInternals.Konva =
|
|
12282
|
+
_FullInternals.Konva = void 0;
|
|
12261
12283
|
const _CoreInternals_1 = require_CoreInternals();
|
|
12262
12284
|
const Arc_1 = requireArc();
|
|
12263
12285
|
const Arrow_1 = requireArrow();
|
|
@@ -12418,8 +12440,8 @@
|
|
|
12418
12440
|
}
|
|
12419
12441
|
if (!params) params = {};
|
|
12420
12442
|
if (!params.points) params.points = [ {
|
|
12421
|
-
x:
|
|
12422
|
-
y:
|
|
12443
|
+
x: 0,
|
|
12444
|
+
y: 0
|
|
12423
12445
|
}, {
|
|
12424
12446
|
x: 100,
|
|
12425
12447
|
y: 100
|
|
@@ -12427,8 +12449,8 @@
|
|
|
12427
12449
|
const konvaPoints = [];
|
|
12428
12450
|
params.points.forEach((point => konvaPoints.push(point.x, point.y)));
|
|
12429
12451
|
this._ref = new Konva.Line({
|
|
12430
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
12431
|
-
strokeWidth: (_b = params.width) !== null && _b !==
|
|
12452
|
+
stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
|
|
12453
|
+
strokeWidth: (_b = params.width) !== null && _b !== void 0 ? _b : 4,
|
|
12432
12454
|
globalCompositeOperation: "source-over",
|
|
12433
12455
|
lineCap: "round",
|
|
12434
12456
|
lineJoin: "round",
|
|
@@ -12527,20 +12549,20 @@
|
|
|
12527
12549
|
}
|
|
12528
12550
|
if (!params) params = {};
|
|
12529
12551
|
if (!params.position) params.position = {
|
|
12530
|
-
x:
|
|
12531
|
-
y:
|
|
12552
|
+
x: 0,
|
|
12553
|
+
y: 0
|
|
12532
12554
|
};
|
|
12533
12555
|
if (!params.text) params.text = "default";
|
|
12534
12556
|
this._ref = new Konva.Text({
|
|
12535
12557
|
x: params.position.x,
|
|
12536
12558
|
y: params.position.y,
|
|
12537
12559
|
text: params.text,
|
|
12538
|
-
fontSize: (_a = params.fontSize) !== null && _a !==
|
|
12560
|
+
fontSize: (_a = params.fontSize) !== null && _a !== void 0 ? _a : 34,
|
|
12539
12561
|
fontFamily: this.TEXT_FONT_FAMILY,
|
|
12540
|
-
fill: (_b = params.color) !== null && _b !==
|
|
12562
|
+
fill: (_b = params.color) !== null && _b !== void 0 ? _b : "#ff0000",
|
|
12541
12563
|
align: "left",
|
|
12542
12564
|
draggable: true,
|
|
12543
|
-
rotation: (_c = params.rotation) !== null && _c !==
|
|
12565
|
+
rotation: (_c = params.rotation) !== null && _c !== void 0 ? _c : 0
|
|
12544
12566
|
});
|
|
12545
12567
|
this._ref.width(this._ref.getTextWidth());
|
|
12546
12568
|
this._ref.on("transform", (e => {
|
|
@@ -12634,19 +12656,19 @@
|
|
|
12634
12656
|
}
|
|
12635
12657
|
if (!params) params = {};
|
|
12636
12658
|
if (!params.position) params.position = {
|
|
12637
|
-
x:
|
|
12638
|
-
y:
|
|
12659
|
+
x: 0,
|
|
12660
|
+
y: 0
|
|
12639
12661
|
};
|
|
12640
12662
|
this._ref = new Konva.Rect({
|
|
12641
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
12642
|
-
strokeWidth: (_b = params.lineWidth) !== null && _b !==
|
|
12663
|
+
stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
|
|
12664
|
+
strokeWidth: (_b = params.lineWidth) !== null && _b !== void 0 ? _b : 4,
|
|
12643
12665
|
globalCompositeOperation: "source-over",
|
|
12644
12666
|
lineCap: "round",
|
|
12645
12667
|
lineJoin: "round",
|
|
12646
12668
|
x: params.position.x,
|
|
12647
12669
|
y: params.position.y,
|
|
12648
|
-
width: (_c = params.width) !== null && _c !==
|
|
12649
|
-
height: (_d = params.height) !== null && _d !==
|
|
12670
|
+
width: (_c = params.width) !== null && _c !== void 0 ? _c : 200,
|
|
12671
|
+
height: (_d = params.height) !== null && _d !== void 0 ? _d : 200,
|
|
12650
12672
|
draggable: true,
|
|
12651
12673
|
strokeScaleEnabled: false
|
|
12652
12674
|
});
|
|
@@ -12748,16 +12770,16 @@
|
|
|
12748
12770
|
}
|
|
12749
12771
|
if (!params) params = {};
|
|
12750
12772
|
if (!params.position) params.position = {
|
|
12751
|
-
x:
|
|
12752
|
-
y:
|
|
12773
|
+
x: 0,
|
|
12774
|
+
y: 0
|
|
12753
12775
|
};
|
|
12754
12776
|
if (!params.radius) params.radius = {
|
|
12755
12777
|
x: 25,
|
|
12756
12778
|
y: 25
|
|
12757
12779
|
};
|
|
12758
12780
|
this._ref = new Konva.Ellipse({
|
|
12759
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
12760
|
-
strokeWidth: (_b = params.lineWidth) !== null && _b !==
|
|
12781
|
+
stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
|
|
12782
|
+
strokeWidth: (_b = params.lineWidth) !== null && _b !== void 0 ? _b : 4,
|
|
12761
12783
|
globalCompositeOperation: "source-over",
|
|
12762
12784
|
lineCap: "round",
|
|
12763
12785
|
lineJoin: "round",
|
|
@@ -12878,16 +12900,16 @@
|
|
|
12878
12900
|
}
|
|
12879
12901
|
if (!params) params = {};
|
|
12880
12902
|
if (!params.start) params.start = {
|
|
12881
|
-
x:
|
|
12882
|
-
y:
|
|
12903
|
+
x: 0,
|
|
12904
|
+
y: 0
|
|
12883
12905
|
};
|
|
12884
12906
|
if (!params.end) params.end = {
|
|
12885
12907
|
x: 100,
|
|
12886
12908
|
y: 100
|
|
12887
12909
|
};
|
|
12888
12910
|
this._ref = new Konva.Arrow({
|
|
12889
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
12890
|
-
fill: (_b = params.color) !== null && _b !==
|
|
12911
|
+
stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
|
|
12912
|
+
fill: (_b = params.color) !== null && _b !== void 0 ? _b : "#ff0000",
|
|
12891
12913
|
strokeWidth: 4,
|
|
12892
12914
|
globalCompositeOperation: "source-over",
|
|
12893
12915
|
lineCap: "round",
|
|
@@ -12994,8 +13016,8 @@
|
|
|
12994
13016
|
}
|
|
12995
13017
|
if (!params) params = {};
|
|
12996
13018
|
if (!params.position) params.position = {
|
|
12997
|
-
x:
|
|
12998
|
-
y:
|
|
13019
|
+
x: 0,
|
|
13020
|
+
y: 0
|
|
12999
13021
|
};
|
|
13000
13022
|
if (!params.src || !params.src.startsWith(this.BASE64_HEADER_START)) params.src = this.BASE64_NOT_FOUND;
|
|
13001
13023
|
this._canvasImage = new Image;
|
|
@@ -13027,8 +13049,8 @@
|
|
|
13027
13049
|
x: params.position.x,
|
|
13028
13050
|
y: params.position.y,
|
|
13029
13051
|
image: this._canvasImage,
|
|
13030
|
-
width: (_a = params.width) !== null && _a !==
|
|
13031
|
-
height: (_b = params.height) !== null && _b !==
|
|
13052
|
+
width: (_a = params.width) !== null && _a !== void 0 ? _a : 0,
|
|
13053
|
+
height: (_b = params.height) !== null && _b !== void 0 ? _b : 0,
|
|
13032
13054
|
draggable: true
|
|
13033
13055
|
});
|
|
13034
13056
|
this._ref.on("transform", (e => {
|
|
@@ -13131,17 +13153,17 @@
|
|
|
13131
13153
|
}
|
|
13132
13154
|
if (!params) params = {};
|
|
13133
13155
|
if (!params.position) params.position = {
|
|
13134
|
-
x:
|
|
13135
|
-
y:
|
|
13156
|
+
x: 0,
|
|
13157
|
+
y: 0
|
|
13136
13158
|
};
|
|
13137
13159
|
const arcRadius = 16;
|
|
13138
13160
|
this._ref = new Konva.Shape({
|
|
13139
13161
|
x: params.position.x,
|
|
13140
13162
|
y: params.position.y,
|
|
13141
|
-
width: (_a = params.width) !== null && _a !==
|
|
13142
|
-
height: (_b = params.height) !== null && _b !==
|
|
13143
|
-
stroke: (_c = params.color) !== null && _c !==
|
|
13144
|
-
strokeWidth: (_d = params.lineWidth) !== null && _d !==
|
|
13163
|
+
width: (_a = params.width) !== null && _a !== void 0 ? _a : 200,
|
|
13164
|
+
height: (_b = params.height) !== null && _b !== void 0 ? _b : 200,
|
|
13165
|
+
stroke: (_c = params.color) !== null && _c !== void 0 ? _c : "#ff0000",
|
|
13166
|
+
strokeWidth: (_d = params.lineWidth) !== null && _d !== void 0 ? _d : 4,
|
|
13145
13167
|
draggable: true,
|
|
13146
13168
|
strokeScaleEnabled: false,
|
|
13147
13169
|
globalCompositeOperation: "source-over",
|
|
@@ -13390,9 +13412,9 @@
|
|
|
13390
13412
|
initialize(container, containerEvents, viewer, worldTransformer) {
|
|
13391
13413
|
if (!Konva) throw new Error('Markup error: Konva is not initialized. Forgot to add <script src="https://unpkg.com/konva@9/konva.min.js"><\/script> to your page?');
|
|
13392
13414
|
this._viewer = viewer;
|
|
13393
|
-
this._worldTransformer = worldTransformer !== null && worldTransformer !==
|
|
13415
|
+
this._worldTransformer = worldTransformer !== null && worldTransformer !== void 0 ? worldTransformer : new WorldTransform;
|
|
13394
13416
|
this._container = container;
|
|
13395
|
-
this._containerEvents = containerEvents !== null && containerEvents !==
|
|
13417
|
+
this._containerEvents = containerEvents !== null && containerEvents !== void 0 ? containerEvents : [];
|
|
13396
13418
|
this._markupContainer = document.createElement("div");
|
|
13397
13419
|
this._markupContainer.id = "markup-container";
|
|
13398
13420
|
this._markupContainer.style.position = "absolute";
|
|
@@ -13420,9 +13442,9 @@
|
|
|
13420
13442
|
this._viewer.removeEventListener("changeactivedragger", this.changeActiveDragger);
|
|
13421
13443
|
}
|
|
13422
13444
|
this.destroyKonva();
|
|
13423
|
-
(_a = this._resizeObserver) === null || _a ===
|
|
13445
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
13424
13446
|
this._resizeObserver = undefined;
|
|
13425
|
-
(_b = this._markupContainer) === null || _b ===
|
|
13447
|
+
(_b = this._markupContainer) === null || _b === void 0 ? void 0 : _b.remove();
|
|
13426
13448
|
this._markupContainer = undefined;
|
|
13427
13449
|
this._container = undefined;
|
|
13428
13450
|
this._viewer = undefined;
|
|
@@ -13454,14 +13476,14 @@
|
|
|
13454
13476
|
const hexColor = new MarkupColor(r, g, b).asHex();
|
|
13455
13477
|
this.getObjects().filter((obj => {
|
|
13456
13478
|
var _a;
|
|
13457
|
-
return (_a = obj.setColor) === null || _a ===
|
|
13479
|
+
return (_a = obj.setColor) === null || _a === void 0 ? void 0 : _a.call(obj, hexColor);
|
|
13458
13480
|
}));
|
|
13459
13481
|
}
|
|
13460
13482
|
colorizeSelectedMarkups(r, g, b) {
|
|
13461
13483
|
const hexColor = new MarkupColor(r, g, b).asHex();
|
|
13462
13484
|
this.getSelectedObjects().filter((obj => {
|
|
13463
13485
|
var _a;
|
|
13464
|
-
return (_a = obj.setColor) === null || _a ===
|
|
13486
|
+
return (_a = obj.setColor) === null || _a === void 0 ? void 0 : _a.call(obj, hexColor);
|
|
13465
13487
|
}));
|
|
13466
13488
|
}
|
|
13467
13489
|
setViewpoint(viewpoint) {
|
|
@@ -13477,13 +13499,13 @@
|
|
|
13477
13499
|
x: 0,
|
|
13478
13500
|
y: 0
|
|
13479
13501
|
});
|
|
13480
|
-
const markupColor = ((_a = viewpoint.custom_fields) === null || _a ===
|
|
13502
|
+
const markupColor = ((_a = viewpoint.custom_fields) === null || _a === void 0 ? void 0 : _a.markup_color) || {
|
|
13481
13503
|
r: 255,
|
|
13482
13504
|
g: 0,
|
|
13483
13505
|
b: 0
|
|
13484
13506
|
};
|
|
13485
13507
|
this.setMarkupColor(markupColor.r, markupColor.g, markupColor.b);
|
|
13486
|
-
(_b = viewpoint.lines) === null || _b ===
|
|
13508
|
+
(_b = viewpoint.lines) === null || _b === void 0 ? void 0 : _b.forEach((line => {
|
|
13487
13509
|
const linePoints = [];
|
|
13488
13510
|
line.points.forEach((point => {
|
|
13489
13511
|
const screenPoint = this._worldTransformer.worldToScreen(point);
|
|
@@ -13492,28 +13514,28 @@
|
|
|
13492
13514
|
}));
|
|
13493
13515
|
this.addLine(linePoints, line.color, line.type, line.width, line.id);
|
|
13494
13516
|
}));
|
|
13495
|
-
(_c = viewpoint.texts) === null || _c ===
|
|
13517
|
+
(_c = viewpoint.texts) === null || _c === void 0 ? void 0 : _c.forEach((text => {
|
|
13496
13518
|
const screenPoint = this._worldTransformer.worldToScreen(text.position);
|
|
13497
13519
|
this.addText(text.text, screenPoint, text.angle, text.color, text.text_size, text.font_size, text.id);
|
|
13498
13520
|
}));
|
|
13499
|
-
(_d = viewpoint.rectangles) === null || _d ===
|
|
13521
|
+
(_d = viewpoint.rectangles) === null || _d === void 0 ? void 0 : _d.forEach((rect => {
|
|
13500
13522
|
const screenPoint = this._worldTransformer.worldToScreen(rect.position);
|
|
13501
13523
|
this.addRectangle(screenPoint, rect.width, rect.height, rect.line_width, rect.color, rect.id);
|
|
13502
13524
|
}));
|
|
13503
|
-
(_e = viewpoint.ellipses) === null || _e ===
|
|
13525
|
+
(_e = viewpoint.ellipses) === null || _e === void 0 ? void 0 : _e.forEach((ellipse => {
|
|
13504
13526
|
const screenPoint = this._worldTransformer.worldToScreen(ellipse.position);
|
|
13505
13527
|
this.addEllipse(screenPoint, ellipse.radius, ellipse.line_width, ellipse.color, ellipse.id);
|
|
13506
13528
|
}));
|
|
13507
|
-
(_f = viewpoint.arrows) === null || _f ===
|
|
13529
|
+
(_f = viewpoint.arrows) === null || _f === void 0 ? void 0 : _f.forEach((arrow => {
|
|
13508
13530
|
const startPoint = this._worldTransformer.worldToScreen(arrow.start);
|
|
13509
13531
|
const endPoint = this._worldTransformer.worldToScreen(arrow.end);
|
|
13510
13532
|
this.addArrow(startPoint, endPoint, arrow.color, arrow.id);
|
|
13511
13533
|
}));
|
|
13512
|
-
(_g = viewpoint.clouds) === null || _g ===
|
|
13534
|
+
(_g = viewpoint.clouds) === null || _g === void 0 ? void 0 : _g.forEach((cloud => {
|
|
13513
13535
|
const screenPoint = this._worldTransformer.worldToScreen(cloud.position);
|
|
13514
13536
|
this.addCloud(screenPoint, cloud.width, cloud.height, cloud.line_width, cloud.color, cloud.id);
|
|
13515
13537
|
}));
|
|
13516
|
-
(_h = viewpoint.images) === null || _h ===
|
|
13538
|
+
(_h = viewpoint.images) === null || _h === void 0 ? void 0 : _h.forEach((image => {
|
|
13517
13539
|
const screenPoint = this._worldTransformer.worldToScreen(image.position);
|
|
13518
13540
|
this.addImage(screenPoint, image.src, image.width, image.height, image.id);
|
|
13519
13541
|
}));
|
|
@@ -13807,7 +13829,7 @@
|
|
|
13807
13829
|
this.removeTextInput();
|
|
13808
13830
|
this.removeImageInput();
|
|
13809
13831
|
this.clearOverlay();
|
|
13810
|
-
(_a = this._konvaStage) === null || _a ===
|
|
13832
|
+
(_a = this._konvaStage) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
13811
13833
|
this._groupImages = undefined;
|
|
13812
13834
|
this._groupGeometry = undefined;
|
|
13813
13835
|
this._groupTexts = undefined;
|
|
@@ -14057,7 +14079,7 @@
|
|
|
14057
14079
|
}
|
|
14058
14080
|
removeTextInput() {
|
|
14059
14081
|
var _a;
|
|
14060
|
-
(_a = this._textInputRef) === null || _a ===
|
|
14082
|
+
(_a = this._textInputRef) === null || _a === void 0 ? void 0 : _a.remove();
|
|
14061
14083
|
this._textInputRef = null;
|
|
14062
14084
|
this._textInputPos = null;
|
|
14063
14085
|
this._textInputAngle = 0;
|
|
@@ -14100,14 +14122,14 @@
|
|
|
14100
14122
|
}
|
|
14101
14123
|
removeImageInput() {
|
|
14102
14124
|
var _a;
|
|
14103
|
-
(_a = this._imageInputRef) === null || _a ===
|
|
14125
|
+
(_a = this._imageInputRef) === null || _a === void 0 ? void 0 : _a.remove();
|
|
14104
14126
|
this._imageInputRef = null;
|
|
14105
14127
|
this._imageInputPos = null;
|
|
14106
14128
|
}
|
|
14107
14129
|
addText(text, position, angle, color, textSize, fontSize, id) {
|
|
14108
14130
|
var _a;
|
|
14109
14131
|
if (!text) return;
|
|
14110
|
-
(_a = this.getSelectedObjects().at(0)) === null || _a ===
|
|
14132
|
+
(_a = this.getSelectedObjects().at(0)) === null || _a === void 0 ? void 0 : _a.delete();
|
|
14111
14133
|
this.clearSelected();
|
|
14112
14134
|
this.removeTextInput();
|
|
14113
14135
|
const tolerance = 1e-6;
|
|
@@ -14182,7 +14204,7 @@
|
|
|
14182
14204
|
addImage(position, src, width, height, id) {
|
|
14183
14205
|
var _a;
|
|
14184
14206
|
if (!position || !src) return;
|
|
14185
|
-
(_a = this.getSelectedObjects().at(0)) === null || _a ===
|
|
14207
|
+
(_a = this.getSelectedObjects().at(0)) === null || _a === void 0 ? void 0 : _a.delete();
|
|
14186
14208
|
this.clearSelected();
|
|
14187
14209
|
this.removeImageInput();
|
|
14188
14210
|
const konvaImage = new KonvaImage({
|
|
@@ -54578,7 +54600,7 @@ void main() {
|
|
|
54578
54600
|
}
|
|
54579
54601
|
|
|
54580
54602
|
///////////////////////////////////////////////////////////////////////////////
|
|
54581
|
-
// Copyright (C) 2002-
|
|
54603
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
54582
54604
|
// All rights reserved.
|
|
54583
54605
|
//
|
|
54584
54606
|
// This software and its documentation and related materials are owned by
|
|
@@ -54593,7 +54615,7 @@ void main() {
|
|
|
54593
54615
|
//
|
|
54594
54616
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
54595
54617
|
// license agreement with Open Design Alliance.
|
|
54596
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
54618
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
54597
54619
|
// All rights reserved.
|
|
54598
54620
|
//
|
|
54599
54621
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55646,7 +55668,7 @@ void main() {
|
|
|
55646
55668
|
}
|
|
55647
55669
|
|
|
55648
55670
|
///////////////////////////////////////////////////////////////////////////////
|
|
55649
|
-
// Copyright (C) 2002-
|
|
55671
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55650
55672
|
// All rights reserved.
|
|
55651
55673
|
//
|
|
55652
55674
|
// This software and its documentation and related materials are owned by
|
|
@@ -55661,7 +55683,7 @@ void main() {
|
|
|
55661
55683
|
//
|
|
55662
55684
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55663
55685
|
// license agreement with Open Design Alliance.
|
|
55664
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55686
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55665
55687
|
// All rights reserved.
|
|
55666
55688
|
//
|
|
55667
55689
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55740,7 +55762,7 @@ void main() {
|
|
|
55740
55762
|
}
|
|
55741
55763
|
|
|
55742
55764
|
///////////////////////////////////////////////////////////////////////////////
|
|
55743
|
-
// Copyright (C) 2002-
|
|
55765
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55744
55766
|
// All rights reserved.
|
|
55745
55767
|
//
|
|
55746
55768
|
// This software and its documentation and related materials are owned by
|
|
@@ -55755,7 +55777,7 @@ void main() {
|
|
|
55755
55777
|
//
|
|
55756
55778
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55757
55779
|
// license agreement with Open Design Alliance.
|
|
55758
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55780
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55759
55781
|
// All rights reserved.
|
|
55760
55782
|
//
|
|
55761
55783
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55822,7 +55844,7 @@ void main() {
|
|
|
55822
55844
|
}
|
|
55823
55845
|
|
|
55824
55846
|
///////////////////////////////////////////////////////////////////////////////
|
|
55825
|
-
// Copyright (C) 2002-
|
|
55847
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55826
55848
|
// All rights reserved.
|
|
55827
55849
|
//
|
|
55828
55850
|
// This software and its documentation and related materials are owned by
|
|
@@ -55837,7 +55859,7 @@ void main() {
|
|
|
55837
55859
|
//
|
|
55838
55860
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55839
55861
|
// license agreement with Open Design Alliance.
|
|
55840
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55862
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55841
55863
|
// All rights reserved.
|
|
55842
55864
|
//
|
|
55843
55865
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55850,7 +55872,7 @@ void main() {
|
|
|
55850
55872
|
}
|
|
55851
55873
|
|
|
55852
55874
|
///////////////////////////////////////////////////////////////////////////////
|
|
55853
|
-
// Copyright (C) 2002-
|
|
55875
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55854
55876
|
// All rights reserved.
|
|
55855
55877
|
//
|
|
55856
55878
|
// This software and its documentation and related materials are owned by
|
|
@@ -55865,7 +55887,7 @@ void main() {
|
|
|
55865
55887
|
//
|
|
55866
55888
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55867
55889
|
// license agreement with Open Design Alliance.
|
|
55868
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55890
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55869
55891
|
// All rights reserved.
|
|
55870
55892
|
//
|
|
55871
55893
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55878,7 +55900,7 @@ void main() {
|
|
|
55878
55900
|
}
|
|
55879
55901
|
|
|
55880
55902
|
///////////////////////////////////////////////////////////////////////////////
|
|
55881
|
-
// Copyright (C) 2002-
|
|
55903
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55882
55904
|
// All rights reserved.
|
|
55883
55905
|
//
|
|
55884
55906
|
// This software and its documentation and related materials are owned by
|
|
@@ -55893,7 +55915,7 @@ void main() {
|
|
|
55893
55915
|
//
|
|
55894
55916
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55895
55917
|
// license agreement with Open Design Alliance.
|
|
55896
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55918
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55897
55919
|
// All rights reserved.
|
|
55898
55920
|
//
|
|
55899
55921
|
// By use of this software, its documentation or related materials, you
|
|
@@ -55906,7 +55928,7 @@ void main() {
|
|
|
55906
55928
|
}
|
|
55907
55929
|
|
|
55908
55930
|
///////////////////////////////////////////////////////////////////////////////
|
|
55909
|
-
// Copyright (C) 2002-
|
|
55931
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
55910
55932
|
// All rights reserved.
|
|
55911
55933
|
//
|
|
55912
55934
|
// This software and its documentation and related materials are owned by
|
|
@@ -55921,7 +55943,7 @@ void main() {
|
|
|
55921
55943
|
//
|
|
55922
55944
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
55923
55945
|
// license agreement with Open Design Alliance.
|
|
55924
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
55946
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
55925
55947
|
// All rights reserved.
|
|
55926
55948
|
//
|
|
55927
55949
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56271,7 +56293,7 @@ void main() {
|
|
|
56271
56293
|
}
|
|
56272
56294
|
|
|
56273
56295
|
///////////////////////////////////////////////////////////////////////////////
|
|
56274
|
-
// Copyright (C) 2002-
|
|
56296
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56275
56297
|
// All rights reserved.
|
|
56276
56298
|
//
|
|
56277
56299
|
// This software and its documentation and related materials are owned by
|
|
@@ -56286,7 +56308,7 @@ void main() {
|
|
|
56286
56308
|
//
|
|
56287
56309
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56288
56310
|
// license agreement with Open Design Alliance.
|
|
56289
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56311
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56290
56312
|
// All rights reserved.
|
|
56291
56313
|
//
|
|
56292
56314
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56301,7 +56323,7 @@ void main() {
|
|
|
56301
56323
|
}
|
|
56302
56324
|
|
|
56303
56325
|
///////////////////////////////////////////////////////////////////////////////
|
|
56304
|
-
// Copyright (C) 2002-
|
|
56326
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56305
56327
|
// All rights reserved.
|
|
56306
56328
|
//
|
|
56307
56329
|
// This software and its documentation and related materials are owned by
|
|
@@ -56316,7 +56338,7 @@ void main() {
|
|
|
56316
56338
|
//
|
|
56317
56339
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56318
56340
|
// license agreement with Open Design Alliance.
|
|
56319
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56341
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56320
56342
|
// All rights reserved.
|
|
56321
56343
|
//
|
|
56322
56344
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56470,7 +56492,7 @@ void main() {
|
|
|
56470
56492
|
}
|
|
56471
56493
|
|
|
56472
56494
|
///////////////////////////////////////////////////////////////////////////////
|
|
56473
|
-
// Copyright (C) 2002-
|
|
56495
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56474
56496
|
// All rights reserved.
|
|
56475
56497
|
//
|
|
56476
56498
|
// This software and its documentation and related materials are owned by
|
|
@@ -56485,7 +56507,7 @@ void main() {
|
|
|
56485
56507
|
//
|
|
56486
56508
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56487
56509
|
// license agreement with Open Design Alliance.
|
|
56488
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56510
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56489
56511
|
// All rights reserved.
|
|
56490
56512
|
//
|
|
56491
56513
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56527,7 +56549,7 @@ void main() {
|
|
|
56527
56549
|
}
|
|
56528
56550
|
|
|
56529
56551
|
///////////////////////////////////////////////////////////////////////////////
|
|
56530
|
-
// Copyright (C) 2002-
|
|
56552
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56531
56553
|
// All rights reserved.
|
|
56532
56554
|
//
|
|
56533
56555
|
// This software and its documentation and related materials are owned by
|
|
@@ -56542,7 +56564,7 @@ void main() {
|
|
|
56542
56564
|
//
|
|
56543
56565
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56544
56566
|
// license agreement with Open Design Alliance.
|
|
56545
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56567
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56546
56568
|
// All rights reserved.
|
|
56547
56569
|
//
|
|
56548
56570
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56557,7 +56579,7 @@ void main() {
|
|
|
56557
56579
|
}
|
|
56558
56580
|
|
|
56559
56581
|
///////////////////////////////////////////////////////////////////////////////
|
|
56560
|
-
// Copyright (C) 2002-
|
|
56582
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56561
56583
|
// All rights reserved.
|
|
56562
56584
|
//
|
|
56563
56585
|
// This software and its documentation and related materials are owned by
|
|
@@ -56572,7 +56594,7 @@ void main() {
|
|
|
56572
56594
|
//
|
|
56573
56595
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56574
56596
|
// license agreement with Open Design Alliance.
|
|
56575
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56597
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56576
56598
|
// All rights reserved.
|
|
56577
56599
|
//
|
|
56578
56600
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56633,7 +56655,7 @@ void main() {
|
|
|
56633
56655
|
draggers.registerDragger("Walk", (viewer) => new WalkDragger(viewer));
|
|
56634
56656
|
|
|
56635
56657
|
///////////////////////////////////////////////////////////////////////////////
|
|
56636
|
-
// Copyright (C) 2002-
|
|
56658
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56637
56659
|
// All rights reserved.
|
|
56638
56660
|
//
|
|
56639
56661
|
// This software and its documentation and related materials are owned by
|
|
@@ -56648,7 +56670,7 @@ void main() {
|
|
|
56648
56670
|
//
|
|
56649
56671
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56650
56672
|
// license agreement with Open Design Alliance.
|
|
56651
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56673
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56652
56674
|
// All rights reserved.
|
|
56653
56675
|
//
|
|
56654
56676
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56659,7 +56681,7 @@ void main() {
|
|
|
56659
56681
|
}
|
|
56660
56682
|
|
|
56661
56683
|
///////////////////////////////////////////////////////////////////////////////
|
|
56662
|
-
// Copyright (C) 2002-
|
|
56684
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56663
56685
|
// All rights reserved.
|
|
56664
56686
|
//
|
|
56665
56687
|
// This software and its documentation and related materials are owned by
|
|
@@ -56674,7 +56696,7 @@ void main() {
|
|
|
56674
56696
|
//
|
|
56675
56697
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56676
56698
|
// license agreement with Open Design Alliance.
|
|
56677
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56699
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56678
56700
|
// All rights reserved.
|
|
56679
56701
|
//
|
|
56680
56702
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56685,7 +56707,7 @@ void main() {
|
|
|
56685
56707
|
}
|
|
56686
56708
|
|
|
56687
56709
|
///////////////////////////////////////////////////////////////////////////////
|
|
56688
|
-
// Copyright (C) 2002-
|
|
56710
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56689
56711
|
// All rights reserved.
|
|
56690
56712
|
//
|
|
56691
56713
|
// This software and its documentation and related materials are owned by
|
|
@@ -56700,133 +56722,23 @@ void main() {
|
|
|
56700
56722
|
//
|
|
56701
56723
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56702
56724
|
// license agreement with Open Design Alliance.
|
|
56703
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56704
|
-
// All rights reserved.
|
|
56705
|
-
//
|
|
56706
|
-
// By use of this software, its documentation or related materials, you
|
|
56707
|
-
// acknowledge and accept the above terms.
|
|
56708
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
56709
|
-
class SelectionComponent {
|
|
56710
|
-
constructor(viewer) {
|
|
56711
|
-
this.onPointerDown = (event) => {
|
|
56712
|
-
if (!event.isPrimary || event.button !== 0)
|
|
56713
|
-
return;
|
|
56714
|
-
this.getMousePosition(event, this.downPosition);
|
|
56715
|
-
};
|
|
56716
|
-
this.onPointerUp = (event) => {
|
|
56717
|
-
if (!event.isPrimary)
|
|
56718
|
-
return;
|
|
56719
|
-
const upPosition = this.getMousePosition(event, new Vector2());
|
|
56720
|
-
if (this.downPosition.distanceTo(upPosition) !== 0)
|
|
56721
|
-
return;
|
|
56722
|
-
const intersects = this.getPointerIntersects(upPosition);
|
|
56723
|
-
this.clearSelection();
|
|
56724
|
-
if (intersects.length > 0)
|
|
56725
|
-
this.select(intersects[0].object);
|
|
56726
|
-
this.viewer.update();
|
|
56727
|
-
this.viewer.emitEvent({ type: "select", data: undefined, handles: this.viewer.getSelected() });
|
|
56728
|
-
};
|
|
56729
|
-
this.onDoubleClick = (event) => {
|
|
56730
|
-
if (event.button !== 0)
|
|
56731
|
-
return;
|
|
56732
|
-
this.viewer.executeCommand("zoomToSelected");
|
|
56733
|
-
};
|
|
56734
|
-
this.optionsChange = () => {
|
|
56735
|
-
const { facesColor, facesTransparancy } = this.viewer.options;
|
|
56736
|
-
this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);
|
|
56737
|
-
this.facesMaterial.opacity = (255 - facesTransparancy) / 255;
|
|
56738
|
-
this.viewer.update();
|
|
56739
|
-
};
|
|
56740
|
-
this.viewer = viewer;
|
|
56741
|
-
this.raycaster = new Raycaster();
|
|
56742
|
-
this.downPosition = new Vector2();
|
|
56743
|
-
const { facesColor, facesTransparancy } = this.viewer.options;
|
|
56744
|
-
this.facesMaterial = new MeshBasicMaterial();
|
|
56745
|
-
this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);
|
|
56746
|
-
this.facesMaterial.opacity = (255 - facesTransparancy) / 255;
|
|
56747
|
-
this.facesMaterial.transparent = true;
|
|
56748
|
-
this.viewer.addEventListener("pointerdown", this.onPointerDown);
|
|
56749
|
-
this.viewer.addEventListener("pointerup", this.onPointerUp);
|
|
56750
|
-
this.viewer.addEventListener("dblclick", this.onDoubleClick);
|
|
56751
|
-
this.viewer.addEventListener("optionschange", this.optionsChange);
|
|
56752
|
-
}
|
|
56753
|
-
dispose() {
|
|
56754
|
-
this.facesMaterial.dispose();
|
|
56755
|
-
this.viewer.removeEventListener("pointerdown", this.onPointerDown);
|
|
56756
|
-
this.viewer.removeEventListener("pointerup", this.onPointerUp);
|
|
56757
|
-
this.viewer.removeEventListener("dblclick", this.onDoubleClick);
|
|
56758
|
-
this.viewer.removeEventListener("optionschange", this.optionsChange);
|
|
56759
|
-
}
|
|
56760
|
-
getMousePosition(event, target) {
|
|
56761
|
-
return target.set(event.clientX, event.clientY);
|
|
56762
|
-
}
|
|
56763
|
-
getPointerIntersects(mouse) {
|
|
56764
|
-
const rect = this.viewer.canvas.getBoundingClientRect();
|
|
56765
|
-
const x = ((mouse.x - rect.left) / rect.width) * 2 - 1;
|
|
56766
|
-
const y = (-(mouse.y - rect.top) / rect.height) * 2 + 1;
|
|
56767
|
-
const coords = new Vector2(x, y);
|
|
56768
|
-
this.raycaster.setFromCamera(coords, this.viewer.camera);
|
|
56769
|
-
const objects = [];
|
|
56770
|
-
this.viewer.scene.traverseVisible((child) => objects.push(child));
|
|
56771
|
-
this.raycaster.params = this.raycaster.params = {
|
|
56772
|
-
Mesh: {},
|
|
56773
|
-
Line: { threshold: 0.25 },
|
|
56774
|
-
Line2: { threshold: 0.25 },
|
|
56775
|
-
LOD: {},
|
|
56776
|
-
Points: { threshold: 0.1 },
|
|
56777
|
-
Sprite: {},
|
|
56778
|
-
};
|
|
56779
|
-
return this.raycaster.intersectObjects(objects, false);
|
|
56780
|
-
}
|
|
56781
|
-
select(object) {
|
|
56782
|
-
if (object.isSelected)
|
|
56783
|
-
return;
|
|
56784
|
-
object.isSelected = true;
|
|
56785
|
-
object.originalMaterial = object.material;
|
|
56786
|
-
object.material = this.facesMaterial;
|
|
56787
|
-
this.viewer.selected.push(object);
|
|
56788
|
-
}
|
|
56789
|
-
clearSelection() {
|
|
56790
|
-
this.viewer.selected.forEach((object) => {
|
|
56791
|
-
object.isSelected = false;
|
|
56792
|
-
object.material = object.originalMaterial;
|
|
56793
|
-
});
|
|
56794
|
-
this.viewer.selected.length = 0;
|
|
56795
|
-
}
|
|
56796
|
-
}
|
|
56797
|
-
|
|
56798
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
56799
|
-
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
56800
|
-
// All rights reserved.
|
|
56801
|
-
//
|
|
56802
|
-
// This software and its documentation and related materials are owned by
|
|
56803
|
-
// the Alliance. The software may only be incorporated into application
|
|
56804
|
-
// programs owned by members of the Alliance, subject to a signed
|
|
56805
|
-
// Membership Agreement and Supplemental Software License Agreement with the
|
|
56806
|
-
// Alliance. The structure and organization of this software are the valuable
|
|
56807
|
-
// trade secrets of the Alliance and its suppliers. The software is also
|
|
56808
|
-
// protected by copyright law and international treaty provisions. Application
|
|
56809
|
-
// programs incorporating this software must include the following statement
|
|
56810
|
-
// with their copyright notices:
|
|
56811
|
-
//
|
|
56812
|
-
// This application incorporates Open Design Alliance software pursuant to a
|
|
56813
|
-
// license agreement with Open Design Alliance.
|
|
56814
|
-
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
56725
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56815
56726
|
// All rights reserved.
|
|
56816
56727
|
//
|
|
56817
56728
|
// By use of this software, its documentation or related materials, you
|
|
56818
56729
|
// acknowledge and accept the above terms.
|
|
56819
56730
|
///////////////////////////////////////////////////////////////////////////////
|
|
56820
56731
|
function clearSelected(viewer) {
|
|
56821
|
-
const selection =
|
|
56732
|
+
const selection = viewer.getComponent("SelectionComponent");
|
|
56733
|
+
if (!selection)
|
|
56734
|
+
return;
|
|
56822
56735
|
selection.clearSelection();
|
|
56823
|
-
selection.dispose();
|
|
56824
56736
|
viewer.update();
|
|
56825
56737
|
viewer.emitEvent({ type: "select", data: undefined, handles: [] });
|
|
56826
56738
|
}
|
|
56827
56739
|
|
|
56828
56740
|
///////////////////////////////////////////////////////////////////////////////
|
|
56829
|
-
// Copyright (C) 2002-
|
|
56741
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56830
56742
|
// All rights reserved.
|
|
56831
56743
|
//
|
|
56832
56744
|
// This software and its documentation and related materials are owned by
|
|
@@ -56841,7 +56753,7 @@ void main() {
|
|
|
56841
56753
|
//
|
|
56842
56754
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56843
56755
|
// license agreement with Open Design Alliance.
|
|
56844
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56756
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56845
56757
|
// All rights reserved.
|
|
56846
56758
|
//
|
|
56847
56759
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56852,7 +56764,7 @@ void main() {
|
|
|
56852
56764
|
}
|
|
56853
56765
|
|
|
56854
56766
|
///////////////////////////////////////////////////////////////////////////////
|
|
56855
|
-
// Copyright (C) 2002-
|
|
56767
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56856
56768
|
// All rights reserved.
|
|
56857
56769
|
//
|
|
56858
56770
|
// This software and its documentation and related materials are owned by
|
|
@@ -56867,7 +56779,7 @@ void main() {
|
|
|
56867
56779
|
//
|
|
56868
56780
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56869
56781
|
// license agreement with Open Design Alliance.
|
|
56870
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56782
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56871
56783
|
// All rights reserved.
|
|
56872
56784
|
//
|
|
56873
56785
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56879,7 +56791,7 @@ void main() {
|
|
|
56879
56791
|
}
|
|
56880
56792
|
|
|
56881
56793
|
///////////////////////////////////////////////////////////////////////////////
|
|
56882
|
-
// Copyright (C) 2002-
|
|
56794
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56883
56795
|
// All rights reserved.
|
|
56884
56796
|
//
|
|
56885
56797
|
// This software and its documentation and related materials are owned by
|
|
@@ -56894,7 +56806,7 @@ void main() {
|
|
|
56894
56806
|
//
|
|
56895
56807
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56896
56808
|
// license agreement with Open Design Alliance.
|
|
56897
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56809
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56898
56810
|
// All rights reserved.
|
|
56899
56811
|
//
|
|
56900
56812
|
// By use of this software, its documentation or related materials, you
|
|
@@ -56946,7 +56858,7 @@ void main() {
|
|
|
56946
56858
|
}
|
|
56947
56859
|
|
|
56948
56860
|
///////////////////////////////////////////////////////////////////////////////
|
|
56949
|
-
// Copyright (C) 2002-
|
|
56861
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
56950
56862
|
// All rights reserved.
|
|
56951
56863
|
//
|
|
56952
56864
|
// This software and its documentation and related materials are owned by
|
|
@@ -56961,7 +56873,7 @@ void main() {
|
|
|
56961
56873
|
//
|
|
56962
56874
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
56963
56875
|
// license agreement with Open Design Alliance.
|
|
56964
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56876
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
56965
56877
|
// All rights reserved.
|
|
56966
56878
|
//
|
|
56967
56879
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57001,7 +56913,7 @@ void main() {
|
|
|
57001
56913
|
}
|
|
57002
56914
|
|
|
57003
56915
|
///////////////////////////////////////////////////////////////////////////////
|
|
57004
|
-
// Copyright (C) 2002-
|
|
56916
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57005
56917
|
// All rights reserved.
|
|
57006
56918
|
//
|
|
57007
56919
|
// This software and its documentation and related materials are owned by
|
|
@@ -57016,7 +56928,7 @@ void main() {
|
|
|
57016
56928
|
//
|
|
57017
56929
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57018
56930
|
// license agreement with Open Design Alliance.
|
|
57019
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56931
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57020
56932
|
// All rights reserved.
|
|
57021
56933
|
//
|
|
57022
56934
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57050,7 +56962,7 @@ void main() {
|
|
|
57050
56962
|
}
|
|
57051
56963
|
|
|
57052
56964
|
///////////////////////////////////////////////////////////////////////////////
|
|
57053
|
-
// Copyright (C) 2002-
|
|
56965
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57054
56966
|
// All rights reserved.
|
|
57055
56967
|
//
|
|
57056
56968
|
// This software and its documentation and related materials are owned by
|
|
@@ -57065,7 +56977,7 @@ void main() {
|
|
|
57065
56977
|
//
|
|
57066
56978
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57067
56979
|
// license agreement with Open Design Alliance.
|
|
57068
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
56980
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57069
56981
|
// All rights reserved.
|
|
57070
56982
|
//
|
|
57071
56983
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57076,7 +56988,7 @@ void main() {
|
|
|
57076
56988
|
}
|
|
57077
56989
|
|
|
57078
56990
|
///////////////////////////////////////////////////////////////////////////////
|
|
57079
|
-
// Copyright (C) 2002-
|
|
56991
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57080
56992
|
// All rights reserved.
|
|
57081
56993
|
//
|
|
57082
56994
|
// This software and its documentation and related materials are owned by
|
|
@@ -57091,18 +57003,18 @@ void main() {
|
|
|
57091
57003
|
//
|
|
57092
57004
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57093
57005
|
// license agreement with Open Design Alliance.
|
|
57094
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57006
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57095
57007
|
// All rights reserved.
|
|
57096
57008
|
//
|
|
57097
57009
|
// By use of this software, its documentation or related materials, you
|
|
57098
57010
|
// acknowledge and accept the above terms.
|
|
57099
57011
|
///////////////////////////////////////////////////////////////////////////////
|
|
57100
57012
|
function getModels(viewer) {
|
|
57101
|
-
return viewer.models.map((model) => { var _a; return ((_a = model.userData) === null || _a ===
|
|
57013
|
+
return viewer.models.map((model) => { var _a; return ((_a = model.userData) === null || _a === void 0 ? void 0 : _a.handle) || ""; }).filter((handle) => handle);
|
|
57102
57014
|
}
|
|
57103
57015
|
|
|
57104
57016
|
///////////////////////////////////////////////////////////////////////////////
|
|
57105
|
-
// Copyright (C) 2002-
|
|
57017
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57106
57018
|
// All rights reserved.
|
|
57107
57019
|
//
|
|
57108
57020
|
// This software and its documentation and related materials are owned by
|
|
@@ -57117,18 +57029,18 @@ void main() {
|
|
|
57117
57029
|
//
|
|
57118
57030
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57119
57031
|
// license agreement with Open Design Alliance.
|
|
57120
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57032
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57121
57033
|
// All rights reserved.
|
|
57122
57034
|
//
|
|
57123
57035
|
// By use of this software, its documentation or related materials, you
|
|
57124
57036
|
// acknowledge and accept the above terms.
|
|
57125
57037
|
///////////////////////////////////////////////////////////////////////////////
|
|
57126
57038
|
function getSelected(viewer) {
|
|
57127
|
-
return viewer.selected.map((object) => { var _a; return (_a = object.userData) === null || _a ===
|
|
57039
|
+
return viewer.selected.map((object) => { var _a; return (_a = object.userData) === null || _a === void 0 ? void 0 : _a.handle; }).filter((handle) => handle);
|
|
57128
57040
|
}
|
|
57129
57041
|
|
|
57130
57042
|
///////////////////////////////////////////////////////////////////////////////
|
|
57131
|
-
// Copyright (C) 2002-
|
|
57043
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57132
57044
|
// All rights reserved.
|
|
57133
57045
|
//
|
|
57134
57046
|
// This software and its documentation and related materials are owned by
|
|
@@ -57143,7 +57055,118 @@ void main() {
|
|
|
57143
57055
|
//
|
|
57144
57056
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57145
57057
|
// license agreement with Open Design Alliance.
|
|
57146
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57058
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57059
|
+
// All rights reserved.
|
|
57060
|
+
//
|
|
57061
|
+
// By use of this software, its documentation or related materials, you
|
|
57062
|
+
// acknowledge and accept the above terms.
|
|
57063
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
57064
|
+
class SelectionComponent {
|
|
57065
|
+
constructor(viewer) {
|
|
57066
|
+
this.onPointerDown = (event) => {
|
|
57067
|
+
if (!event.isPrimary || event.button !== 0)
|
|
57068
|
+
return;
|
|
57069
|
+
this.getMousePosition(event, this.downPosition);
|
|
57070
|
+
};
|
|
57071
|
+
this.onPointerUp = (event) => {
|
|
57072
|
+
if (!event.isPrimary)
|
|
57073
|
+
return;
|
|
57074
|
+
const upPosition = this.getMousePosition(event, new Vector2());
|
|
57075
|
+
if (this.downPosition.distanceTo(upPosition) !== 0)
|
|
57076
|
+
return;
|
|
57077
|
+
const intersects = this.getPointerIntersects(upPosition);
|
|
57078
|
+
this.clearSelection();
|
|
57079
|
+
if (intersects.length > 0)
|
|
57080
|
+
this.select(intersects[0].object);
|
|
57081
|
+
this.viewer.update();
|
|
57082
|
+
this.viewer.emitEvent({ type: "select", data: undefined, handles: this.viewer.getSelected() });
|
|
57083
|
+
};
|
|
57084
|
+
this.onDoubleClick = (event) => {
|
|
57085
|
+
if (event.button !== 0)
|
|
57086
|
+
return;
|
|
57087
|
+
this.viewer.executeCommand("zoomToSelected");
|
|
57088
|
+
};
|
|
57089
|
+
this.optionsChange = () => {
|
|
57090
|
+
const { facesColor, facesTransparancy } = this.viewer.options;
|
|
57091
|
+
this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);
|
|
57092
|
+
this.facesMaterial.opacity = (255 - facesTransparancy) / 255;
|
|
57093
|
+
this.viewer.update();
|
|
57094
|
+
};
|
|
57095
|
+
this.viewer = viewer;
|
|
57096
|
+
this.raycaster = new Raycaster();
|
|
57097
|
+
this.downPosition = new Vector2();
|
|
57098
|
+
const { facesColor, facesTransparancy } = this.viewer.options;
|
|
57099
|
+
this.facesMaterial = new MeshBasicMaterial();
|
|
57100
|
+
this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);
|
|
57101
|
+
this.facesMaterial.opacity = (255 - facesTransparancy) / 255;
|
|
57102
|
+
this.facesMaterial.transparent = true;
|
|
57103
|
+
this.viewer.addEventListener("pointerdown", this.onPointerDown);
|
|
57104
|
+
this.viewer.addEventListener("pointerup", this.onPointerUp);
|
|
57105
|
+
this.viewer.addEventListener("dblclick", this.onDoubleClick);
|
|
57106
|
+
this.viewer.addEventListener("optionschange", this.optionsChange);
|
|
57107
|
+
}
|
|
57108
|
+
dispose() {
|
|
57109
|
+
this.facesMaterial.dispose();
|
|
57110
|
+
this.viewer.removeEventListener("pointerdown", this.onPointerDown);
|
|
57111
|
+
this.viewer.removeEventListener("pointerup", this.onPointerUp);
|
|
57112
|
+
this.viewer.removeEventListener("dblclick", this.onDoubleClick);
|
|
57113
|
+
this.viewer.removeEventListener("optionschange", this.optionsChange);
|
|
57114
|
+
}
|
|
57115
|
+
getMousePosition(event, target) {
|
|
57116
|
+
return target.set(event.clientX, event.clientY);
|
|
57117
|
+
}
|
|
57118
|
+
getPointerIntersects(mouse) {
|
|
57119
|
+
const rect = this.viewer.canvas.getBoundingClientRect();
|
|
57120
|
+
const x = ((mouse.x - rect.left) / rect.width) * 2 - 1;
|
|
57121
|
+
const y = (-(mouse.y - rect.top) / rect.height) * 2 + 1;
|
|
57122
|
+
const coords = new Vector2(x, y);
|
|
57123
|
+
this.raycaster.setFromCamera(coords, this.viewer.camera);
|
|
57124
|
+
const objects = [];
|
|
57125
|
+
this.viewer.scene.traverseVisible((child) => objects.push(child));
|
|
57126
|
+
this.raycaster.params = this.raycaster.params = {
|
|
57127
|
+
Mesh: {},
|
|
57128
|
+
Line: { threshold: 0.25 },
|
|
57129
|
+
Line2: { threshold: 0.25 },
|
|
57130
|
+
LOD: {},
|
|
57131
|
+
Points: { threshold: 0.1 },
|
|
57132
|
+
Sprite: {},
|
|
57133
|
+
};
|
|
57134
|
+
return this.raycaster.intersectObjects(objects, false);
|
|
57135
|
+
}
|
|
57136
|
+
select(object) {
|
|
57137
|
+
if (object.isSelected)
|
|
57138
|
+
return;
|
|
57139
|
+
object.isSelected = true;
|
|
57140
|
+
object.originalMaterial = object.material;
|
|
57141
|
+
object.material = this.facesMaterial;
|
|
57142
|
+
this.viewer.selected.push(object);
|
|
57143
|
+
}
|
|
57144
|
+
clearSelection() {
|
|
57145
|
+
this.viewer.selected.forEach((object) => {
|
|
57146
|
+
object.isSelected = false;
|
|
57147
|
+
object.material = object.originalMaterial;
|
|
57148
|
+
});
|
|
57149
|
+
this.viewer.selected.length = 0;
|
|
57150
|
+
}
|
|
57151
|
+
}
|
|
57152
|
+
|
|
57153
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
57154
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57155
|
+
// All rights reserved.
|
|
57156
|
+
//
|
|
57157
|
+
// This software and its documentation and related materials are owned by
|
|
57158
|
+
// the Alliance. The software may only be incorporated into application
|
|
57159
|
+
// programs owned by members of the Alliance, subject to a signed
|
|
57160
|
+
// Membership Agreement and Supplemental Software License Agreement with the
|
|
57161
|
+
// Alliance. The structure and organization of this software are the valuable
|
|
57162
|
+
// trade secrets of the Alliance and its suppliers. The software is also
|
|
57163
|
+
// protected by copyright law and international treaty provisions. Application
|
|
57164
|
+
// programs incorporating this software must include the following statement
|
|
57165
|
+
// with their copyright notices:
|
|
57166
|
+
//
|
|
57167
|
+
// This application incorporates Open Design Alliance software pursuant to a
|
|
57168
|
+
// license agreement with Open Design Alliance.
|
|
57169
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57147
57170
|
// All rights reserved.
|
|
57148
57171
|
//
|
|
57149
57172
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57160,7 +57183,7 @@ void main() {
|
|
|
57160
57183
|
}
|
|
57161
57184
|
|
|
57162
57185
|
///////////////////////////////////////////////////////////////////////////////
|
|
57163
|
-
// Copyright (C) 2002-
|
|
57186
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57164
57187
|
// All rights reserved.
|
|
57165
57188
|
//
|
|
57166
57189
|
// This software and its documentation and related materials are owned by
|
|
@@ -57175,7 +57198,7 @@ void main() {
|
|
|
57175
57198
|
//
|
|
57176
57199
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57177
57200
|
// license agreement with Open Design Alliance.
|
|
57178
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57201
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57179
57202
|
// All rights reserved.
|
|
57180
57203
|
//
|
|
57181
57204
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57193,7 +57216,7 @@ void main() {
|
|
|
57193
57216
|
}
|
|
57194
57217
|
|
|
57195
57218
|
///////////////////////////////////////////////////////////////////////////////
|
|
57196
|
-
// Copyright (C) 2002-
|
|
57219
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57197
57220
|
// All rights reserved.
|
|
57198
57221
|
//
|
|
57199
57222
|
// This software and its documentation and related materials are owned by
|
|
@@ -57208,7 +57231,7 @@ void main() {
|
|
|
57208
57231
|
//
|
|
57209
57232
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57210
57233
|
// license agreement with Open Design Alliance.
|
|
57211
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57234
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57212
57235
|
// All rights reserved.
|
|
57213
57236
|
//
|
|
57214
57237
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57219,7 +57242,7 @@ void main() {
|
|
|
57219
57242
|
}
|
|
57220
57243
|
|
|
57221
57244
|
///////////////////////////////////////////////////////////////////////////////
|
|
57222
|
-
// Copyright (C) 2002-
|
|
57245
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57223
57246
|
// All rights reserved.
|
|
57224
57247
|
//
|
|
57225
57248
|
// This software and its documentation and related materials are owned by
|
|
@@ -57234,7 +57257,7 @@ void main() {
|
|
|
57234
57257
|
//
|
|
57235
57258
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57236
57259
|
// license agreement with Open Design Alliance.
|
|
57237
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57260
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57238
57261
|
// All rights reserved.
|
|
57239
57262
|
//
|
|
57240
57263
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57254,7 +57277,7 @@ void main() {
|
|
|
57254
57277
|
}
|
|
57255
57278
|
|
|
57256
57279
|
///////////////////////////////////////////////////////////////////////////////
|
|
57257
|
-
// Copyright (C) 2002-
|
|
57280
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57258
57281
|
// All rights reserved.
|
|
57259
57282
|
//
|
|
57260
57283
|
// This software and its documentation and related materials are owned by
|
|
@@ -57269,7 +57292,7 @@ void main() {
|
|
|
57269
57292
|
//
|
|
57270
57293
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57271
57294
|
// license agreement with Open Design Alliance.
|
|
57272
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57295
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57273
57296
|
// All rights reserved.
|
|
57274
57297
|
//
|
|
57275
57298
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57281,7 +57304,7 @@ void main() {
|
|
|
57281
57304
|
}
|
|
57282
57305
|
|
|
57283
57306
|
///////////////////////////////////////////////////////////////////////////////
|
|
57284
|
-
// Copyright (C) 2002-
|
|
57307
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57285
57308
|
// All rights reserved.
|
|
57286
57309
|
//
|
|
57287
57310
|
// This software and its documentation and related materials are owned by
|
|
@@ -57296,7 +57319,7 @@ void main() {
|
|
|
57296
57319
|
//
|
|
57297
57320
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57298
57321
|
// license agreement with Open Design Alliance.
|
|
57299
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57322
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57300
57323
|
// All rights reserved.
|
|
57301
57324
|
//
|
|
57302
57325
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57307,7 +57330,7 @@ void main() {
|
|
|
57307
57330
|
}
|
|
57308
57331
|
|
|
57309
57332
|
///////////////////////////////////////////////////////////////////////////////
|
|
57310
|
-
// Copyright (C) 2002-
|
|
57333
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57311
57334
|
// All rights reserved.
|
|
57312
57335
|
//
|
|
57313
57336
|
// This software and its documentation and related materials are owned by
|
|
@@ -57322,7 +57345,7 @@ void main() {
|
|
|
57322
57345
|
//
|
|
57323
57346
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57324
57347
|
// license agreement with Open Design Alliance.
|
|
57325
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57348
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57326
57349
|
// All rights reserved.
|
|
57327
57350
|
//
|
|
57328
57351
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57333,7 +57356,7 @@ void main() {
|
|
|
57333
57356
|
}
|
|
57334
57357
|
|
|
57335
57358
|
///////////////////////////////////////////////////////////////////////////////
|
|
57336
|
-
// Copyright (C) 2002-
|
|
57359
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57337
57360
|
// All rights reserved.
|
|
57338
57361
|
//
|
|
57339
57362
|
// This software and its documentation and related materials are owned by
|
|
@@ -57348,7 +57371,7 @@ void main() {
|
|
|
57348
57371
|
//
|
|
57349
57372
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57350
57373
|
// license agreement with Open Design Alliance.
|
|
57351
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57374
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57352
57375
|
// All rights reserved.
|
|
57353
57376
|
//
|
|
57354
57377
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57359,19 +57382,20 @@ void main() {
|
|
|
57359
57382
|
const objects = [];
|
|
57360
57383
|
viewer.scene.traverseVisible((child) => {
|
|
57361
57384
|
var _a;
|
|
57362
|
-
if (handleSet.has((_a = child.userData) === null || _a ===
|
|
57385
|
+
if (handleSet.has((_a = child.userData) === null || _a === void 0 ? void 0 : _a.handle))
|
|
57363
57386
|
objects.push(child);
|
|
57364
57387
|
});
|
|
57365
|
-
const selection =
|
|
57388
|
+
const selection = viewer.getComponent("SelectionComponent");
|
|
57389
|
+
if (!selection)
|
|
57390
|
+
return;
|
|
57366
57391
|
selection.clearSelection();
|
|
57367
57392
|
objects.forEach((object) => selection.select(object));
|
|
57368
|
-
selection.dispose();
|
|
57369
57393
|
viewer.update();
|
|
57370
57394
|
viewer.emitEvent({ type: "select", data: undefined, handles });
|
|
57371
57395
|
}
|
|
57372
57396
|
|
|
57373
57397
|
///////////////////////////////////////////////////////////////////////////////
|
|
57374
|
-
// Copyright (C) 2002-
|
|
57398
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57375
57399
|
// All rights reserved.
|
|
57376
57400
|
//
|
|
57377
57401
|
// This software and its documentation and related materials are owned by
|
|
@@ -57386,7 +57410,7 @@ void main() {
|
|
|
57386
57410
|
//
|
|
57387
57411
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57388
57412
|
// license agreement with Open Design Alliance.
|
|
57389
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57413
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57390
57414
|
// All rights reserved.
|
|
57391
57415
|
//
|
|
57392
57416
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57399,7 +57423,7 @@ void main() {
|
|
|
57399
57423
|
}
|
|
57400
57424
|
|
|
57401
57425
|
///////////////////////////////////////////////////////////////////////////////
|
|
57402
|
-
// Copyright (C) 2002-
|
|
57426
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57403
57427
|
// All rights reserved.
|
|
57404
57428
|
//
|
|
57405
57429
|
// This software and its documentation and related materials are owned by
|
|
@@ -57414,7 +57438,7 @@ void main() {
|
|
|
57414
57438
|
//
|
|
57415
57439
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57416
57440
|
// license agreement with Open Design Alliance.
|
|
57417
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57441
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57418
57442
|
// All rights reserved.
|
|
57419
57443
|
//
|
|
57420
57444
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57425,7 +57449,7 @@ void main() {
|
|
|
57425
57449
|
}
|
|
57426
57450
|
|
|
57427
57451
|
///////////////////////////////////////////////////////////////////////////////
|
|
57428
|
-
// Copyright (C) 2002-
|
|
57452
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57429
57453
|
// All rights reserved.
|
|
57430
57454
|
//
|
|
57431
57455
|
// This software and its documentation and related materials are owned by
|
|
@@ -57440,7 +57464,7 @@ void main() {
|
|
|
57440
57464
|
//
|
|
57441
57465
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57442
57466
|
// license agreement with Open Design Alliance.
|
|
57443
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57467
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57444
57468
|
// All rights reserved.
|
|
57445
57469
|
//
|
|
57446
57470
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57451,7 +57475,7 @@ void main() {
|
|
|
57451
57475
|
const objects = [];
|
|
57452
57476
|
viewer.scene.traverseVisible((child) => {
|
|
57453
57477
|
var _a;
|
|
57454
|
-
if (handleSet.has((_a = child.userData) === null || _a ===
|
|
57478
|
+
if (handleSet.has((_a = child.userData) === null || _a === void 0 ? void 0 : _a.handle))
|
|
57455
57479
|
objects.push(child);
|
|
57456
57480
|
});
|
|
57457
57481
|
const extents = objects.reduce((result, object) => result.expandByObject(object), new Box3());
|
|
@@ -57461,7 +57485,7 @@ void main() {
|
|
|
57461
57485
|
}
|
|
57462
57486
|
|
|
57463
57487
|
///////////////////////////////////////////////////////////////////////////////
|
|
57464
|
-
// Copyright (C) 2002-
|
|
57488
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57465
57489
|
// All rights reserved.
|
|
57466
57490
|
//
|
|
57467
57491
|
// This software and its documentation and related materials are owned by
|
|
@@ -57476,7 +57500,7 @@ void main() {
|
|
|
57476
57500
|
//
|
|
57477
57501
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57478
57502
|
// license agreement with Open Design Alliance.
|
|
57479
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57503
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57480
57504
|
// All rights reserved.
|
|
57481
57505
|
//
|
|
57482
57506
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57490,7 +57514,7 @@ void main() {
|
|
|
57490
57514
|
}
|
|
57491
57515
|
|
|
57492
57516
|
///////////////////////////////////////////////////////////////////////////////
|
|
57493
|
-
// Copyright (C) 2002-
|
|
57517
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57494
57518
|
// All rights reserved.
|
|
57495
57519
|
//
|
|
57496
57520
|
// This software and its documentation and related materials are owned by
|
|
@@ -57505,7 +57529,7 @@ void main() {
|
|
|
57505
57529
|
//
|
|
57506
57530
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57507
57531
|
// license agreement with Open Design Alliance.
|
|
57508
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57532
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57509
57533
|
// All rights reserved.
|
|
57510
57534
|
//
|
|
57511
57535
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57721,7 +57745,7 @@ void main() {
|
|
|
57721
57745
|
}
|
|
57722
57746
|
|
|
57723
57747
|
///////////////////////////////////////////////////////////////////////////////
|
|
57724
|
-
// Copyright (C) 2002-
|
|
57748
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57725
57749
|
// All rights reserved.
|
|
57726
57750
|
//
|
|
57727
57751
|
// This software and its documentation and related materials are owned by
|
|
@@ -57736,7 +57760,7 @@ void main() {
|
|
|
57736
57760
|
//
|
|
57737
57761
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57738
57762
|
// license agreement with Open Design Alliance.
|
|
57739
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57763
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57740
57764
|
// All rights reserved.
|
|
57741
57765
|
//
|
|
57742
57766
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57765,7 +57789,7 @@ void main() {
|
|
|
57765
57789
|
}
|
|
57766
57790
|
|
|
57767
57791
|
///////////////////////////////////////////////////////////////////////////////
|
|
57768
|
-
// Copyright (C) 2002-
|
|
57792
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57769
57793
|
// All rights reserved.
|
|
57770
57794
|
//
|
|
57771
57795
|
// This software and its documentation and related materials are owned by
|
|
@@ -57780,7 +57804,7 @@ void main() {
|
|
|
57780
57804
|
//
|
|
57781
57805
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57782
57806
|
// license agreement with Open Design Alliance.
|
|
57783
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57807
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57784
57808
|
// All rights reserved.
|
|
57785
57809
|
//
|
|
57786
57810
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57832,7 +57856,7 @@ void main() {
|
|
|
57832
57856
|
}
|
|
57833
57857
|
|
|
57834
57858
|
///////////////////////////////////////////////////////////////////////////////
|
|
57835
|
-
// Copyright (C) 2002-
|
|
57859
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57836
57860
|
// All rights reserved.
|
|
57837
57861
|
//
|
|
57838
57862
|
// This software and its documentation and related materials are owned by
|
|
@@ -57847,7 +57871,7 @@ void main() {
|
|
|
57847
57871
|
//
|
|
57848
57872
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57849
57873
|
// license agreement with Open Design Alliance.
|
|
57850
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57874
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57851
57875
|
// All rights reserved.
|
|
57852
57876
|
//
|
|
57853
57877
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57880,7 +57904,7 @@ void main() {
|
|
|
57880
57904
|
}
|
|
57881
57905
|
|
|
57882
57906
|
///////////////////////////////////////////////////////////////////////////////
|
|
57883
|
-
// Copyright (C) 2002-
|
|
57907
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57884
57908
|
// All rights reserved.
|
|
57885
57909
|
//
|
|
57886
57910
|
// This software and its documentation and related materials are owned by
|
|
@@ -57895,7 +57919,7 @@ void main() {
|
|
|
57895
57919
|
//
|
|
57896
57920
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57897
57921
|
// license agreement with Open Design Alliance.
|
|
57898
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57922
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57899
57923
|
// All rights reserved.
|
|
57900
57924
|
//
|
|
57901
57925
|
// By use of this software, its documentation or related materials, you
|
|
@@ -57916,7 +57940,7 @@ void main() {
|
|
|
57916
57940
|
}
|
|
57917
57941
|
|
|
57918
57942
|
///////////////////////////////////////////////////////////////////////////////
|
|
57919
|
-
// Copyright (C) 2002-
|
|
57943
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
57920
57944
|
// All rights reserved.
|
|
57921
57945
|
//
|
|
57922
57946
|
// This software and its documentation and related materials are owned by
|
|
@@ -57931,7 +57955,7 @@ void main() {
|
|
|
57931
57955
|
//
|
|
57932
57956
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
57933
57957
|
// license agreement with Open Design Alliance.
|
|
57934
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
57958
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
57935
57959
|
// All rights reserved.
|
|
57936
57960
|
//
|
|
57937
57961
|
// By use of this software, its documentation or related materials, you
|
|
@@ -58053,7 +58077,7 @@ void main() {
|
|
|
58053
58077
|
}
|
|
58054
58078
|
|
|
58055
58079
|
///////////////////////////////////////////////////////////////////////////////
|
|
58056
|
-
// Copyright (C) 2002-
|
|
58080
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
58057
58081
|
// All rights reserved.
|
|
58058
58082
|
//
|
|
58059
58083
|
// This software and its documentation and related materials are owned by
|
|
@@ -58068,7 +58092,7 @@ void main() {
|
|
|
58068
58092
|
//
|
|
58069
58093
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
58070
58094
|
// license agreement with Open Design Alliance.
|
|
58071
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
58095
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
58072
58096
|
// All rights reserved.
|
|
58073
58097
|
//
|
|
58074
58098
|
// By use of this software, its documentation or related materials, you
|
|
@@ -58100,7 +58124,7 @@ void main() {
|
|
|
58100
58124
|
}
|
|
58101
58125
|
|
|
58102
58126
|
///////////////////////////////////////////////////////////////////////////////
|
|
58103
|
-
// Copyright (C) 2002-
|
|
58127
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
58104
58128
|
// All rights reserved.
|
|
58105
58129
|
//
|
|
58106
58130
|
// This software and its documentation and related materials are owned by
|
|
@@ -58115,7 +58139,7 @@ void main() {
|
|
|
58115
58139
|
//
|
|
58116
58140
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
58117
58141
|
// license agreement with Open Design Alliance.
|
|
58118
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
58142
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
58119
58143
|
// All rights reserved.
|
|
58120
58144
|
//
|
|
58121
58145
|
// By use of this software, its documentation or related materials, you
|
|
@@ -62946,7 +62970,7 @@ void main() {
|
|
|
62946
62970
|
}
|
|
62947
62971
|
|
|
62948
62972
|
///////////////////////////////////////////////////////////////////////////////
|
|
62949
|
-
// Copyright (C) 2002-
|
|
62973
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
62950
62974
|
// All rights reserved.
|
|
62951
62975
|
//
|
|
62952
62976
|
// This software and its documentation and related materials are owned by
|
|
@@ -62961,7 +62985,7 @@ void main() {
|
|
|
62961
62985
|
//
|
|
62962
62986
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
62963
62987
|
// license agreement with Open Design Alliance.
|
|
62964
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
62988
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
62965
62989
|
// All rights reserved.
|
|
62966
62990
|
//
|
|
62967
62991
|
// By use of this software, its documentation or related materials, you
|
|
@@ -62997,7 +63021,7 @@ void main() {
|
|
|
62997
63021
|
.replace(this.resourcePath, "")
|
|
62998
63022
|
.replace(/^(\.?\/)/, "");
|
|
62999
63023
|
const dataURL = this.dataURLs.get(key);
|
|
63000
|
-
return dataURL !== null && dataURL !==
|
|
63024
|
+
return dataURL !== null && dataURL !== void 0 ? dataURL : url;
|
|
63001
63025
|
});
|
|
63002
63026
|
}
|
|
63003
63027
|
dispose() {
|
|
@@ -63045,7 +63069,7 @@ void main() {
|
|
|
63045
63069
|
}
|
|
63046
63070
|
|
|
63047
63071
|
///////////////////////////////////////////////////////////////////////////////
|
|
63048
|
-
// Copyright (C) 2002-
|
|
63072
|
+
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
|
|
63049
63073
|
// All rights reserved.
|
|
63050
63074
|
//
|
|
63051
63075
|
// This software and its documentation and related materials are owned by
|
|
@@ -63060,7 +63084,7 @@ void main() {
|
|
|
63060
63084
|
//
|
|
63061
63085
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
63062
63086
|
// license agreement with Open Design Alliance.
|
|
63063
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
63087
|
+
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
|
|
63064
63088
|
// All rights reserved.
|
|
63065
63089
|
//
|
|
63066
63090
|
// By use of this software, its documentation or related materials, you
|
|
@@ -63178,7 +63202,7 @@ void main() {
|
|
|
63178
63202
|
this.renderer.autoClear = false;
|
|
63179
63203
|
this.renderer.render(this.helpers, this.camera);
|
|
63180
63204
|
this.renderer.clippingPlanes = clippingPlanes;
|
|
63181
|
-
(_b = (_a = this._activeDragger) === null || _a ===
|
|
63205
|
+
(_b = (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.updatePreview) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
63182
63206
|
const deltaTime = (time - this.renderTime) / 1000;
|
|
63183
63207
|
this.renderTime = time;
|
|
63184
63208
|
this.emitEvent({ type: "render", time, deltaTime });
|
|
@@ -63446,7 +63470,7 @@ void main() {
|
|
|
63446
63470
|
newDragger = draggers.createDragger(name, this);
|
|
63447
63471
|
if (newDragger) {
|
|
63448
63472
|
this._activeDragger = newDragger;
|
|
63449
|
-
(_b = (_a = this._activeDragger).initialize) === null || _b ===
|
|
63473
|
+
(_b = (_a = this._activeDragger).initialize) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
63450
63474
|
}
|
|
63451
63475
|
}
|
|
63452
63476
|
const canvas = this.canvas;
|
|
@@ -63543,7 +63567,7 @@ void main() {
|
|
|
63543
63567
|
}
|
|
63544
63568
|
};
|
|
63545
63569
|
const setClippingPlanes = (clipping_planes) => {
|
|
63546
|
-
clipping_planes === null || clipping_planes ===
|
|
63570
|
+
clipping_planes === null || clipping_planes === void 0 ? void 0 : clipping_planes.forEach((clipping_plane) => {
|
|
63547
63571
|
const plane = new Plane();
|
|
63548
63572
|
plane.setFromNormalAndCoplanarPoint(getVector3FromPoint3d(clipping_plane.direction), getVector3FromPoint3d(clipping_plane.location));
|
|
63549
63573
|
this.renderer.clippingPlanes.push(plane);
|
|
@@ -63553,7 +63577,7 @@ void main() {
|
|
|
63553
63577
|
if (selection)
|
|
63554
63578
|
this.setSelected(selection.map((component) => component.handle));
|
|
63555
63579
|
};
|
|
63556
|
-
const draggerName = (_a = this._activeDragger) === null || _a ===
|
|
63580
|
+
const draggerName = (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.name;
|
|
63557
63581
|
this.setActiveDragger();
|
|
63558
63582
|
this.clearSlices();
|
|
63559
63583
|
this.clearOverlay();
|
|
@@ -63565,7 +63589,7 @@ void main() {
|
|
|
63565
63589
|
setClippingPlanes(viewpoint.clipping_planes);
|
|
63566
63590
|
setSelection(viewpoint.selection);
|
|
63567
63591
|
this._markup.setViewpoint(viewpoint);
|
|
63568
|
-
this.target = getVector3FromPoint3d((_c = (_b = viewpoint.custom_fields) === null || _b ===
|
|
63592
|
+
this.target = getVector3FromPoint3d((_c = (_b = viewpoint.custom_fields) === null || _b === void 0 ? void 0 : _b.camera_target) !== null && _c !== void 0 ? _c : this.target);
|
|
63569
63593
|
this.setActiveDragger(draggerName);
|
|
63570
63594
|
this.emitEvent({ type: "drawviewpoint", data: viewpoint });
|
|
63571
63595
|
this.update();
|