@shapediver/viewer.features.drawing-tools 3.1.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/LICENSE +73 -0
- package/README.md +161 -0
- package/dist/api/implementation/DrawingToolsApi.d.ts +31 -0
- package/dist/api/implementation/DrawingToolsApi.d.ts.map +1 -0
- package/dist/api/implementation/DrawingToolsApi.js +111 -0
- package/dist/api/implementation/DrawingToolsApi.js.map +1 -0
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts +10 -0
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.js +38 -0
- package/dist/api/implementation/restrictions/AbstractRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts +11 -0
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js +40 -0
- package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.d.ts +7 -0
- package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.js +24 -0
- package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts +15 -0
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js +54 -0
- package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts +18 -0
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js +61 -0
- package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts +10 -0
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js +40 -0
- package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js.map +1 -0
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts +10 -0
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts.map +1 -0
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js +40 -0
- package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js.map +1 -0
- package/dist/api/interfaces/IDrawingToolsApi.d.ts +89 -0
- package/dist/api/interfaces/IDrawingToolsApi.d.ts.map +1 -0
- package/dist/api/interfaces/IDrawingToolsApi.js +3 -0
- package/dist/api/interfaces/IDrawingToolsApi.js.map +1 -0
- package/dist/api/interfaces/IRestrictionApi.d.ts +11 -0
- package/dist/api/interfaces/IRestrictionApi.d.ts.map +1 -0
- package/dist/api/interfaces/IRestrictionApi.js +3 -0
- package/dist/api/interfaces/IRestrictionApi.js.map +1 -0
- package/dist/api/interfaces/ISnapRestrictionApi.d.ts +13 -0
- package/dist/api/interfaces/ISnapRestrictionApi.d.ts.map +1 -0
- package/dist/api/interfaces/ISnapRestrictionApi.js +3 -0
- package/dist/api/interfaces/ISnapRestrictionApi.js.map +1 -0
- package/dist/business/implementation/DrawingToolsManager.d.ts +95 -0
- package/dist/business/implementation/DrawingToolsManager.d.ts.map +1 -0
- package/dist/business/implementation/DrawingToolsManager.js +544 -0
- package/dist/business/implementation/DrawingToolsManager.js.map +1 -0
- package/dist/business/implementation/managers/HistoryManager.d.ts +19 -0
- package/dist/business/implementation/managers/HistoryManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/HistoryManager.js +89 -0
- package/dist/business/implementation/managers/HistoryManager.js.map +1 -0
- package/dist/business/implementation/managers/TextVisualizationManager.d.ts +14 -0
- package/dist/business/implementation/managers/TextVisualizationManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/TextVisualizationManager.js +228 -0
- package/dist/business/implementation/managers/TextVisualizationManager.js.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryManager.d.ts +23 -0
- package/dist/business/implementation/managers/geometry/GeometryManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryManager.js +82 -0
- package/dist/business/implementation/managers/geometry/GeometryManager.js.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts +73 -0
- package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryMathManager.js +230 -0
- package/dist/business/implementation/managers/geometry/GeometryMathManager.js.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryState.d.ts +46 -0
- package/dist/business/implementation/managers/geometry/GeometryState.d.ts.map +1 -0
- package/dist/business/implementation/managers/geometry/GeometryState.js +323 -0
- package/dist/business/implementation/managers/geometry/GeometryState.js.map +1 -0
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts +16 -0
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts.map +1 -0
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js +157 -0
- package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js.map +1 -0
- package/dist/business/implementation/managers/interaction/EventManager.d.ts +26 -0
- package/dist/business/implementation/managers/interaction/EventManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/EventManager.js +63 -0
- package/dist/business/implementation/managers/interaction/EventManager.js.map +1 -0
- package/dist/business/implementation/managers/interaction/InteractionManager.d.ts +39 -0
- package/dist/business/implementation/managers/interaction/InteractionManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/InteractionManager.js +237 -0
- package/dist/business/implementation/managers/interaction/InteractionManager.js.map +1 -0
- package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts +19 -0
- package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/RestrictionManager.js +117 -0
- package/dist/business/implementation/managers/interaction/RestrictionManager.js.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.d.ts +10 -0
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js +52 -0
- package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts +14 -0
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js +135 -0
- package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.d.ts +16 -0
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js +113 -0
- package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js.map +1 -0
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.d.ts +58 -0
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js +377 -0
- package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts +19 -0
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js +105 -0
- package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.d.ts +22 -0
- package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.js +96 -0
- package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts +39 -0
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js +215 -0
- package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts +58 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js +180 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts +38 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js +308 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts +37 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts.map +1 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js +228 -0
- package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js.map +1 -0
- package/dist/business/implementation/utils/numberCleaner.d.ts +2 -0
- package/dist/business/implementation/utils/numberCleaner.d.ts.map +1 -0
- package/dist/business/implementation/utils/numberCleaner.js +9 -0
- package/dist/business/implementation/utils/numberCleaner.js.map +1 -0
- package/dist/business/interfaces/IDrawingToolsManager.d.ts +270 -0
- package/dist/business/interfaces/IDrawingToolsManager.d.ts.map +1 -0
- package/dist/business/interfaces/IDrawingToolsManager.js +16 -0
- package/dist/business/interfaces/IDrawingToolsManager.js.map +1 -0
- package/dist/business/interfaces/IManager.d.ts +4 -0
- package/dist/business/interfaces/IManager.d.ts.map +1 -0
- package/dist/business/interfaces/IManager.js +3 -0
- package/dist/business/interfaces/IManager.js.map +1 -0
- package/dist/business/interfaces/IRestriction.d.ts +41 -0
- package/dist/business/interfaces/IRestriction.d.ts.map +1 -0
- package/dist/business/interfaces/IRestriction.js +13 -0
- package/dist/business/interfaces/IRestriction.js.map +1 -0
- package/dist/business/interfaces/IRestrictionBase.d.ts +19 -0
- package/dist/business/interfaces/IRestrictionBase.d.ts.map +1 -0
- package/dist/business/interfaces/IRestrictionBase.js +5 -0
- package/dist/business/interfaces/IRestrictionBase.js.map +1 -0
- package/dist/business/interfaces/ISnapRestriction.d.ts +50 -0
- package/dist/business/interfaces/ISnapRestriction.d.ts.map +1 -0
- package/dist/business/interfaces/ISnapRestriction.js +4 -0
- package/dist/business/interfaces/ISnapRestriction.js.map +1 -0
- package/dist/business/interfaces/events/EventResponseMapping.d.ts +19 -0
- package/dist/business/interfaces/events/EventResponseMapping.d.ts.map +1 -0
- package/dist/business/interfaces/events/EventResponseMapping.js +4 -0
- package/dist/business/interfaces/events/EventResponseMapping.js.map +1 -0
- package/dist/business/interfaces/events/IDrawingToolsEvent.d.ts +12 -0
- package/dist/business/interfaces/events/IDrawingToolsEvent.d.ts.map +1 -0
- package/dist/business/interfaces/events/IDrawingToolsEvent.js +3 -0
- package/dist/business/interfaces/events/IDrawingToolsEvent.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/three/CSS2DRenderer.d.ts +32 -0
- package/dist/three/CSS2DRenderer.d.ts.map +1 -0
- package/dist/three/CSS2DRenderer.js +137 -0
- package/dist/three/CSS2DRenderer.js.map +1 -0
- package/package.json +55 -0
- package/src/api/implementation/DrawingToolsApi.ts +135 -0
- package/src/api/implementation/restrictions/AbstractRestrictionApi.ts +34 -0
- package/src/api/implementation/restrictions/AbstractSnapRestrictionApi.ts +36 -0
- package/src/api/implementation/restrictions/axis/AxisRestrictionApi.ts +19 -0
- package/src/api/implementation/restrictions/geometry/GeometryRestrictionApi.ts +56 -0
- package/src/api/implementation/restrictions/plane/PlaneRestrictionApi.ts +63 -0
- package/src/api/implementation/restrictions/plane/snap/AngularRestrictionApi.ts +35 -0
- package/src/api/implementation/restrictions/plane/snap/GridRestrictionApi.ts +35 -0
- package/src/api/interfaces/IDrawingToolsApi.ts +99 -0
- package/src/api/interfaces/IRestrictionApi.ts +15 -0
- package/src/api/interfaces/ISnapRestrictionApi.ts +18 -0
- package/src/business/implementation/DrawingToolsManager.ts +619 -0
- package/src/business/implementation/managers/HistoryManager.ts +101 -0
- package/src/business/implementation/managers/TextVisualizationManager.ts +245 -0
- package/src/business/implementation/managers/geometry/GeometryManager.ts +95 -0
- package/src/business/implementation/managers/geometry/GeometryMathManager.ts +273 -0
- package/src/business/implementation/managers/geometry/GeometryState.ts +436 -0
- package/src/business/implementation/managers/geometry/helpers/GeometryManagerHelper.ts +170 -0
- package/src/business/implementation/managers/interaction/EventManager.ts +80 -0
- package/src/business/implementation/managers/interaction/InteractionManager.ts +268 -0
- package/src/business/implementation/managers/interaction/RestrictionManager.ts +135 -0
- package/src/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.ts +48 -0
- package/src/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.ts +149 -0
- package/src/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.ts +127 -0
- package/src/business/implementation/managers/interaction/helpers/InteractionManagerHelper.ts +411 -0
- package/src/business/implementation/managers/interaction/restrictions/AbstractRestriction.ts +99 -0
- package/src/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.ts +107 -0
- package/src/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.ts +237 -0
- package/src/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.ts +257 -0
- package/src/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.ts +384 -0
- package/src/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.ts +262 -0
- package/src/business/implementation/utils/numberCleaner.ts +5 -0
- package/src/business/interfaces/IDrawingToolsManager.ts +313 -0
- package/src/business/interfaces/IManager.ts +7 -0
- package/src/business/interfaces/IRestriction.ts +64 -0
- package/src/business/interfaces/IRestrictionBase.ts +33 -0
- package/src/business/interfaces/ISnapRestriction.ts +70 -0
- package/src/business/interfaces/events/EventResponseMapping.ts +19 -0
- package/src/business/interfaces/events/IDrawingToolsEvent.ts +16 -0
- package/src/index.ts +72 -0
- package/src/three/CSS2DRenderer.ts +212 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IRay } from '@shapediver/viewer.features.interaction';
|
|
2
|
+
import { IRestrictionBase } from './IRestrictionBase';
|
|
3
|
+
import { ISnapRestriction } from './ISnapRestriction';
|
|
4
|
+
import { vec3 } from 'gl-matrix';
|
|
5
|
+
export declare type RestrictionMetaData = {
|
|
6
|
+
index?: number;
|
|
7
|
+
referencePoint?: vec3;
|
|
8
|
+
};
|
|
9
|
+
export declare type RestrictionProperties = {
|
|
10
|
+
/**
|
|
11
|
+
* Type of the restriction
|
|
12
|
+
*/
|
|
13
|
+
type: RESTRICTION_TYPE;
|
|
14
|
+
};
|
|
15
|
+
export interface IRestriction extends IRestrictionBase {
|
|
16
|
+
/**
|
|
17
|
+
* Priority of the restriction
|
|
18
|
+
*/
|
|
19
|
+
readonly priority: number;
|
|
20
|
+
/**
|
|
21
|
+
* The snap restrictions of the restriction.
|
|
22
|
+
*/
|
|
23
|
+
snapRestrictions: {
|
|
24
|
+
[key: string]: ISnapRestriction;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Ray trace the restriction.
|
|
28
|
+
* If the ray does not intersect the restriction, the method returns undefined.
|
|
29
|
+
*
|
|
30
|
+
* @param ray The ray to trace.
|
|
31
|
+
* @param metaData The meta data of the ray.
|
|
32
|
+
* @returns The intersection point of the ray with the restriction.
|
|
33
|
+
*/
|
|
34
|
+
rayTrace(ray: IRay, metaData?: RestrictionMetaData): vec3 | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare enum RESTRICTION_TYPE {
|
|
37
|
+
AXIS = "axis",
|
|
38
|
+
PLANE = "plane",
|
|
39
|
+
GEOMETRY = "geometry"
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=IRestriction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRestriction.d.ts","sourceRoot":"","sources":["../../../src/business/interfaces/IRestriction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,oBAAY,mBAAmB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB,CAAA;AAED,oBAAY,qBAAqB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAMF,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IAGlD;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;KAAE,CAAA;IAMtD;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;CAGzE;AAMD,oBAAY,gBAAgB;IACxB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESTRICTION_TYPE = void 0;
|
|
4
|
+
// #endregion Interfaces (1)
|
|
5
|
+
// #region Enums (1)
|
|
6
|
+
var RESTRICTION_TYPE;
|
|
7
|
+
(function (RESTRICTION_TYPE) {
|
|
8
|
+
RESTRICTION_TYPE["AXIS"] = "axis";
|
|
9
|
+
RESTRICTION_TYPE["PLANE"] = "plane";
|
|
10
|
+
RESTRICTION_TYPE["GEOMETRY"] = "geometry";
|
|
11
|
+
})(RESTRICTION_TYPE = exports.RESTRICTION_TYPE || (exports.RESTRICTION_TYPE = {}));
|
|
12
|
+
// #endregion Enums (1)
|
|
13
|
+
//# sourceMappingURL=IRestriction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRestriction.js","sourceRoot":"","sources":["../../../src/business/interfaces/IRestriction.ts"],"names":[],"mappings":";;;AAqDA,4BAA4B;AAE5B,oBAAoB;AAEpB,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACzB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,uBAAuB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IRestrictionBase {
|
|
2
|
+
/**
|
|
3
|
+
* The unique identifier of the restriction.
|
|
4
|
+
*/
|
|
5
|
+
readonly id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the restriction is enabled or not.
|
|
8
|
+
*/
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the visualization of the restriction is shown or not (if there is one).
|
|
12
|
+
*/
|
|
13
|
+
showVisualization: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Remove the visualization of the restriction.
|
|
16
|
+
*/
|
|
17
|
+
removeVisualization(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=IRestrictionBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRestrictionBase.d.ts","sourceRoot":"","sources":["../../../src/business/interfaces/IRestrictionBase.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAG7B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAM3B;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAC;CAG/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRestrictionBase.js","sourceRoot":"","sources":["../../../src/business/interfaces/IRestrictionBase.ts"],"names":[],"mappings":";AAAA,yBAAyB;;AAgCzB,4BAA4B"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IRestrictionBase } from './IRestrictionBase';
|
|
2
|
+
import { RestrictionMetaData } from './IRestriction';
|
|
3
|
+
import { vec3 } from 'gl-matrix';
|
|
4
|
+
export declare type SnapRestrictionProperties = {
|
|
5
|
+
/**
|
|
6
|
+
* If the restriction should be enabled by default.
|
|
7
|
+
*/
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* If the enabling or disabling of the restriction is allowed to the end user.
|
|
11
|
+
* If it is not editable, the default value for enabling or disabling the restriction is used.
|
|
12
|
+
*/
|
|
13
|
+
enabledEditable?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Priority of the restriction.
|
|
16
|
+
* The higher the priority, the sooner the restriction is applied.
|
|
17
|
+
* If the priority is the same, the result that is closer to the original point is chosen.
|
|
18
|
+
*/
|
|
19
|
+
priority?: number;
|
|
20
|
+
/**
|
|
21
|
+
* The activation key of the restriction.
|
|
22
|
+
* If the key is not provided, no key is assigned.
|
|
23
|
+
* If the key is provided, the restriction is only active when the key is pressed.
|
|
24
|
+
*/
|
|
25
|
+
activationKey?: string;
|
|
26
|
+
};
|
|
27
|
+
export interface ISnapRestriction extends IRestrictionBase {
|
|
28
|
+
/**
|
|
29
|
+
* If the enabling or disabling of the restriction is allowed to the end user.
|
|
30
|
+
* If it is not editable, the default value for enabling or disabling the restriction is used.
|
|
31
|
+
*/
|
|
32
|
+
enabledEditable: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* If the restriction is actively being used at the moment.
|
|
35
|
+
*/
|
|
36
|
+
active: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The priority of the restriction.
|
|
39
|
+
*/
|
|
40
|
+
priority: number;
|
|
41
|
+
/**
|
|
42
|
+
* Restrict the position of a point.
|
|
43
|
+
*
|
|
44
|
+
* @param point The position of the point.
|
|
45
|
+
* @param metaData The meta data of the point.
|
|
46
|
+
* @returns The restricted position of the point.
|
|
47
|
+
*/
|
|
48
|
+
snap(point: vec3, metaData?: RestrictionMetaData): vec3 | undefined;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=ISnapRestriction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISnapRestriction.d.ts","sourceRoot":"","sources":["../../../src/business/interfaces/ISnapRestriction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,oBAAY,yBAAyB,GAAG;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAMF,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IAGtD;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAMjB;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;CAGvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISnapRestriction.js","sourceRoot":"","sources":["../../../src/business/interfaces/ISnapRestriction.ts"],"names":[],"mappings":";;AAqEA,4BAA4B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EVENTTYPE_DRAWING_TOOLS } from '@shapediver/viewer';
|
|
2
|
+
import { IDrawingToolsEvent } from './IDrawingToolsEvent';
|
|
3
|
+
export declare type DrawingToolsEventResponseMapping = {
|
|
4
|
+
[EVENTTYPE_DRAWING_TOOLS.CANCEL]: IDrawingToolsEvent;
|
|
5
|
+
[EVENTTYPE_DRAWING_TOOLS.FINISH]: IDrawingToolsEvent;
|
|
6
|
+
[EVENTTYPE_DRAWING_TOOLS.ADDED]: IDrawingToolsEvent;
|
|
7
|
+
[EVENTTYPE_DRAWING_TOOLS.REMOVED]: IDrawingToolsEvent;
|
|
8
|
+
[EVENTTYPE_DRAWING_TOOLS.MOVED]: IDrawingToolsEvent;
|
|
9
|
+
[EVENTTYPE_DRAWING_TOOLS.GEOMETRY_CHANGED]: IDrawingToolsEvent;
|
|
10
|
+
[EVENTTYPE_DRAWING_TOOLS.SELECTED]: IDrawingToolsEvent;
|
|
11
|
+
[EVENTTYPE_DRAWING_TOOLS.DESELECTED]: IDrawingToolsEvent;
|
|
12
|
+
[EVENTTYPE_DRAWING_TOOLS.DRAG_START]: IDrawingToolsEvent;
|
|
13
|
+
[EVENTTYPE_DRAWING_TOOLS.DRAG_MOVE]: IDrawingToolsEvent;
|
|
14
|
+
[EVENTTYPE_DRAWING_TOOLS.DRAG_END]: IDrawingToolsEvent;
|
|
15
|
+
[EVENTTYPE_DRAWING_TOOLS.MINIMUM_POINTS]: IDrawingToolsEvent;
|
|
16
|
+
[EVENTTYPE_DRAWING_TOOLS.MAXIMUM_POINTS]: IDrawingToolsEvent;
|
|
17
|
+
[EVENTTYPE_DRAWING_TOOLS.UNCLOSED_LOOP]: IDrawingToolsEvent;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=EventResponseMapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseMapping.d.ts","sourceRoot":"","sources":["../../../../src/business/interfaces/events/EventResponseMapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,oBAAY,gCAAgC,GAAG;IAC3C,CAAC,uBAAuB,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrD,CAAC,uBAAuB,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrD,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;IACpD,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtD,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;IACpD,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IAC/D,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvD,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzD,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzD,CAAC,uBAAuB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IACxD,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvD,CAAC,uBAAuB,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAC7D,CAAC,uBAAuB,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAC7D,CAAC,uBAAuB,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC;CAC/D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventResponseMapping.js","sourceRoot":"","sources":["../../../../src/business/interfaces/events/EventResponseMapping.ts"],"names":[],"mappings":";;AAAA,+CAA6D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IViewportEvent } from '@shapediver/viewer';
|
|
2
|
+
import { PointsData } from '../IDrawingToolsManager';
|
|
3
|
+
export interface IDrawingToolsEvent extends IViewportEvent {
|
|
4
|
+
drawingToolId: string;
|
|
5
|
+
fromHistory?: boolean;
|
|
6
|
+
index?: number;
|
|
7
|
+
message?: string;
|
|
8
|
+
points?: PointsData;
|
|
9
|
+
recordHistory?: boolean;
|
|
10
|
+
temporary?: boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=IDrawingToolsEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDrawingToolsEvent.d.ts","sourceRoot":"","sources":["../../../../src/business/interfaces/events/IDrawingToolsEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IAGtD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CAGvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDrawingToolsEvent.js","sourceRoot":"","sources":["../../../../src/business/interfaces/events/IDrawingToolsEvent.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AngularRestrictionApi } from './api/implementation/restrictions/plane/snap/AngularRestrictionApi';
|
|
2
|
+
import { AngularRestrictionProperties } from './business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction';
|
|
3
|
+
import { AxisRestrictionApi } from './api/implementation/restrictions/axis/AxisRestrictionApi';
|
|
4
|
+
import { AxisRestrictionProperties } from './business/implementation/managers/interaction/restrictions/axis/AxisRestriction';
|
|
5
|
+
import { Callbacks, PointsData, SettingsOptional } from './business/interfaces/IDrawingToolsManager';
|
|
6
|
+
import { DrawingToolsApi } from './api/implementation/DrawingToolsApi';
|
|
7
|
+
import { DrawingToolsEventResponseMapping } from './business/interfaces/events/EventResponseMapping';
|
|
8
|
+
import { GeometryRestrictionApi } from './api/implementation/restrictions/geometry/GeometryRestrictionApi';
|
|
9
|
+
import { GeometryRestrictionProperties } from './business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction';
|
|
10
|
+
import { GridRestrictionApi } from './api/implementation/restrictions/plane/snap/GridRestrictionApi';
|
|
11
|
+
import { GridRestrictionProperties } from './business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction';
|
|
12
|
+
import { IDrawingToolsApi } from './api/interfaces/IDrawingToolsApi';
|
|
13
|
+
import { IDrawingToolsEvent } from './business/interfaces/events/IDrawingToolsEvent';
|
|
14
|
+
import { IViewportApi } from '@shapediver/viewer';
|
|
15
|
+
import { IRestriction, RESTRICTION_TYPE, RestrictionMetaData, RestrictionProperties } from './business/interfaces/IRestriction';
|
|
16
|
+
import { IRestrictionApi } from './api/interfaces/IRestrictionApi';
|
|
17
|
+
import { IRestrictionBase } from './business/interfaces/IRestrictionBase';
|
|
18
|
+
import { ISnapRestriction, SnapRestrictionProperties } from './business/interfaces/ISnapRestriction';
|
|
19
|
+
import { PlaneRestrictionApi } from './api/implementation/restrictions/plane/PlaneRestrictionApi';
|
|
20
|
+
import { PlaneRestrictionProperties } from './business/implementation/managers/interaction/restrictions/plane/PlaneRestriction';
|
|
21
|
+
export { SettingsOptional as Settings, Callbacks, DrawingToolsEventResponseMapping, IDrawingToolsEvent, IDrawingToolsApi, DrawingToolsApi, PointsData, PlaneRestrictionProperties, GridRestrictionProperties, AngularRestrictionProperties, GeometryRestrictionProperties, AxisRestrictionProperties, IRestrictionApi, PlaneRestrictionApi, GridRestrictionApi, AngularRestrictionApi, GeometryRestrictionApi, AxisRestrictionApi, IRestrictionBase, RestrictionProperties, IRestriction, RestrictionMetaData, RESTRICTION_TYPE, SnapRestrictionProperties, ISnapRestriction, };
|
|
22
|
+
/**
|
|
23
|
+
* Create a new instance of DrawingTools.
|
|
24
|
+
*
|
|
25
|
+
* @param viewport The viewport to which the DrawingTools should be attached.
|
|
26
|
+
* @param callback The callback function that is called when the drawing is finished.
|
|
27
|
+
* @param properties The customization properties for the DrawingTools.
|
|
28
|
+
* @returns The DrawingTools instance.
|
|
29
|
+
* @throws An error if there is already an active instance of DrawingTools.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createDrawingTools: (viewport: IViewportApi, callbacks: Callbacks, settings: SettingsOptional) => IDrawingToolsApi;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAC3G,OAAO,EAAE,4BAA4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6B,EAC7B,yBAAyB,EACzB,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,kBAAkB,EAC3H,gBAAgB,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,gBAAgB,GAC5I,CAAC;AAYF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,aAAc,YAAY,aAAa,SAAS,YAAY,gBAAgB,KAAG,gBAS7G,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDrawingTools = exports.RESTRICTION_TYPE = exports.AxisRestrictionApi = exports.GeometryRestrictionApi = exports.AngularRestrictionApi = exports.GridRestrictionApi = exports.PlaneRestrictionApi = exports.DrawingToolsApi = void 0;
|
|
4
|
+
const AngularRestrictionApi_1 = require("./api/implementation/restrictions/plane/snap/AngularRestrictionApi");
|
|
5
|
+
Object.defineProperty(exports, "AngularRestrictionApi", { enumerable: true, get: function () { return AngularRestrictionApi_1.AngularRestrictionApi; } });
|
|
6
|
+
const AxisRestrictionApi_1 = require("./api/implementation/restrictions/axis/AxisRestrictionApi");
|
|
7
|
+
Object.defineProperty(exports, "AxisRestrictionApi", { enumerable: true, get: function () { return AxisRestrictionApi_1.AxisRestrictionApi; } });
|
|
8
|
+
const DrawingToolsApi_1 = require("./api/implementation/DrawingToolsApi");
|
|
9
|
+
Object.defineProperty(exports, "DrawingToolsApi", { enumerable: true, get: function () { return DrawingToolsApi_1.DrawingToolsApi; } });
|
|
10
|
+
const GeometryRestrictionApi_1 = require("./api/implementation/restrictions/geometry/GeometryRestrictionApi");
|
|
11
|
+
Object.defineProperty(exports, "GeometryRestrictionApi", { enumerable: true, get: function () { return GeometryRestrictionApi_1.GeometryRestrictionApi; } });
|
|
12
|
+
const GridRestrictionApi_1 = require("./api/implementation/restrictions/plane/snap/GridRestrictionApi");
|
|
13
|
+
Object.defineProperty(exports, "GridRestrictionApi", { enumerable: true, get: function () { return GridRestrictionApi_1.GridRestrictionApi; } });
|
|
14
|
+
const viewer_1 = require("@shapediver/viewer");
|
|
15
|
+
const IRestriction_1 = require("./business/interfaces/IRestriction");
|
|
16
|
+
Object.defineProperty(exports, "RESTRICTION_TYPE", { enumerable: true, get: function () { return IRestriction_1.RESTRICTION_TYPE; } });
|
|
17
|
+
const PlaneRestrictionApi_1 = require("./api/implementation/restrictions/plane/PlaneRestrictionApi");
|
|
18
|
+
Object.defineProperty(exports, "PlaneRestrictionApi", { enumerable: true, get: function () { return PlaneRestrictionApi_1.PlaneRestrictionApi; } });
|
|
19
|
+
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
20
|
+
const defaultTextures = {};
|
|
21
|
+
defaultTextures['variation_0'] = viewer_1.MaterialEngine.instance.loadMap('https://viewer.shapediver.com/v3/graphics/point_soft.png')
|
|
22
|
+
.then((mapData) => {
|
|
23
|
+
defaultTextures['variation_0'] = mapData;
|
|
24
|
+
return mapData;
|
|
25
|
+
});
|
|
26
|
+
let drawingTools;
|
|
27
|
+
/**
|
|
28
|
+
* Create a new instance of DrawingTools.
|
|
29
|
+
*
|
|
30
|
+
* @param viewport The viewport to which the DrawingTools should be attached.
|
|
31
|
+
* @param callback The callback function that is called when the drawing is finished.
|
|
32
|
+
* @param properties The customization properties for the DrawingTools.
|
|
33
|
+
* @returns The DrawingTools instance.
|
|
34
|
+
* @throws An error if there is already an active instance of DrawingTools.
|
|
35
|
+
*/
|
|
36
|
+
const createDrawingTools = (viewport, callbacks, settings) => {
|
|
37
|
+
if (viewer_shared_services_1.SystemInfo.instance.isMobile)
|
|
38
|
+
throw new viewer_1.ShapeDiverViewerDrawingToolsError('The DrawingTools are not supported on mobile devices.');
|
|
39
|
+
if (drawingTools && drawingTools.closed === false)
|
|
40
|
+
throw new viewer_1.ShapeDiverViewerDrawingToolsError('There can only be one instance of DrawingTools active at a time. Please close the current instance before creating a new one.');
|
|
41
|
+
drawingTools = new DrawingToolsApi_1.DrawingToolsApi(viewport, callbacks, settings, defaultTextures);
|
|
42
|
+
return drawingTools;
|
|
43
|
+
};
|
|
44
|
+
exports.createDrawingTools = createDrawingTools;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8GAA2G;AAuC7C,sGAvCrD,6CAAqB,OAuCqD;AArCnF,kGAA+F;AAqCc,mGArCpG,uCAAkB,OAqCoG;AAlC/H,0EAAuE;AA8BjD,gGA9Bb,iCAAe,OA8Ba;AA5BrC,8GAA2G;AAgCtB,uGAhC5E,+CAAsB,OAgC4E;AA9B3G,wGAAqG;AA8B3D,mGA9BjC,uCAAkB,OA8BiC;AA1B5D,+CAKgC;AAChC,qEAKgD;AAgBgC,iGAnB5E,+BAAgB,OAmB4E;AAZhG,qGAAkG;AAW7E,oGAXZ,yCAAmB,OAWY;AATxC,+EAAgE;AAahE,MAAM,eAAe,GAAoD,EAAE,CAAC;AAE5E,eAAe,CAAC,aAAa,CAAC,GAAG,uBAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,0DAA0D,CAAC;KACvH,IAAI,CAAC,CAAC,OAAwB,EAAE,EAAE;IAC/B,eAAe,CAAC,aAAa,CAAC,GAAG,OAAQ,CAAC;IAC1C,OAAO,OAAQ,CAAC;AACpB,CAAC,CAAC,CAAC;AAEP,IAAI,YAA0C,CAAC;AAE/C;;;;;;;;GAQG;AACI,MAAM,kBAAkB,GAAG,CAAC,QAAsB,EAAE,SAAoB,EAAE,QAA0B,EAAoB,EAAE;IAC7H,IAAI,mCAAU,CAAC,QAAQ,CAAC,QAAQ;QAC5B,MAAM,IAAI,0CAAiC,CAAC,uDAAuD,CAAC,CAAC;IAEzG,IAAI,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,KAAK;QAC7C,MAAM,IAAI,0CAAiC,CAAC,+HAA+H,CAAC,CAAC;IAEjL,YAAY,GAAG,IAAI,iCAAe,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;IACnF,OAAO,YAAY,CAAC;AACxB,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Object3D, Vector2, Scene, Camera } from 'three';
|
|
2
|
+
declare class CSS2DObject extends Object3D {
|
|
3
|
+
center: Vector2;
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
isCSS2DObject: boolean;
|
|
6
|
+
constructor(element?: HTMLDivElement);
|
|
7
|
+
copy(source: this, recursive?: boolean): this;
|
|
8
|
+
}
|
|
9
|
+
declare type CSS2DParameters = {
|
|
10
|
+
element?: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
declare class CSS2DRenderer {
|
|
13
|
+
private readonly _cache;
|
|
14
|
+
private _height;
|
|
15
|
+
private _heightHalf;
|
|
16
|
+
private _width;
|
|
17
|
+
private _widthHalf;
|
|
18
|
+
domElement: HTMLElement;
|
|
19
|
+
constructor(parameters?: CSS2DParameters);
|
|
20
|
+
filterAndFlatten(scene: Scene): CSS2DObject[];
|
|
21
|
+
getDistanceToSquared(object1: Object3D, object2: Object3D): number;
|
|
22
|
+
getSize(): {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
render(scene: Scene, camera: Camera): void;
|
|
27
|
+
renderObject(o: Object3D, scene: Scene, camera: Camera): void;
|
|
28
|
+
setSize(width: number, height: number): void;
|
|
29
|
+
zOrder(scene: Scene): void;
|
|
30
|
+
}
|
|
31
|
+
export { CSS2DObject, CSS2DRenderer };
|
|
32
|
+
//# sourceMappingURL=CSS2DRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSS2DRenderer.d.ts","sourceRoot":"","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Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CSS2DRenderer = exports.CSS2DObject = void 0;
|
|
4
|
+
const three_1 = require("three");
|
|
5
|
+
class CSS2DObject extends three_1.Object3D {
|
|
6
|
+
// #endregion Properties (3)
|
|
7
|
+
// #region Constructors (1)
|
|
8
|
+
constructor(element = document.createElement('div')) {
|
|
9
|
+
super();
|
|
10
|
+
this.isCSS2DObject = true;
|
|
11
|
+
this.element = element;
|
|
12
|
+
this.element.style.position = 'absolute';
|
|
13
|
+
this.element.style.userSelect = 'none';
|
|
14
|
+
this.element.setAttribute('draggable', 'false');
|
|
15
|
+
this.center = new three_1.Vector2(0.5, 0.5); // ( 0, 0 ) is the lower left; ( 1, 1 ) is the top right
|
|
16
|
+
this.addEventListener('removed', () => {
|
|
17
|
+
this.traverse((o) => {
|
|
18
|
+
const object = o;
|
|
19
|
+
if (object.element instanceof Element && object.element.parentNode !== null) {
|
|
20
|
+
object.element.parentNode.removeChild(object.element);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// #endregion Constructors (1)
|
|
26
|
+
// #region Public Methods (1)
|
|
27
|
+
copy(source, recursive) {
|
|
28
|
+
super.copy(source, recursive);
|
|
29
|
+
this.element = source.element.cloneNode(true);
|
|
30
|
+
this.center = source.center;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.CSS2DObject = CSS2DObject;
|
|
35
|
+
//
|
|
36
|
+
const _vector = new three_1.Vector3();
|
|
37
|
+
const _viewMatrix = new three_1.Matrix4();
|
|
38
|
+
const _viewProjectionMatrix = new three_1.Matrix4();
|
|
39
|
+
const _a = new three_1.Vector3();
|
|
40
|
+
const _b = new three_1.Vector3();
|
|
41
|
+
class CSS2DRenderer {
|
|
42
|
+
// #endregion Properties (6)
|
|
43
|
+
// #region Constructors (1)
|
|
44
|
+
constructor(parameters) {
|
|
45
|
+
// #region Properties (6)
|
|
46
|
+
this._cache = {
|
|
47
|
+
objects: new WeakMap()
|
|
48
|
+
};
|
|
49
|
+
this._height = 0;
|
|
50
|
+
this._heightHalf = 0;
|
|
51
|
+
this._width = 0;
|
|
52
|
+
this._widthHalf = 0;
|
|
53
|
+
const domElement = (parameters === null || parameters === void 0 ? void 0 : parameters.element) !== undefined ? parameters.element : document.createElement('div');
|
|
54
|
+
domElement.style.overflow = 'hidden';
|
|
55
|
+
this.domElement = domElement;
|
|
56
|
+
}
|
|
57
|
+
// #endregion Constructors (1)
|
|
58
|
+
// #region Public Methods (7)
|
|
59
|
+
filterAndFlatten(scene) {
|
|
60
|
+
const result = [];
|
|
61
|
+
scene.traverse((object) => {
|
|
62
|
+
if (object.isCSS2DObject)
|
|
63
|
+
result.push(object);
|
|
64
|
+
});
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
getDistanceToSquared(object1, object2) {
|
|
68
|
+
_a.setFromMatrixPosition(object1.matrixWorld);
|
|
69
|
+
_b.setFromMatrixPosition(object2.matrixWorld);
|
|
70
|
+
return _a.distanceToSquared(_b);
|
|
71
|
+
}
|
|
72
|
+
getSize() {
|
|
73
|
+
return {
|
|
74
|
+
width: this._width,
|
|
75
|
+
height: this._height
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
render(scene, camera) {
|
|
79
|
+
if (scene.matrixWorldAutoUpdate === true)
|
|
80
|
+
scene.updateMatrixWorld();
|
|
81
|
+
if (camera.parent === null && camera.matrixWorldAutoUpdate === true)
|
|
82
|
+
camera.updateMatrixWorld();
|
|
83
|
+
_viewMatrix.copy(camera.matrixWorldInverse);
|
|
84
|
+
_viewProjectionMatrix.multiplyMatrices(camera.projectionMatrix, _viewMatrix);
|
|
85
|
+
this.renderObject(scene, scene, camera);
|
|
86
|
+
this.zOrder(scene);
|
|
87
|
+
}
|
|
88
|
+
renderObject(o, scene, camera) {
|
|
89
|
+
if (o.isCSS2DObject) {
|
|
90
|
+
const object = o;
|
|
91
|
+
_vector.setFromMatrixPosition(object.matrixWorld);
|
|
92
|
+
_vector.applyMatrix4(_viewProjectionMatrix);
|
|
93
|
+
const visible = (object.visible === true) && (_vector.z >= -1 && _vector.z <= 1) && (object.layers.test(camera.layers) === true);
|
|
94
|
+
object.element.style.display = (visible === true) ? '' : 'none';
|
|
95
|
+
if (visible === true) {
|
|
96
|
+
object.onBeforeRender(this, scene, camera);
|
|
97
|
+
const element = object.element;
|
|
98
|
+
element.style.transform = 'translate(' + (-100 * object.center.x) + '%,' + (-100 * object.center.y) + '%)' + 'translate(' + (_vector.x * this._widthHalf + this._widthHalf) + 'px,' + (-_vector.y * this._heightHalf + this._heightHalf) + 'px)';
|
|
99
|
+
if (element.parentNode !== this.domElement) {
|
|
100
|
+
this.domElement.appendChild(element);
|
|
101
|
+
}
|
|
102
|
+
object.onAfterRender(this, scene, camera);
|
|
103
|
+
}
|
|
104
|
+
const objectData = {
|
|
105
|
+
distanceToCameraSquared: this.getDistanceToSquared(camera, object)
|
|
106
|
+
};
|
|
107
|
+
this._cache.objects.set(object, objectData);
|
|
108
|
+
}
|
|
109
|
+
for (let i = 0, l = o.children.length; i < l; i++) {
|
|
110
|
+
this.renderObject(o.children[i], scene, camera);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
setSize(width, height) {
|
|
114
|
+
this._width = width;
|
|
115
|
+
this._height = height;
|
|
116
|
+
this._widthHalf = this._width / 2;
|
|
117
|
+
this._heightHalf = this._height / 2;
|
|
118
|
+
this.domElement.style.width = width + 'px';
|
|
119
|
+
this.domElement.style.height = height + 'px';
|
|
120
|
+
}
|
|
121
|
+
zOrder(scene) {
|
|
122
|
+
const sorted = this.filterAndFlatten(scene).sort((a, b) => {
|
|
123
|
+
if (a.renderOrder !== b.renderOrder) {
|
|
124
|
+
return b.renderOrder - a.renderOrder;
|
|
125
|
+
}
|
|
126
|
+
const distanceA = this._cache.objects.get(a).distanceToCameraSquared;
|
|
127
|
+
const distanceB = this._cache.objects.get(b).distanceToCameraSquared;
|
|
128
|
+
return distanceA - distanceB;
|
|
129
|
+
});
|
|
130
|
+
const zMax = sorted.length;
|
|
131
|
+
for (let i = 0, l = sorted.length; i < l; i++) {
|
|
132
|
+
sorted[i].element.style.zIndex = (zMax - i) + '';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.CSS2DRenderer = CSS2DRenderer;
|
|
137
|
+
//# sourceMappingURL=CSS2DRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSS2DRenderer.js","sourceRoot":"","sources":["../../src/three/CSS2DRenderer.ts"],"names":[],"mappings":";;;AAAA,iCAOe;AAEf,MAAM,WAAY,SAAQ,gBAAQ;IAO9B,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;QAC/C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;QAEvC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,wDAAwD;QAE7F,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE;YAClC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAW,EAAE,EAAE;gBAC1B,MAAM,MAAM,GAAG,CAAgB,CAAC;gBAEhC,IAAI,MAAM,CAAC,OAAO,YAAY,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,KAAK,IAAI,EAAE;oBACzE,MAAM,CAAC,OAAO,C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AAC,CAAC,WAAW,EAAE;gBACjC,OAAO,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC;aACxC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;YACrE,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;YAErE,OAAO,SAAS,GAAG,SAAS,CAAC;QAEjC,CAAC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;QAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3C,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;SACpD;IACL,CAAC;CAGJ;AAEqB,sCAAa"}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shapediver/viewer.features.drawing-tools",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
7
|
+
"license": "polyform-noncommercial-1.0.0",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"directories": {
|
|
10
|
+
"test": "__tests__"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"src",
|
|
15
|
+
"package.json",
|
|
16
|
+
"README.md",
|
|
17
|
+
"tsconfig.json"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/shapediver/Viewer.git"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"check": "tsc --noEmit",
|
|
28
|
+
"build": "bash ../../scripts/building/build.sh",
|
|
29
|
+
"build-watch": "bash ../../scripts/building/build-watch.sh",
|
|
30
|
+
"build-dep": "bash ../../scripts/building/build-dep.sh",
|
|
31
|
+
"build-current": "npm run build",
|
|
32
|
+
"doc": "typedoc"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/shapediver/Viewer/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/shapediver/Viewer#readme",
|
|
38
|
+
"typings": "dist/index.d.ts",
|
|
39
|
+
"jest": {
|
|
40
|
+
"preset": "ts-jest",
|
|
41
|
+
"testEnvironment": "node"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@shapediver/viewer": "3.1.0",
|
|
45
|
+
"@shapediver/viewer.features.interaction": "3.1.0",
|
|
46
|
+
"@shapediver/viewer.rendering-engine.rendering-engine-threejs": "3.1.0",
|
|
47
|
+
"@shapediver/viewer.shared.math": "3.1.0",
|
|
48
|
+
"@shapediver/viewer.shared.node-tree": "3.1.0",
|
|
49
|
+
"@shapediver/viewer.shared.services": "3.1.0",
|
|
50
|
+
"@shapediver/viewer.shared.types": "3.1.0",
|
|
51
|
+
"@types/three": "0.162.0",
|
|
52
|
+
"three": "0.162.0"
|
|
53
|
+
},
|
|
54
|
+
"gitHead": "dd31ab0806a3c45b52a52ce9df975199c170a3e8"
|
|
55
|
+
}
|