@shapediver/viewer.features.drawing-tools 3.4.3 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/implementation/DrawingToolsApi.d.ts +1 -2
- package/dist/api/implementation/DrawingToolsApi.d.ts.map +1 -1
- package/dist/api/implementation/DrawingToolsApi.js +21 -12
- package/dist/api/implementation/DrawingToolsApi.js.map +1 -1
- package/dist/api/interfaces/IDrawingToolsApi.d.ts +2 -6
- package/dist/api/interfaces/IDrawingToolsApi.d.ts.map +1 -1
- package/dist/business/implementation/DrawingToolsManager.d.ts +6 -8
- package/dist/business/implementation/DrawingToolsManager.d.ts.map +1 -1
- package/dist/business/implementation/DrawingToolsManager.js +14 -14
- package/dist/business/implementation/DrawingToolsManager.js.map +1 -1
- package/dist/business/implementation/managers/HistoryManager.d.ts +1 -2
- package/dist/business/implementation/managers/HistoryManager.d.ts.map +1 -1
- package/dist/business/implementation/managers/HistoryManager.js.map +1 -1
- package/dist/business/implementation/managers/TextVisualizationManager.d.ts +1 -2
- package/dist/business/implementation/managers/TextVisualizationManager.d.ts.map +1 -1
- package/dist/business/implementation/managers/TextVisualizationManager.js +8 -8
- package/dist/business/implementation/managers/TextVisualizationManager.js.map +1 -1
- package/dist/business/implementation/managers/geometry/GeometryManager.d.ts +3 -4
- package/dist/business/implementation/managers/geometry/GeometryManager.d.ts.map +1 -1
- package/dist/business/implementation/managers/geometry/GeometryManager.js +2 -2
- package/dist/business/implementation/managers/geometry/GeometryManager.js.map +1 -1
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts +2 -2
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts.map +1 -1
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js +4 -0
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js.map +1 -1
- package/dist/business/implementation/managers/interaction/InteractionManager.d.ts +3 -4
- package/dist/business/implementation/managers/interaction/InteractionManager.d.ts.map +1 -1
- package/dist/business/implementation/managers/interaction/InteractionManager.js +23 -7
- package/dist/business/implementation/managers/interaction/InteractionManager.js.map +1 -1
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js +1 -1
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js.map +1 -1
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts +2 -0
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts.map +1 -1
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js +30 -7
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js.map +1 -1
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js +1 -1
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js.map +1 -1
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.d.ts.map +1 -1
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js +6 -3
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js.map +1 -1
- package/dist/business/interfaces/IDrawingToolsManager.d.ts +6 -38
- package/dist/business/interfaces/IDrawingToolsManager.d.ts.map +1 -1
- package/dist/business/interfaces/IDrawingToolsManager.js.map +1 -1
- package/dist/index.d.ts +6 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -13
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts +0 -10
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.js +0 -38
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts +0 -11
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js +0 -40
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts +0 -15
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js +0 -54
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts +0 -20
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js +0 -67
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts +0 -10
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js +0 -40
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/AxisRestrictionApi.d.ts +0 -7
- package/dist/api/implementation/restrictions/plane/snap/AxisRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/AxisRestrictionApi.js +0 -24
- package/dist/api/implementation/restrictions/plane/snap/AxisRestrictionApi.js.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts +0 -10
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts.map +0 -1
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js +0 -40
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js.map +0 -1
- package/dist/api/interfaces/IRestrictionApi.d.ts +0 -11
- package/dist/api/interfaces/IRestrictionApi.d.ts.map +0 -1
- package/dist/api/interfaces/IRestrictionApi.js +0 -3
- package/dist/api/interfaces/IRestrictionApi.js.map +0 -1
- package/dist/api/interfaces/ISnapRestrictionApi.d.ts +0 -13
- package/dist/api/interfaces/ISnapRestrictionApi.d.ts.map +0 -1
- package/dist/api/interfaces/ISnapRestrictionApi.js +0 -3
- package/dist/api/interfaces/ISnapRestrictionApi.js.map +0 -1
- package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts +0 -82
- package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts.map +0 -1
- package/dist/business/implementation/managers/geometry/GeometryMathManager.js +0 -245
- package/dist/business/implementation/managers/geometry/GeometryMathManager.js.map +0 -1
- package/dist/business/implementation/managers/interaction/EventManager.d.ts +0 -26
- package/dist/business/implementation/managers/interaction/EventManager.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/EventManager.js +0 -63
- package/dist/business/implementation/managers/interaction/EventManager.js.map +0 -1
- package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts +0 -19
- package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/RestrictionManager.js +0 -113
- package/dist/business/implementation/managers/interaction/RestrictionManager.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts +0 -19
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js +0 -105
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.d.ts +0 -31
- package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.js +0 -125
- package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts +0 -40
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js +0 -257
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts +0 -66
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js +0 -244
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts +0 -39
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js +0 -317
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AxisRestriction.d.ts +0 -27
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AxisRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AxisRestriction.js +0 -165
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AxisRestriction.js.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts +0 -39
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts.map +0 -1
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js +0 -212
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js.map +0 -1
- package/dist/business/implementation/utils/numberCleaner.d.ts +0 -2
- package/dist/business/implementation/utils/numberCleaner.d.ts.map +0 -1
- package/dist/business/implementation/utils/numberCleaner.js +0 -9
- package/dist/business/implementation/utils/numberCleaner.js.map +0 -1
- package/dist/business/interfaces/IManager.d.ts +0 -4
- package/dist/business/interfaces/IManager.d.ts.map +0 -1
- package/dist/business/interfaces/IManager.js +0 -3
- package/dist/business/interfaces/IManager.js.map +0 -1
- package/dist/business/interfaces/IRestriction.d.ts +0 -40
- package/dist/business/interfaces/IRestriction.d.ts.map +0 -1
- package/dist/business/interfaces/IRestriction.js +0 -12
- package/dist/business/interfaces/IRestriction.js.map +0 -1
- package/dist/business/interfaces/IRestrictionBase.d.ts +0 -19
- package/dist/business/interfaces/IRestrictionBase.d.ts.map +0 -1
- package/dist/business/interfaces/IRestrictionBase.js +0 -5
- package/dist/business/interfaces/IRestrictionBase.js.map +0 -1
- package/dist/business/interfaces/ISnapRestriction.d.ts +0 -52
- package/dist/business/interfaces/ISnapRestriction.d.ts.map +0 -1
- package/dist/business/interfaces/ISnapRestriction.js +0 -4
- package/dist/business/interfaces/ISnapRestriction.js.map +0 -1
- package/dist/three/CSS2DRenderer.d.ts +0 -32
- package/dist/three/CSS2DRenderer.d.ts.map +0 -1
- package/dist/three/CSS2DRenderer.js +0 -137
- package/dist/three/CSS2DRenderer.js.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _EventManager_callbacks, _EventManager_canvasEventListenerToken, _EventManager_viewport;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.EventManager = void 0;
|
|
16
|
-
// #endregion Type aliases (1)
|
|
17
|
-
// #region Classes (1)
|
|
18
|
-
class EventManager {
|
|
19
|
-
// #endregion Properties (3)
|
|
20
|
-
// #region Constructors (1)
|
|
21
|
-
constructor(viewport, callbacks) {
|
|
22
|
-
// #region Properties (3)
|
|
23
|
-
_EventManager_callbacks.set(this, void 0);
|
|
24
|
-
_EventManager_canvasEventListenerToken.set(this, void 0);
|
|
25
|
-
_EventManager_viewport.set(this, void 0);
|
|
26
|
-
__classPrivateFieldSet(this, _EventManager_viewport, viewport, "f");
|
|
27
|
-
__classPrivateFieldSet(this, _EventManager_callbacks, callbacks, "f");
|
|
28
|
-
__classPrivateFieldSet(this, _EventManager_canvasEventListenerToken, __classPrivateFieldGet(this, _EventManager_viewport, "f").addCanvasEventListener(this), "f");
|
|
29
|
-
}
|
|
30
|
-
// #endregion Constructors (1)
|
|
31
|
-
// #region Public Methods (9)
|
|
32
|
-
close() {
|
|
33
|
-
__classPrivateFieldGet(this, _EventManager_viewport, "f").removeCanvasEventListener(__classPrivateFieldGet(this, _EventManager_canvasEventListenerToken, "f"));
|
|
34
|
-
}
|
|
35
|
-
onKeyDown(event) {
|
|
36
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onKeyDown(event);
|
|
37
|
-
}
|
|
38
|
-
onKeyUp(event) {
|
|
39
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onKeyUp(event);
|
|
40
|
-
}
|
|
41
|
-
onMouseWheel() { }
|
|
42
|
-
onPointerDown(event) {
|
|
43
|
-
const ray = __classPrivateFieldGet(this, _EventManager_viewport, "f").pointerEventToRay(event);
|
|
44
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onDown(event, ray);
|
|
45
|
-
}
|
|
46
|
-
onPointerEnd() { }
|
|
47
|
-
onPointerMove(event) {
|
|
48
|
-
const ray = __classPrivateFieldGet(this, _EventManager_viewport, "f").pointerEventToRay(event);
|
|
49
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onMove(event, ray);
|
|
50
|
-
}
|
|
51
|
-
onPointerOut(event) {
|
|
52
|
-
const ray = __classPrivateFieldGet(this, _EventManager_viewport, "f").pointerEventToRay(event);
|
|
53
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onOut(event, ray);
|
|
54
|
-
}
|
|
55
|
-
onPointerUp(event) {
|
|
56
|
-
const ray = __classPrivateFieldGet(this, _EventManager_viewport, "f").pointerEventToRay(event);
|
|
57
|
-
__classPrivateFieldGet(this, _EventManager_callbacks, "f").onUp(event, ray);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.EventManager = EventManager;
|
|
61
|
-
_EventManager_callbacks = new WeakMap(), _EventManager_canvasEventListenerToken = new WeakMap(), _EventManager_viewport = new WeakMap();
|
|
62
|
-
// #endregion Classes (1)
|
|
63
|
-
//# sourceMappingURL=EventManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventManager.js","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/EventManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAeA,8BAA8B;AAE9B,sBAAsB;AAEtB,MAAa,YAAY;IAOrB,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,QAAsB,EAAE,SAAoB;QAVxD,yBAAyB;QAEzB,0CAA+B;QAC/B,yDAA2C;QAC3C,yCAAiC;QAO7B,uBAAA,IAAI,0BAAa,QAAQ,MAAA,CAAC;QAC1B,uBAAA,IAAI,2BAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,0CAA6B,uBAAA,IAAI,8BAAU,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAA,CAAC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0,0 @@
|
|
|
1
|
-
import { DrawingToolsManager } from '../../DrawingToolsManager';
|
|
2
|
-
import { IManager } from '../../../interfaces/IManager';
|
|
3
|
-
import { IRay } from '@shapediver/viewer.features.interaction';
|
|
4
|
-
import { IRestriction, RestrictionMetaData, RestrictionProperties } from '../../../interfaces/IRestriction';
|
|
5
|
-
import { vec3 } from 'gl-matrix';
|
|
6
|
-
export declare class RestrictionManager implements IManager {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(drawingToolsManager: DrawingToolsManager);
|
|
9
|
-
get restrictions(): {
|
|
10
|
-
[token: string]: IRestriction;
|
|
11
|
-
};
|
|
12
|
-
get showRestrictionVisualization(): boolean;
|
|
13
|
-
set showRestrictionVisualization(value: boolean);
|
|
14
|
-
addRestriction(properties: RestrictionProperties, token?: string): string | undefined;
|
|
15
|
-
close(): void;
|
|
16
|
-
rayTrace(ray: IRay, metaData?: RestrictionMetaData): vec3 | undefined;
|
|
17
|
-
removeRestriction(token: string): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=RestrictionManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RestrictionManager.d.ts","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/RestrictionManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EACH,YAAY,EAEZ,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,kBAAmB,YAAW,QAAQ;;gBAcnC,mBAAmB,EAAE,mBAAmB;IAapD,IAAW,YAAY,IAAI;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAA;KAAE,CAE3D;IAED,IAAW,4BAA4B,IAAI,OAAO,CAEjD;IAED,IAAW,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAQrD;IAMM,cAAc,CAAC,UAAU,EAAE,qBAAqB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAiBrF,KAAK,IAAI,IAAI;IAIb,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS;IAqCrE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAShD"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _RestrictionManager_drawingToolsManager, _RestrictionManager_restrictions, _RestrictionManager_settings, _RestrictionManager_uuidGenerator, _RestrictionManager_showRestrictionVisualization;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RestrictionManager = void 0;
|
|
16
|
-
const GeometryRestriction_1 = require("./restrictions/geometry/GeometryRestriction");
|
|
17
|
-
const IRestriction_1 = require("../../../interfaces/IRestriction");
|
|
18
|
-
const PlaneRestriction_1 = require("./restrictions/plane/PlaneRestriction");
|
|
19
|
-
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
20
|
-
const gl_matrix_1 = require("gl-matrix");
|
|
21
|
-
class RestrictionManager {
|
|
22
|
-
// #endregion Properties (5)
|
|
23
|
-
// #region Constructors (1)
|
|
24
|
-
constructor(drawingToolsManager) {
|
|
25
|
-
// #region Properties (5)
|
|
26
|
-
_RestrictionManager_drawingToolsManager.set(this, void 0);
|
|
27
|
-
_RestrictionManager_restrictions.set(this, {});
|
|
28
|
-
_RestrictionManager_settings.set(this, void 0);
|
|
29
|
-
_RestrictionManager_uuidGenerator.set(this, viewer_shared_services_1.UuidGenerator.instance);
|
|
30
|
-
_RestrictionManager_showRestrictionVisualization.set(this, false);
|
|
31
|
-
__classPrivateFieldSet(this, _RestrictionManager_drawingToolsManager, drawingToolsManager, "f");
|
|
32
|
-
__classPrivateFieldSet(this, _RestrictionManager_settings, drawingToolsManager.settings, "f");
|
|
33
|
-
for (const restrictionToken in __classPrivateFieldGet(this, _RestrictionManager_settings, "f").restrictions) {
|
|
34
|
-
this.addRestriction(__classPrivateFieldGet(this, _RestrictionManager_settings, "f").restrictions[restrictionToken], restrictionToken);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
// #endregion Constructors (1)
|
|
38
|
-
// #region Public Getters And Setters (3)
|
|
39
|
-
get restrictions() {
|
|
40
|
-
return __classPrivateFieldGet(this, _RestrictionManager_restrictions, "f");
|
|
41
|
-
}
|
|
42
|
-
get showRestrictionVisualization() {
|
|
43
|
-
return __classPrivateFieldGet(this, _RestrictionManager_showRestrictionVisualization, "f");
|
|
44
|
-
}
|
|
45
|
-
set showRestrictionVisualization(value) {
|
|
46
|
-
__classPrivateFieldSet(this, _RestrictionManager_showRestrictionVisualization, value, "f");
|
|
47
|
-
for (const restriction of Object.values(__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f"))) {
|
|
48
|
-
restriction.showVisualization = value;
|
|
49
|
-
for (const snapRestriction of Object.values(restriction.snapRestrictions)) {
|
|
50
|
-
snapRestriction.showVisualization = value;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// #endregion Public Getters And Setters (3)
|
|
55
|
-
// #region Public Methods (4)
|
|
56
|
-
addRestriction(properties, token) {
|
|
57
|
-
token = token || __classPrivateFieldGet(this, _RestrictionManager_uuidGenerator, "f").create();
|
|
58
|
-
let restriction;
|
|
59
|
-
if (properties.type === IRestriction_1.RESTRICTION_TYPE.PLANE) {
|
|
60
|
-
restriction = new PlaneRestriction_1.PlaneRestriction(__classPrivateFieldGet(this, _RestrictionManager_drawingToolsManager, "f"), token, properties);
|
|
61
|
-
}
|
|
62
|
-
else if (properties.type === IRestriction_1.RESTRICTION_TYPE.GEOMETRY) {
|
|
63
|
-
restriction = new GeometryRestriction_1.GeometryRestriction(__classPrivateFieldGet(this, _RestrictionManager_drawingToolsManager, "f"), token, properties);
|
|
64
|
-
}
|
|
65
|
-
if (restriction) {
|
|
66
|
-
__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")[token] = restriction;
|
|
67
|
-
return token;
|
|
68
|
-
}
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
close() {
|
|
72
|
-
Object.keys(__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")).forEach(key => this.removeRestriction(key));
|
|
73
|
-
}
|
|
74
|
-
rayTrace(ray, metaData) {
|
|
75
|
-
let rayTracingResult = undefined;
|
|
76
|
-
// create an array of arrays with the restrictions sorted by priority
|
|
77
|
-
const restrictionsSorted = Object.values(__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")).sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
78
|
-
for (const restriction of restrictionsSorted) {
|
|
79
|
-
if (rayTracingResult && rayTracingResult.restriction.priority > restriction.priority)
|
|
80
|
-
break;
|
|
81
|
-
const hit = restriction.rayTrace(ray, metaData);
|
|
82
|
-
if (!hit)
|
|
83
|
-
continue;
|
|
84
|
-
const distance = gl_matrix_1.vec3.squaredDistance(ray.origin, hit);
|
|
85
|
-
if (distance < (rayTracingResult ? rayTracingResult.distance : Infinity)) {
|
|
86
|
-
rayTracingResult = {
|
|
87
|
-
result: hit,
|
|
88
|
-
distance: distance,
|
|
89
|
-
restriction: restriction
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// deactivate the visualization of all restrictions that are not hit
|
|
94
|
-
for (const restriction of Object.values(__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f"))) {
|
|
95
|
-
if (rayTracingResult && restriction !== rayTracingResult.restriction) {
|
|
96
|
-
for (const snapRestriction of Object.values(restriction.snapRestrictions)) {
|
|
97
|
-
snapRestriction.active = false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return rayTracingResult === null || rayTracingResult === void 0 ? void 0 : rayTracingResult.result;
|
|
102
|
-
}
|
|
103
|
-
removeRestriction(token) {
|
|
104
|
-
if (__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")[token]) {
|
|
105
|
-
Object.values(__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")[token].snapRestrictions).forEach(r => r.removeVisualization());
|
|
106
|
-
__classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")[token].removeVisualization();
|
|
107
|
-
delete __classPrivateFieldGet(this, _RestrictionManager_restrictions, "f")[token];
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.RestrictionManager = RestrictionManager;
|
|
112
|
-
_RestrictionManager_drawingToolsManager = new WeakMap(), _RestrictionManager_restrictions = new WeakMap(), _RestrictionManager_settings = new WeakMap(), _RestrictionManager_uuidGenerator = new WeakMap(), _RestrictionManager_showRestrictionVisualization = new WeakMap();
|
|
113
|
-
//# sourceMappingURL=RestrictionManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RestrictionManager.js","sourceRoot":"","sources":["../../../../../src/business/implementation/managers/interaction/RestrictionManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qFAAiH;AAGjH,mEAK0C;AAC1C,4EAAqG;AAErG,+EAAmE;AACnE,yCAAiC;AAEjC,MAAa,kBAAkB;IAU3B,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,mBAAwC;QAbpD,yBAAyB;QAEzB,0DAAmD;QACnD,2CAA4D,EAAE,EAAC;QAC/D,+CAA6B;QAC7B,4CAA0B,sCAAa,CAAC,QAAQ,EAAC;QAEjD,2DAAyC,KAAK,EAAC;QAO3C,uBAAA,IAAI,2CAAwB,mBAAmB,MAAA,CAAC;QAChD,uBAAA,IAAI,gCAAa,mBAAmB,CAAC,QAAQ,MAAA,CAAC;QAE9C,KAAK,MAAM,gBAAgB,IAAI,uBAAA,IAAI,oCAAU,CAAC,YAAY,EAAE;YACxD,IAAI,CAAC,cAAc,CAAC,uBAAA,IAAI,oCAAU,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC;SACxF;IACL,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,YAAY;QACnB,OAAO,uBAAA,IAAI,wCAAc,CAAC;IAC9B,CAAC;IAED,IAAW,4BAA4B;QACnC,OAAO,uBAAA,IAAI,wDAA8B,CAAC;IAC9C,CAAC;IAED,IAAW,4BAA4B,CAAC,KAAc;QAClD,uBAAA,IAAI,oDAAiC,KAAK,MAAA,CAAC;QAC3C,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,uBAAA,IAAI,wCAAc,CAAC,EAAE;YACzD,WAAW,CAAC,iBAAiB,GAAG,KAAK,CAAC;YACtC,KAAK,MAAM,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,EA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CAAC;YAChG,uBAAA,IAAI,wCAAc,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,CAAC;YAChD,OAAO,uBAAA,IAAI,wCAAc,CAAC,KAAK,CAAC,CAAC;SACpC;IACL,CAAC;CAGJ;AApHD,gDAoHC"}
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { DrawingToolsManager } from '../../../DrawingToolsManager';
|
|
3
|
-
import { IRestrictionBase } from '../../../../interfaces/IRestrictionBase';
|
|
4
|
-
export declare abstract class AbstractRestriction implements IRestrictionBase {
|
|
5
|
-
#private;
|
|
6
|
-
protected _enabled: boolean;
|
|
7
|
-
protected _enabledEditable: boolean;
|
|
8
|
-
protected _object3D: THREE.Object3D;
|
|
9
|
-
constructor(drawingToolsManager: DrawingToolsManager, id: string);
|
|
10
|
-
get enabled(): boolean;
|
|
11
|
-
set enabled(value: boolean);
|
|
12
|
-
get id(): string;
|
|
13
|
-
get showVisualization(): boolean;
|
|
14
|
-
set showVisualization(value: boolean);
|
|
15
|
-
removeVisualization(): void;
|
|
16
|
-
protected abstract visibilityChanged(visible: boolean): void;
|
|
17
|
-
private createGridHelperObject;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=AbstractRestriction.d.ts.map
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractRestriction.d.ts","sourceRoot":"","sources":["../../../../../../src/business/implementation/managers/interaction/restrictions/AbstractRestriction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAK3E,8BAAsB,mBAAoB,YAAW,gBAAgB;;IAUjE,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAQ;IACnC,SAAS,CAAC,gBAAgB,EAAE,OAAO,CAAQ;IAC3C,SAAS,CAAC,SAAS,EAAG,KAAK,CAAC,QAAQ,CAAC;gBAMzB,mBAAmB,EAAE,mBAAmB,EAAE,EAAE,EAAE,MAAM;IAWhE,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,OAAO,EAKhC;IAED,IAAW,EAAE,IAAI,MAAM,CAEtB;IAED,IAAW,iBAAiB,IAAI,OAAO,CAEtC;IAED,IAAW,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAI1C;IAMM,mBAAmB,IAAI,IAAI;IAUlC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAM5D,OAAO,CAAC,sBAAsB;CAiBjC"}
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
27
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
-
};
|
|
31
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
32
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
-
};
|
|
36
|
-
var _AbstractRestriction_id, _AbstractRestriction_parentNode, _AbstractRestriction_viewport, _AbstractRestriction_visualizationNode, _AbstractRestriction_showVisualization;
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.AbstractRestriction = void 0;
|
|
39
|
-
const THREE = __importStar(require("three"));
|
|
40
|
-
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
41
|
-
const viewer_rendering_engine_rendering_engine_threejs_1 = require("@shapediver/viewer.rendering-engine.rendering-engine-threejs");
|
|
42
|
-
class AbstractRestriction {
|
|
43
|
-
// #endregion Properties (8)
|
|
44
|
-
// #region Constructors (1)
|
|
45
|
-
constructor(drawingToolsManager, id) {
|
|
46
|
-
// #region Properties (8)
|
|
47
|
-
_AbstractRestriction_id.set(this, void 0);
|
|
48
|
-
_AbstractRestriction_parentNode.set(this, void 0);
|
|
49
|
-
_AbstractRestriction_viewport.set(this, void 0);
|
|
50
|
-
_AbstractRestriction_visualizationNode.set(this, new viewer_shared_node_tree_1.TreeNode('RestrictionVisualizationNode'));
|
|
51
|
-
_AbstractRestriction_showVisualization.set(this, false);
|
|
52
|
-
this._enabled = true;
|
|
53
|
-
this._enabledEditable = true;
|
|
54
|
-
__classPrivateFieldSet(this, _AbstractRestriction_parentNode, drawingToolsManager.parentNode, "f");
|
|
55
|
-
__classPrivateFieldSet(this, _AbstractRestriction_viewport, drawingToolsManager.viewport, "f");
|
|
56
|
-
__classPrivateFieldSet(this, _AbstractRestriction_id, id, "f");
|
|
57
|
-
this.createGridHelperObject();
|
|
58
|
-
}
|
|
59
|
-
// #endregion Constructors (1)
|
|
60
|
-
// #region Public Getters And Setters (5)
|
|
61
|
-
get enabled() {
|
|
62
|
-
return this._enabled;
|
|
63
|
-
}
|
|
64
|
-
set enabled(value) {
|
|
65
|
-
if (this._enabledEditable === false)
|
|
66
|
-
return;
|
|
67
|
-
this._enabled = value;
|
|
68
|
-
this.visibilityChanged(this._object3D.visible);
|
|
69
|
-
}
|
|
70
|
-
get id() {
|
|
71
|
-
return __classPrivateFieldGet(this, _AbstractRestriction_id, "f");
|
|
72
|
-
}
|
|
73
|
-
get showVisualization() {
|
|
74
|
-
return __classPrivateFieldGet(this, _AbstractRestriction_showVisualization, "f");
|
|
75
|
-
}
|
|
76
|
-
set showVisualization(value) {
|
|
77
|
-
__classPrivateFieldSet(this, _AbstractRestriction_showVisualization, value, "f");
|
|
78
|
-
this._object3D.visible = value;
|
|
79
|
-
this.visibilityChanged(this._object3D.visible);
|
|
80
|
-
}
|
|
81
|
-
// #endregion Public Getters And Setters (5)
|
|
82
|
-
// #region Public Methods (1)
|
|
83
|
-
removeVisualization() {
|
|
84
|
-
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").removeChild(__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f"));
|
|
85
|
-
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").updateVersion(false, false);
|
|
86
|
-
__classPrivateFieldGet(this, _AbstractRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f"));
|
|
87
|
-
}
|
|
88
|
-
// #endregion Protected Abstract Methods (1)
|
|
89
|
-
// #region Private Methods (2)
|
|
90
|
-
createGridHelperObject() {
|
|
91
|
-
this._object3D = new THREE.Object3D();
|
|
92
|
-
this._object3D.visible = false;
|
|
93
|
-
const node = new viewer_shared_node_tree_1.TreeNode('ThreeJsDataNode');
|
|
94
|
-
const data = new viewer_rendering_engine_rendering_engine_threejs_1.ThreejsData(this._object3D);
|
|
95
|
-
node.addData(data);
|
|
96
|
-
__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f").addChild(node);
|
|
97
|
-
__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f").updateVersion();
|
|
98
|
-
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").addChild(__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f"));
|
|
99
|
-
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").updateVersion(false, false);
|
|
100
|
-
__classPrivateFieldGet(this, _AbstractRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f"));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports.AbstractRestriction = AbstractRestriction;
|
|
104
|
-
_AbstractRestriction_id = new WeakMap(), _AbstractRestriction_parentNode = new WeakMap(), _AbstractRestriction_viewport = new WeakMap(), _AbstractRestriction_visualizationNode = new WeakMap(), _AbstractRestriction_showVisualization = new WeakMap();
|
|
105
|
-
//# sourceMappingURL=AbstractRestriction.js.map
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractRestriction.js","sourceRoot":"","sources":["../../../../../../src/business/implementation/managers/interaction/restrictions/AbstractRestriction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B,iFAA0E;AAE1E,mIAA2F;AAE3F,MAAsB,mBAAmB;IAcrC,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,mBAAwC,EAAE,EAAU;QAjBhE,yBAAyB;QAEzB,0CAAqB;QACrB,kDAAgC;QAChC,gDAAiC;QACjC,iDAAwC,IAAI,kCAAQ,CAAC,8BAA8B,CAAC,EAAC;QAErF,iDAA8B,KAAK,EAAC;QAE1B,aAAQ,GAAY,IAAI,CAAC;QACzB,qBAAgB,GAAY,IAAI,CAAC;QAQvC,uBAAA,IAAI,mCAAe,mBAAmB,CAAC,UAAU,MAAA,CAAC;QAClD,uBAAA,IAAI,iCAAa,mBAAmB,CAAC,QAAQ,MAAA,CAAC;QAC9C,uBAAA,IAAI,2BAAO,EAAE,MAAA,CAAC;QACd,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAClC,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAW,OAAO,CAAC,KAAc;QAC7B,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK;YAAE,OAAO;QAE5C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,IAAW,EAAE;QACT,OAAO,uBAAA,IAAI,+BAAI,CAAC;IACpB,CAAC;IAED,IAAW,iBAAiB;QACxB,OAAO,uBAAA,IAAI,8CAAmB,CAAC;IACnC,CAA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GJ;AA3FD,kDA2FC"}
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { DrawingToolsManager } from '../../../DrawingToolsManager';
|
|
3
|
-
import { ISnapRestriction } from '../../../../interfaces/ISnapRestriction';
|
|
4
|
-
import { IRay } from '@shapediver/viewer.features.interaction';
|
|
5
|
-
import { RestrictionMetaData } from '../../../../interfaces/IRestriction';
|
|
6
|
-
import { vec3 } from 'gl-matrix';
|
|
7
|
-
export declare abstract class AbstractSnapRestriction implements ISnapRestriction {
|
|
8
|
-
#private;
|
|
9
|
-
protected _active: boolean;
|
|
10
|
-
protected _enabled: boolean;
|
|
11
|
-
protected _enabledEditable: boolean;
|
|
12
|
-
protected _object3D: THREE.Object3D;
|
|
13
|
-
protected _priority: number;
|
|
14
|
-
constructor(drawingToolsManager: DrawingToolsManager, id: string);
|
|
15
|
-
get active(): boolean;
|
|
16
|
-
set active(value: boolean);
|
|
17
|
-
get enabled(): boolean;
|
|
18
|
-
set enabled(value: boolean);
|
|
19
|
-
get enabledEditable(): boolean;
|
|
20
|
-
set enabledEditable(value: boolean);
|
|
21
|
-
get id(): string;
|
|
22
|
-
get priority(): number;
|
|
23
|
-
set priority(value: number);
|
|
24
|
-
get showVisualization(): boolean;
|
|
25
|
-
set showVisualization(value: boolean);
|
|
26
|
-
removeVisualization(): void;
|
|
27
|
-
abstract snap(ray: IRay, point: vec3, metaData?: RestrictionMetaData): vec3 | undefined;
|
|
28
|
-
protected abstract visibilityChanged(visible: boolean): void;
|
|
29
|
-
private createGridHelperObject;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=AbstractSnapRestriction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractSnapRestriction.d.ts","sourceRoot":"","sources":["../../../../../../src/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.ts"],"names":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G,IAAI,GAAG,SAAS;IAM9F,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAM5D,OAAO,CAAC,sBAAsB;CAiBjC"}
|
package/dist/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
27
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
-
};
|
|
31
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
32
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
-
};
|
|
36
|
-
var _AbstractSnapRestriction_id, _AbstractSnapRestriction_parentNode, _AbstractSnapRestriction_viewport, _AbstractSnapRestriction_visualizationNode, _AbstractSnapRestriction_showVisualization;
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.AbstractSnapRestriction = void 0;
|
|
39
|
-
const THREE = __importStar(require("three"));
|
|
40
|
-
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
41
|
-
const viewer_rendering_engine_rendering_engine_threejs_1 = require("@shapediver/viewer.rendering-engine.rendering-engine-threejs");
|
|
42
|
-
class AbstractSnapRestriction {
|
|
43
|
-
// #endregion Properties (10)
|
|
44
|
-
// #region Constructors (1)
|
|
45
|
-
constructor(drawingToolsManager, id) {
|
|
46
|
-
// #region Properties (10)
|
|
47
|
-
_AbstractSnapRestriction_id.set(this, void 0);
|
|
48
|
-
_AbstractSnapRestriction_parentNode.set(this, void 0);
|
|
49
|
-
_AbstractSnapRestriction_viewport.set(this, void 0);
|
|
50
|
-
_AbstractSnapRestriction_visualizationNode.set(this, new viewer_shared_node_tree_1.TreeNode('RestrictionVisualizationNode'));
|
|
51
|
-
_AbstractSnapRestriction_showVisualization.set(this, false);
|
|
52
|
-
this._active = false;
|
|
53
|
-
this._enabled = true;
|
|
54
|
-
this._enabledEditable = true;
|
|
55
|
-
this._priority = 0;
|
|
56
|
-
__classPrivateFieldSet(this, _AbstractSnapRestriction_parentNode, drawingToolsManager.parentNode, "f");
|
|
57
|
-
__classPrivateFieldSet(this, _AbstractSnapRestriction_viewport, drawingToolsManager.viewport, "f");
|
|
58
|
-
__classPrivateFieldSet(this, _AbstractSnapRestriction_id, id, "f");
|
|
59
|
-
this.createGridHelperObject();
|
|
60
|
-
}
|
|
61
|
-
// #endregion Constructors (1)
|
|
62
|
-
// #region Public Getters And Setters (11)
|
|
63
|
-
get active() {
|
|
64
|
-
return this._active;
|
|
65
|
-
}
|
|
66
|
-
set active(value) {
|
|
67
|
-
this._active = value;
|
|
68
|
-
}
|
|
69
|
-
get enabled() {
|
|
70
|
-
return this._enabled;
|
|
71
|
-
}
|
|
72
|
-
set enabled(value) {
|
|
73
|
-
if (this._enabledEditable === false)
|
|
74
|
-
return;
|
|
75
|
-
this._enabled = value;
|
|
76
|
-
this.visibilityChanged(this._object3D.visible);
|
|
77
|
-
}
|
|
78
|
-
get enabledEditable() {
|
|
79
|
-
return this._enabledEditable;
|
|
80
|
-
}
|
|
81
|
-
set enabledEditable(value) {
|
|
82
|
-
this._enabledEditable = value;
|
|
83
|
-
}
|
|
84
|
-
get id() {
|
|
85
|
-
return __classPrivateFieldGet(this, _AbstractSnapRestriction_id, "f");
|
|
86
|
-
}
|
|
87
|
-
get priority() {
|
|
88
|
-
return this._priority;
|
|
89
|
-
}
|
|
90
|
-
set priority(value) {
|
|
91
|
-
this._priority = value;
|
|
92
|
-
}
|
|
93
|
-
get showVisualization() {
|
|
94
|
-
return __classPrivateFieldGet(this, _AbstractSnapRestriction_showVisualization, "f");
|
|
95
|
-
}
|
|
96
|
-
set showVisualization(value) {
|
|
97
|
-
__classPrivateFieldSet(this, _AbstractSnapRestriction_showVisualization, value, "f");
|
|
98
|
-
this._object3D.visible = value;
|
|
99
|
-
this.visibilityChanged(this._object3D.visible);
|
|
100
|
-
}
|
|
101
|
-
// #endregion Public Getters And Setters (11)
|
|
102
|
-
// #region Public Methods (1)
|
|
103
|
-
removeVisualization() {
|
|
104
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f").removeChild(__classPrivateFieldGet(this, _AbstractSnapRestriction_visualizationNode, "f"));
|
|
105
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f").updateVersion(false, false);
|
|
106
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f"));
|
|
107
|
-
}
|
|
108
|
-
// #endregion Protected Abstract Methods (1)
|
|
109
|
-
// #region Private Methods (1)
|
|
110
|
-
createGridHelperObject() {
|
|
111
|
-
this._object3D = new THREE.Object3D();
|
|
112
|
-
this._object3D.visible = false;
|
|
113
|
-
const node = new viewer_shared_node_tree_1.TreeNode('ThreeJsDataNode');
|
|
114
|
-
const data = new viewer_rendering_engine_rendering_engine_threejs_1.ThreejsData(this._object3D);
|
|
115
|
-
node.addData(data);
|
|
116
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_visualizationNode, "f").addChild(node);
|
|
117
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_visualizationNode, "f").updateVersion();
|
|
118
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f").addChild(__classPrivateFieldGet(this, _AbstractSnapRestriction_visualizationNode, "f"));
|
|
119
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f").updateVersion(false, false);
|
|
120
|
-
__classPrivateFieldGet(this, _AbstractSnapRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractSnapRestriction_parentNode, "f"));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.AbstractSnapRestriction = AbstractSnapRestriction;
|
|
124
|
-
_AbstractSnapRestriction_id = new WeakMap(), _AbstractSnapRestriction_parentNode = new WeakMap(), _AbstractSnapRestriction_viewport = new WeakMap(), _AbstractSnapRestriction_visualizationNode = new WeakMap(), _AbstractSnapRestriction_showVisualization = new WeakMap();
|
|
125
|
-
//# sourceMappingURL=AbstractSnapRestriction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractSnapRestriction.js","sourceRoot":"","sources":["../../../../../../src/business/implementation/managers/interaction/restrictions/AbstractSnapRestriction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,iFAA0E;AAE1E,mIAA2F;AAM3F,MAAsB,uBAAuB;IAgBzC,6BAA6B;IAE7B,2BAA2B;IAE3B,YAAY,mBAAwC,EAAE,EAAU;QAnBhE,0BAA0B;QAE1B,8CAAqB;QACrB,sDAAgC;QAChC,oDAAiC;QACjC,qDAAwC,IAAI,kCAAQ,CAAC,8BAA8B,CAAC,EAAC;QAErF,qDAA8B,KAAK,EAAC;QAE1B,YAAO,GAAY,KAAK,CAAC;QACzB,aAAQ,GAAY,IAAI,CAAC;QACzB,qBAAgB,GAAY,IAAI,CAAC;QAEjC,cAAS,GAAW,CAAC,CAAC;QAO5B,uBAAA,IAAI,uCAAe,mBAAmB,CAAC,UAAU,MAAA,CAAC;QAClD,uBAAA,IAAI,qCAAa,mBAAmB,CAAC,QAAQ,MAAA,CAAC;QAC9C,uBAAA,IAAI,+BAAO,EAAE,MAAA,CAAC;QACd,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAClC,CAAC;IAED,8BAA8B;IAE9B,0CAA0C;IAE1C,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAW,MAAM,CAAC,KAAc;QAC5B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAW,OAAO,CAAC,KAAc;QAC7B,IAAI,IAAI,CAAC,gBAAgB,KAAK,K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AS,CAAC,OAAO,GAAG,KAAK,CAAC;QAE/B,MAAM,IAAI,GAAG,IAAI,kCAAQ,CAAC,iBAAiB,CAAC,CAAC;QAE7C,MAAM,IAAI,GAAG,IAAI,8DAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEnB,uBAAA,IAAI,kDAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,uBAAA,IAAI,kDAAmB,CAAC,aAAa,EAAE,CAAC;QACxC,uBAAA,IAAI,2CAAY,CAAC,QAAQ,CAAC,uBAAA,IAAI,kDAAmB,CAAC,CAAC;QACnD,uBAAA,IAAI,2CAAY,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7C,uBAAA,IAAI,yCAAU,CAAC,UAAU,CAAC,uBAAA,IAAI,2CAAY,CAAC,CAAC;IAChD,CAAC;CAGJ;AA3HD,0DA2HC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AbstractRestriction } from '../AbstractRestriction';
|
|
2
|
-
import { DrawingToolsManager } from '../../../../DrawingToolsManager';
|
|
3
|
-
import { IRay } from '@shapediver/viewer.features.interaction';
|
|
4
|
-
import { IRestriction, RestrictionMetaData, RestrictionProperties } from '../../../../../interfaces/IRestriction';
|
|
5
|
-
import { ISnapRestriction } from '../../../../../interfaces/ISnapRestriction';
|
|
6
|
-
import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
|
|
7
|
-
import { vec3 } from 'gl-matrix';
|
|
8
|
-
export declare type GeometryRestrictionProperties = {
|
|
9
|
-
/**
|
|
10
|
-
* The nodes to restrict the interaction to.
|
|
11
|
-
*/
|
|
12
|
-
nodes: ITreeNode[];
|
|
13
|
-
/**
|
|
14
|
-
* If the geometry should be displayed as wireframe.
|
|
15
|
-
*/
|
|
16
|
-
wireframe?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The color of the wireframe.
|
|
19
|
-
*/
|
|
20
|
-
wireframeColor?: string;
|
|
21
|
-
} & RestrictionProperties;
|
|
22
|
-
export declare class GeometryRestriction extends AbstractRestriction implements IRestriction {
|
|
23
|
-
#private;
|
|
24
|
-
constructor(drawingToolsManager: DrawingToolsManager, id: string, properties: GeometryRestrictionProperties);
|
|
25
|
-
get priority(): number;
|
|
26
|
-
get snapRestrictions(): {
|
|
27
|
-
[key: string]: ISnapRestriction;
|
|
28
|
-
};
|
|
29
|
-
get snapToEdges(): boolean;
|
|
30
|
-
set snapToEdges(value: boolean);
|
|
31
|
-
get snapToFaces(): boolean;
|
|
32
|
-
set snapToFaces(value: boolean);
|
|
33
|
-
get snapToVertices(): boolean;
|
|
34
|
-
set snapToVertices(value: boolean);
|
|
35
|
-
rayTrace(ray: IRay, metaData?: RestrictionMetaData): vec3 | undefined;
|
|
36
|
-
updateNodes(nodes: ITreeNode[]): void;
|
|
37
|
-
protected visibilityChanged(): void;
|
|
38
|
-
private updateIntersectionThresholds;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=GeometryRestriction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GeometryRestriction.d.ts","sourceRoot":"","sources":["../../../../../../../src/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtE,OAAO,EAAE,IAAI,EAAgB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAElH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKjC,oBAAY,6B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