@shapediver/viewer.rendering-engine.intersection-restriction-engine 3.16.8 → 3.16.10
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/AbstractRestrictionApi.d.ts +12 -12
- package/dist/api/implementation/AbstractRestrictionApi.js +46 -46
- package/dist/api/implementation/AbstractRestrictionApi.js.map +1 -1
- package/dist/api/implementation/AbstractSnapRestrictionApi.d.ts +12 -12
- package/dist/api/implementation/AbstractSnapRestrictionApi.js +46 -46
- package/dist/api/implementation/AbstractSnapRestrictionApi.js.map +1 -1
- package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.d.ts +6 -6
- package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.js +23 -23
- package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.js.map +1 -1
- package/dist/api/implementation/geometry/GeometryRestrictionApi.d.ts +14 -14
- package/dist/api/implementation/geometry/GeometryRestrictionApi.js +53 -53
- package/dist/api/implementation/geometry/GeometryRestrictionApi.js.map +1 -1
- package/dist/api/implementation/line/LineRestrictionApi.d.ts +10 -10
- package/dist/api/implementation/line/LineRestrictionApi.js +39 -39
- package/dist/api/implementation/line/LineRestrictionApi.js.map +1 -1
- package/dist/api/implementation/plane/PlaneRestrictionApi.d.ts +19 -19
- package/dist/api/implementation/plane/PlaneRestrictionApi.js +66 -66
- package/dist/api/implementation/plane/PlaneRestrictionApi.js.map +1 -1
- package/dist/api/implementation/plane/snap/AngularRestrictionApi.d.ts +9 -9
- package/dist/api/implementation/plane/snap/AngularRestrictionApi.js +39 -39
- package/dist/api/implementation/plane/snap/AngularRestrictionApi.js.map +1 -1
- package/dist/api/implementation/plane/snap/AxisRestrictionApi.d.ts +6 -6
- package/dist/api/implementation/plane/snap/AxisRestrictionApi.js +23 -23
- package/dist/api/implementation/plane/snap/AxisRestrictionApi.js.map +1 -1
- package/dist/api/implementation/plane/snap/GridRestrictionApi.d.ts +9 -9
- package/dist/api/implementation/plane/snap/GridRestrictionApi.js +39 -39
- package/dist/api/implementation/plane/snap/GridRestrictionApi.js.map +1 -1
- package/dist/api/implementation/point/PointRestrictionApi.d.ts +9 -9
- package/dist/api/implementation/point/PointRestrictionApi.js +36 -36
- package/dist/api/implementation/point/PointRestrictionApi.js.map +1 -1
- package/dist/api/interfaces/IRestrictionApi.d.ts +10 -10
- package/dist/api/interfaces/IRestrictionApi.js +2 -2
- package/dist/api/interfaces/ISnapRestrictionApi.d.ts +12 -12
- package/dist/api/interfaces/ISnapRestrictionApi.js +2 -2
- package/dist/implementation/EventManager.d.ts +25 -25
- package/dist/implementation/EventManager.d.ts.map +1 -1
- package/dist/implementation/EventManager.js +62 -62
- package/dist/implementation/EventManager.js.map +1 -1
- package/dist/implementation/GeometryMathManager.d.ts +87 -87
- package/dist/implementation/GeometryMathManager.js +260 -260
- package/dist/implementation/GeometryMathManager.js.map +1 -1
- package/dist/implementation/RestrictionManager.d.ts +28 -28
- package/dist/implementation/RestrictionManager.js +323 -323
- package/dist/implementation/RestrictionManager.js.map +1 -1
- package/dist/implementation/restrictions/AbstractRestriction.d.ts +42 -42
- package/dist/implementation/restrictions/AbstractRestriction.js +164 -154
- package/dist/implementation/restrictions/AbstractRestriction.js.map +1 -1
- package/dist/implementation/restrictions/AbstractSnapRestriction.d.ts +35 -35
- package/dist/implementation/restrictions/AbstractSnapRestriction.js +150 -140
- package/dist/implementation/restrictions/AbstractSnapRestriction.js.map +1 -1
- package/dist/implementation/restrictions/RestrictionsHelper.d.ts +10 -10
- package/dist/implementation/restrictions/RestrictionsHelper.d.ts.map +1 -1
- package/dist/implementation/restrictions/RestrictionsHelper.js +50 -50
- package/dist/implementation/restrictions/RestrictionsHelper.js.map +1 -1
- package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.d.ts +17 -17
- package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.js +62 -62
- package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.js.map +1 -1
- package/dist/implementation/restrictions/geometry/GeometryRestriction.d.ts +92 -92
- package/dist/implementation/restrictions/geometry/GeometryRestriction.js +410 -400
- package/dist/implementation/restrictions/geometry/GeometryRestriction.js.map +1 -1
- package/dist/implementation/restrictions/line/LineRestriction.d.ts +58 -58
- package/dist/implementation/restrictions/line/LineRestriction.js +291 -281
- package/dist/implementation/restrictions/line/LineRestriction.js.map +1 -1
- package/dist/implementation/restrictions/plane/PlaneRestriction.d.ts +65 -65
- package/dist/implementation/restrictions/plane/PlaneRestriction.js +306 -306
- package/dist/implementation/restrictions/plane/PlaneRestriction.js.map +1 -1
- package/dist/implementation/restrictions/plane/snap/AngularRestriction.d.ts +39 -39
- package/dist/implementation/restrictions/plane/snap/AngularRestriction.d.ts.map +1 -1
- package/dist/implementation/restrictions/plane/snap/AngularRestriction.js +346 -346
- package/dist/implementation/restrictions/plane/snap/AngularRestriction.js.map +1 -1
- package/dist/implementation/restrictions/plane/snap/AxisRestriction.d.ts +27 -27
- package/dist/implementation/restrictions/plane/snap/AxisRestriction.d.ts.map +1 -1
- package/dist/implementation/restrictions/plane/snap/AxisRestriction.js +239 -229
- package/dist/implementation/restrictions/plane/snap/AxisRestriction.js.map +1 -1
- package/dist/implementation/restrictions/plane/snap/GridRestriction.d.ts +39 -39
- package/dist/implementation/restrictions/plane/snap/GridRestriction.d.ts.map +1 -1
- package/dist/implementation/restrictions/plane/snap/GridRestriction.js +318 -308
- package/dist/implementation/restrictions/plane/snap/GridRestriction.js.map +1 -1
- package/dist/implementation/restrictions/point/PointRestriction.d.ts +45 -45
- package/dist/implementation/restrictions/point/PointRestriction.js +166 -156
- package/dist/implementation/restrictions/point/PointRestriction.js.map +1 -1
- package/dist/index.d.ts +29 -29
- package/dist/index.js +37 -37
- package/dist/interfaces/IDragAnchor.d.ts +8 -8
- package/dist/interfaces/IDragAnchor.js +2 -2
- package/dist/interfaces/IRestriction.d.ts +117 -117
- package/dist/interfaces/IRestriction.d.ts.map +1 -1
- package/dist/interfaces/IRestriction.js +23 -23
- package/dist/interfaces/IRestriction.js.map +1 -1
- package/dist/interfaces/IRestrictionManager.d.ts +13 -13
- package/dist/interfaces/IRestrictionManager.js +2 -2
- package/dist/interfaces/ISnapRestriction.d.ts +81 -81
- package/dist/interfaces/ISnapRestriction.d.ts.map +1 -1
- package/dist/interfaces/ISnapRestriction.js +3 -3
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestrictionManager.js","sourceRoot":"","sources":["../../src/implementation/RestrictionManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,iFAAwE;AACxE,+EAAiE;AAOjE,6DAUoC;AAEpC,iDAA4C;AAC5C,+DAA0D;AAC1D,+FAG4D;AAC5D,qFAIqD;AACrD,yEAG6C;AAC7C,4EAG+C;AAC/C,4EAG+C;AAC/C,0EAAsE;AAEtE,MAAa,kBAAkB;IAyC9B,6BAA6B;IAE7B,2BAA2B;IAE3B,YACC,QAAsB,EACtB,aAAwB,kBAAS,CAAC,IAAI,EACtC,YAAsC,EACtC,QAAiC;QAhDlC,0BAA0B;
|
|
1
|
+
{"version":3,"file":"RestrictionManager.js","sourceRoot":"","sources":["../../src/implementation/RestrictionManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,iFAAwE;AACxE,+EAAiE;AAOjE,6DAUoC;AAEpC,iDAA4C;AAC5C,+DAA0D;AAC1D,+FAG4D;AAC5D,qFAIqD;AACrD,yEAG6C;AAC7C,4EAG+C;AAC/C,4EAG+C;AAC/C,0EAAsE;AAEtE,MAAa,kBAAkB;IAyC9B,6BAA6B;IAE7B,2BAA2B;IAE3B,YACC,QAAsB,EACtB,aAAwB,kBAAS,CAAC,IAAI,EACtC,YAAsC,EACtC,QAAiC;QAhDlC,0BAA0B;QAEjB,mDAA4B;QAC5B,0DAA0C;QAC1C,iDAAuB;QACvB,2CAAiD,EAAE,EAAC;QACpD,uCAAoC;YAC5C,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er.shared.node-tree";
|
|
3
|
-
import { IRay } from "@shapediver/viewer.shared.types";
|
|
4
|
-
import { vec3 } from "gl-matrix";
|
|
5
|
-
import * as THREE from "three";
|
|
6
|
-
import { IRestriction, RestrictionMetaData, RestrictionProperties, RestrictionResult, RESTRICTION_TYPE } from "../../interfaces/IRestriction";
|
|
7
|
-
import { ISnapRestriction } from "../../interfaces/ISnapRestriction";
|
|
8
|
-
export declare abstract class AbstractRestriction implements IRestriction {
|
|
9
|
-
#private;
|
|
10
|
-
protected _enabled: boolean;
|
|
11
|
-
protected _enabledEditable: boolean;
|
|
12
|
-
protected _object3D: THREE.Object3D;
|
|
13
|
-
protected _snapRestrictions: {
|
|
14
|
-
[key: string]: ISnapRestriction;
|
|
15
|
-
};
|
|
16
|
-
constructor(viewport: IViewportApi, parentNode: ITreeNode, id: string, properties: RestrictionProperties);
|
|
17
|
-
get enabled(): boolean;
|
|
18
|
-
set enabled(value: boolean);
|
|
19
|
-
get hideable(): boolean;
|
|
20
|
-
set hideable(value: boolean);
|
|
21
|
-
get id(): string;
|
|
22
|
-
get priority(): number;
|
|
23
|
-
set priority(value: number);
|
|
24
|
-
get rotation(): {
|
|
25
|
-
axis: vec3;
|
|
26
|
-
angle: number;
|
|
27
|
-
};
|
|
28
|
-
set rotation(value: {
|
|
29
|
-
axis: vec3;
|
|
30
|
-
angle: number;
|
|
31
|
-
});
|
|
32
|
-
get showVisualization(): boolean;
|
|
33
|
-
set showVisualization(value: boolean);
|
|
34
|
-
get snapRestrictions(): {
|
|
35
|
-
[key: string]: ISnapRestriction;
|
|
36
|
-
};
|
|
37
|
-
get type(): RESTRICTION_TYPE;
|
|
38
|
-
removeVisualization(): void;
|
|
39
|
-
abstract rayTrace(ray: IRay, metaData?: RestrictionMetaData): RestrictionResult | undefined;
|
|
40
|
-
protected abstract visibilityChanged(visible: boolean): void;
|
|
41
|
-
private createGridHelperObject;
|
|
42
|
-
}
|
|
1
|
+
import { IViewportApi } from "@shapediver/viewer";
|
|
2
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
import { IRay } from "@shapediver/viewer.shared.types";
|
|
4
|
+
import { vec3 } from "gl-matrix";
|
|
5
|
+
import * as THREE from "three";
|
|
6
|
+
import { IRestriction, RestrictionMetaData, RestrictionProperties, RestrictionResult, RESTRICTION_TYPE } from "../../interfaces/IRestriction";
|
|
7
|
+
import { ISnapRestriction } from "../../interfaces/ISnapRestriction";
|
|
8
|
+
export declare abstract class AbstractRestriction implements IRestriction {
|
|
9
|
+
#private;
|
|
10
|
+
protected _enabled: boolean;
|
|
11
|
+
protected _enabledEditable: boolean;
|
|
12
|
+
protected _object3D: THREE.Object3D;
|
|
13
|
+
protected _snapRestrictions: {
|
|
14
|
+
[key: string]: ISnapRestriction;
|
|
15
|
+
};
|
|
16
|
+
constructor(viewport: IViewportApi, parentNode: ITreeNode, id: string, properties: RestrictionProperties);
|
|
17
|
+
get enabled(): boolean;
|
|
18
|
+
set enabled(value: boolean);
|
|
19
|
+
get hideable(): boolean;
|
|
20
|
+
set hideable(value: boolean);
|
|
21
|
+
get id(): string;
|
|
22
|
+
get priority(): number;
|
|
23
|
+
set priority(value: number);
|
|
24
|
+
get rotation(): {
|
|
25
|
+
axis: vec3;
|
|
26
|
+
angle: number;
|
|
27
|
+
};
|
|
28
|
+
set rotation(value: {
|
|
29
|
+
axis: vec3;
|
|
30
|
+
angle: number;
|
|
31
|
+
});
|
|
32
|
+
get showVisualization(): boolean;
|
|
33
|
+
set showVisualization(value: boolean);
|
|
34
|
+
get snapRestrictions(): {
|
|
35
|
+
[key: string]: ISnapRestriction;
|
|
36
|
+
};
|
|
37
|
+
get type(): RESTRICTION_TYPE;
|
|
38
|
+
removeVisualization(): void;
|
|
39
|
+
abstract rayTrace(ray: IRay, metaData?: RestrictionMetaData): RestrictionResult | undefined;
|
|
40
|
+
protected abstract visibilityChanged(visible: boolean): void;
|
|
41
|
+
private createGridHelperObject;
|
|
42
|
+
}
|
|
43
43
|
//# sourceMappingURL=AbstractRestriction.d.ts.map
|
|
@@ -1,155 +1,165 @@
|
|
|
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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this
|
|
60
|
-
this
|
|
61
|
-
this
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
__classPrivateFieldSet(this,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// #
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
__classPrivateFieldGet(this,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
36
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
37
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
38
|
+
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");
|
|
39
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
40
|
+
};
|
|
41
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
42
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
43
|
+
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");
|
|
44
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
45
|
+
};
|
|
46
|
+
var _AbstractRestriction_createHelperObjects, _AbstractRestriction_id, _AbstractRestriction_parentNode, _AbstractRestriction_type, _AbstractRestriction_viewport, _AbstractRestriction_visualizationNode, _AbstractRestriction_hideable, _AbstractRestriction_priority, _AbstractRestriction_rotation, _AbstractRestriction_showVisualization;
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.AbstractRestriction = void 0;
|
|
49
|
+
const viewer_rendering_engine_rendering_engine_threejs_1 = require("@shapediver/viewer.rendering-engine.rendering-engine-threejs");
|
|
50
|
+
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
51
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
52
|
+
const THREE = __importStar(require("three"));
|
|
53
|
+
class AbstractRestriction {
|
|
54
|
+
// #endregion Properties (12)
|
|
55
|
+
// #region Constructors (1)
|
|
56
|
+
constructor(viewport, parentNode, id, properties) {
|
|
57
|
+
var _a;
|
|
58
|
+
// #region Properties (12)
|
|
59
|
+
_AbstractRestriction_createHelperObjects.set(this, void 0);
|
|
60
|
+
_AbstractRestriction_id.set(this, void 0);
|
|
61
|
+
_AbstractRestriction_parentNode.set(this, void 0);
|
|
62
|
+
_AbstractRestriction_type.set(this, void 0);
|
|
63
|
+
_AbstractRestriction_viewport.set(this, void 0);
|
|
64
|
+
_AbstractRestriction_visualizationNode.set(this, new viewer_shared_node_tree_1.TreeNode("RestrictionVisualizationNode"));
|
|
65
|
+
_AbstractRestriction_hideable.set(this, false);
|
|
66
|
+
_AbstractRestriction_priority.set(this, void 0);
|
|
67
|
+
_AbstractRestriction_rotation.set(this, void 0);
|
|
68
|
+
_AbstractRestriction_showVisualization.set(this, false);
|
|
69
|
+
this._enabled = true;
|
|
70
|
+
this._enabledEditable = true;
|
|
71
|
+
this._snapRestrictions = {};
|
|
72
|
+
__classPrivateFieldSet(this, _AbstractRestriction_parentNode, parentNode, "f");
|
|
73
|
+
__classPrivateFieldSet(this, _AbstractRestriction_viewport, viewport, "f");
|
|
74
|
+
__classPrivateFieldSet(this, _AbstractRestriction_id, id, "f");
|
|
75
|
+
__classPrivateFieldSet(this, _AbstractRestriction_type, properties.type, "f");
|
|
76
|
+
__classPrivateFieldSet(this, _AbstractRestriction_rotation, properties.rotation || {
|
|
77
|
+
axis: gl_matrix_1.vec3.fromValues(0, 0, 1),
|
|
78
|
+
angle: 0,
|
|
79
|
+
}, "f");
|
|
80
|
+
__classPrivateFieldSet(this, _AbstractRestriction_priority, properties.priority || -1, "f");
|
|
81
|
+
__classPrivateFieldSet(this, _AbstractRestriction_hideable, properties.hideable || false, "f");
|
|
82
|
+
__classPrivateFieldSet(this, _AbstractRestriction_createHelperObjects, (_a = properties.createHelperObjects) !== null && _a !== void 0 ? _a : true, "f");
|
|
83
|
+
if (__classPrivateFieldGet(this, _AbstractRestriction_createHelperObjects, "f")) {
|
|
84
|
+
this.createGridHelperObject();
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this._object3D = new THREE.Object3D();
|
|
88
|
+
this._object3D.visible = false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// #endregion Constructors (1)
|
|
92
|
+
// #region Public Getters And Setters (11)
|
|
93
|
+
get enabled() {
|
|
94
|
+
return this._enabled;
|
|
95
|
+
}
|
|
96
|
+
set enabled(value) {
|
|
97
|
+
if (this._enabledEditable === false)
|
|
98
|
+
return;
|
|
99
|
+
this._enabled = value;
|
|
100
|
+
this.visibilityChanged(this._object3D.visible);
|
|
101
|
+
}
|
|
102
|
+
get hideable() {
|
|
103
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_hideable, "f");
|
|
104
|
+
}
|
|
105
|
+
set hideable(value) {
|
|
106
|
+
__classPrivateFieldSet(this, _AbstractRestriction_hideable, value, "f");
|
|
107
|
+
}
|
|
108
|
+
get id() {
|
|
109
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_id, "f");
|
|
110
|
+
}
|
|
111
|
+
get priority() {
|
|
112
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_priority, "f");
|
|
113
|
+
}
|
|
114
|
+
set priority(value) {
|
|
115
|
+
__classPrivateFieldSet(this, _AbstractRestriction_priority, value, "f");
|
|
116
|
+
}
|
|
117
|
+
get rotation() {
|
|
118
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_rotation, "f");
|
|
119
|
+
}
|
|
120
|
+
set rotation(value) {
|
|
121
|
+
__classPrivateFieldSet(this, _AbstractRestriction_rotation, value, "f");
|
|
122
|
+
}
|
|
123
|
+
get showVisualization() {
|
|
124
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_showVisualization, "f");
|
|
125
|
+
}
|
|
126
|
+
set showVisualization(value) {
|
|
127
|
+
__classPrivateFieldSet(this, _AbstractRestriction_showVisualization, value, "f");
|
|
128
|
+
this._object3D.visible = value;
|
|
129
|
+
this.visibilityChanged(this._object3D.visible);
|
|
130
|
+
}
|
|
131
|
+
get snapRestrictions() {
|
|
132
|
+
return this._snapRestrictions;
|
|
133
|
+
}
|
|
134
|
+
get type() {
|
|
135
|
+
return __classPrivateFieldGet(this, _AbstractRestriction_type, "f");
|
|
136
|
+
}
|
|
137
|
+
// #endregion Public Getters And Setters (11)
|
|
138
|
+
// #region Public Methods (1)
|
|
139
|
+
removeVisualization() {
|
|
140
|
+
if (!__classPrivateFieldGet(this, _AbstractRestriction_createHelperObjects, "f"))
|
|
141
|
+
return;
|
|
142
|
+
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").removeChild(__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f"));
|
|
143
|
+
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").updateVersion(false, false);
|
|
144
|
+
__classPrivateFieldGet(this, _AbstractRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f"));
|
|
145
|
+
}
|
|
146
|
+
// #endregion Protected Abstract Methods (1)
|
|
147
|
+
// #region Private Methods (1)
|
|
148
|
+
createGridHelperObject() {
|
|
149
|
+
if (!__classPrivateFieldGet(this, _AbstractRestriction_createHelperObjects, "f"))
|
|
150
|
+
return;
|
|
151
|
+
this._object3D = new THREE.Object3D();
|
|
152
|
+
this._object3D.visible = false;
|
|
153
|
+
const node = new viewer_shared_node_tree_1.TreeNode("ThreeJsDataNode");
|
|
154
|
+
const data = new viewer_rendering_engine_rendering_engine_threejs_1.ThreejsData(this._object3D);
|
|
155
|
+
node.addData(data);
|
|
156
|
+
__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f").addChild(node);
|
|
157
|
+
__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f").updateVersion();
|
|
158
|
+
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").addChild(__classPrivateFieldGet(this, _AbstractRestriction_visualizationNode, "f"));
|
|
159
|
+
__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f").updateVersion(false, false);
|
|
160
|
+
__classPrivateFieldGet(this, _AbstractRestriction_viewport, "f").updateNode(__classPrivateFieldGet(this, _AbstractRestriction_parentNode, "f"));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
exports.AbstractRestriction = AbstractRestriction;
|
|
164
|
+
_AbstractRestriction_createHelperObjects = new WeakMap(), _AbstractRestriction_id = new WeakMap(), _AbstractRestriction_parentNode = new WeakMap(), _AbstractRestriction_type = new WeakMap(), _AbstractRestriction_viewport = new WeakMap(), _AbstractRestriction_visualizationNode = new WeakMap(), _AbstractRestriction_hideable = new WeakMap(), _AbstractRestriction_priority = new WeakMap(), _AbstractRestriction_rotation = new WeakMap(), _AbstractRestriction_showVisualization = new WeakMap();
|
|
155
165
|
//# sourceMappingURL=AbstractRestriction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractRestriction.js","sourceRoot":"","sources":["../../../src/implementation/restrictions/AbstractRestriction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractRestriction.js","sourceRoot":"","sources":["../../../src/implementation/restrictions/AbstractRestriction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mIAAyF;AACzF,iFAAwE;AAExE,yCAA+B;AAC/B,6CAA+B;AAU/B,MAAsB,mBAAmB;IAsBxC,6BAA6B;IAE7B,2BAA2B;IAE3B,YACC,QAAsB,EACtB,UAAqB,EACrB,EAAU,EACV,UAAiC;;QA7BlC,0BAA0B;QAEjB,2DAA8B;QAC9B,0CAAY;QACZ,kDAAuB;QACvB,4CAAwB;QACxB,gDAAwB;QACxB,iDAA+B,IAAI,kCAAQ,CACnD,8BAA8B,CAC9B,EAAC;QAEF,wCAAqB,KAAK,EAAC;QAC3B,gDAAkB;QAClB,gDAAuC;QACvC,iDAA8B,KAAK,EAAC;QAE1B,aAAQ,GAAY,IAAI,CAAC;QACzB,qBAAgB,GAAY,IAAI,CAAC;QAEjC,sBAAiB,GAAsC,EAAE,CAAC;QAYnE,uBAAA,IAAI,mCAAe,UAAU,MAAA,CAAC;QAC9B,uBAAA,IAAI,iCAAa,QAAQ,MAAA,CAAC;QAC1B,uBAAA,IAAI,2BAAO,EAAE,MAAA,CAAC;QACd,uBAAA,IAAI,6BAAS,UAAU,CAAC,IAAI,MAAA,CAAC;QAC7B,uBAAA,IAAI,iCAAa,UAAU,CAAC,QAAQ,IAAI;YACvC,IAAI,EAAE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,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,8CAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,uBAAA,IAAI,8CAAmB,CAAC,aAAa,EAAE,CAAC;QACxC,uBAAA,IAAI,uCAAY,CAAC,QAAQ,CAAC,uBAAA,IAAI,8CAAmB,CAAC,CAAC;QACnD,uBAAA,IAAI,uCAAY,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7C,uBAAA,IAAI,qCAAU,CAAC,UAAU,CAAC,uBAAA,IAAI,uCAAY,CAAC,CAAC;IAC7C,CAAC;CAGD;AAjKD,kDAiKC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { IViewportApi } from "@shapediver/viewer";
|
|
3
|
-
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
4
|
-
import { IRay } from "@shapediver/viewer.shared.types";
|
|
5
|
-
import { vec3 } from "gl-matrix";
|
|
6
|
-
import { RestrictionMetaData, RestrictionResult } from "../../interfaces/IRestriction";
|
|
7
|
-
import { ISnapRestriction, SnapRestrictionProperties } from "../../interfaces/ISnapRestriction";
|
|
8
|
-
export declare abstract class AbstractSnapRestriction implements ISnapRestriction {
|
|
9
|
-
#private;
|
|
10
|
-
protected _active: boolean;
|
|
11
|
-
protected _createHelperObjects: boolean;
|
|
12
|
-
protected _enableVisualization: boolean;
|
|
13
|
-
protected _enabled: boolean;
|
|
14
|
-
protected _enabledEditable: boolean;
|
|
15
|
-
protected _object3D: THREE.Object3D;
|
|
16
|
-
protected _priority: number;
|
|
17
|
-
constructor(viewport: IViewportApi, parentNode: ITreeNode, id: string, properties?: SnapRestrictionProperties);
|
|
18
|
-
get active(): boolean;
|
|
19
|
-
set active(value: boolean);
|
|
20
|
-
get enableVisualization(): boolean;
|
|
21
|
-
set enableVisualization(value: boolean);
|
|
22
|
-
get enabled(): boolean;
|
|
23
|
-
set enabled(value: boolean);
|
|
24
|
-
get enabledEditable(): boolean;
|
|
25
|
-
set enabledEditable(value: boolean);
|
|
26
|
-
get id(): string;
|
|
27
|
-
get priority(): number;
|
|
28
|
-
set priority(value: number);
|
|
29
|
-
get showVisualization(): boolean;
|
|
30
|
-
set showVisualization(value: boolean);
|
|
31
|
-
removeVisualization(): void;
|
|
32
|
-
abstract snap(ray: IRay, point: vec3, distance: number, metaData?: RestrictionMetaData): RestrictionResult | undefined;
|
|
33
|
-
protected abstract visibilityChanged(visible: boolean): void;
|
|
34
|
-
private createGridHelperObject;
|
|
35
|
-
}
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { IViewportApi } from "@shapediver/viewer";
|
|
3
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
4
|
+
import { IRay } from "@shapediver/viewer.shared.types";
|
|
5
|
+
import { vec3 } from "gl-matrix";
|
|
6
|
+
import { RestrictionMetaData, RestrictionResult } from "../../interfaces/IRestriction";
|
|
7
|
+
import { ISnapRestriction, SnapRestrictionProperties } from "../../interfaces/ISnapRestriction";
|
|
8
|
+
export declare abstract class AbstractSnapRestriction implements ISnapRestriction {
|
|
9
|
+
#private;
|
|
10
|
+
protected _active: boolean;
|
|
11
|
+
protected _createHelperObjects: boolean;
|
|
12
|
+
protected _enableVisualization: boolean;
|
|
13
|
+
protected _enabled: boolean;
|
|
14
|
+
protected _enabledEditable: boolean;
|
|
15
|
+
protected _object3D: THREE.Object3D;
|
|
16
|
+
protected _priority: number;
|
|
17
|
+
constructor(viewport: IViewportApi, parentNode: ITreeNode, id: string, properties?: SnapRestrictionProperties);
|
|
18
|
+
get active(): boolean;
|
|
19
|
+
set active(value: boolean);
|
|
20
|
+
get enableVisualization(): boolean;
|
|
21
|
+
set enableVisualization(value: boolean);
|
|
22
|
+
get enabled(): boolean;
|
|
23
|
+
set enabled(value: boolean);
|
|
24
|
+
get enabledEditable(): boolean;
|
|
25
|
+
set enabledEditable(value: boolean);
|
|
26
|
+
get id(): string;
|
|
27
|
+
get priority(): number;
|
|
28
|
+
set priority(value: number);
|
|
29
|
+
get showVisualization(): boolean;
|
|
30
|
+
set showVisualization(value: boolean);
|
|
31
|
+
removeVisualization(): void;
|
|
32
|
+
abstract snap(ray: IRay, point: vec3, distance: number, metaData?: RestrictionMetaData): RestrictionResult | undefined;
|
|
33
|
+
protected abstract visibilityChanged(visible: boolean): void;
|
|
34
|
+
private createGridHelperObject;
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=AbstractSnapRestriction.d.ts.map
|