@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.
Files changed (209) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +161 -0
  3. package/dist/api/implementation/DrawingToolsApi.d.ts +31 -0
  4. package/dist/api/implementation/DrawingToolsApi.d.ts.map +1 -0
  5. package/dist/api/implementation/DrawingToolsApi.js +111 -0
  6. package/dist/api/implementation/DrawingToolsApi.js.map +1 -0
  7. package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts +10 -0
  8. package/dist/api/implementation/restrictions/AbstractRestrictionApi.d.ts.map +1 -0
  9. package/dist/api/implementation/restrictions/AbstractRestrictionApi.js +38 -0
  10. package/dist/api/implementation/restrictions/AbstractRestrictionApi.js.map +1 -0
  11. package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts +11 -0
  12. package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.d.ts.map +1 -0
  13. package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js +40 -0
  14. package/dist/api/implementation/restrictions/AbstractSnapRestrictionApi.js.map +1 -0
  15. package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.d.ts +7 -0
  16. package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.d.ts.map +1 -0
  17. package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.js +24 -0
  18. package/dist/api/implementation/restrictions/axis/AxisRestrictionApi.js.map +1 -0
  19. package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts +15 -0
  20. package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.d.ts.map +1 -0
  21. package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js +54 -0
  22. package/dist/api/implementation/restrictions/geometry/GeometryRestrictionApi.js.map +1 -0
  23. package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts +18 -0
  24. package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.d.ts.map +1 -0
  25. package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js +61 -0
  26. package/dist/api/implementation/restrictions/plane/PlaneRestrictionApi.js.map +1 -0
  27. package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts +10 -0
  28. package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.d.ts.map +1 -0
  29. package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js +40 -0
  30. package/dist/api/implementation/restrictions/plane/snap/AngularRestrictionApi.js.map +1 -0
  31. package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts +10 -0
  32. package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.d.ts.map +1 -0
  33. package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js +40 -0
  34. package/dist/api/implementation/restrictions/plane/snap/GridRestrictionApi.js.map +1 -0
  35. package/dist/api/interfaces/IDrawingToolsApi.d.ts +89 -0
  36. package/dist/api/interfaces/IDrawingToolsApi.d.ts.map +1 -0
  37. package/dist/api/interfaces/IDrawingToolsApi.js +3 -0
  38. package/dist/api/interfaces/IDrawingToolsApi.js.map +1 -0
  39. package/dist/api/interfaces/IRestrictionApi.d.ts +11 -0
  40. package/dist/api/interfaces/IRestrictionApi.d.ts.map +1 -0
  41. package/dist/api/interfaces/IRestrictionApi.js +3 -0
  42. package/dist/api/interfaces/IRestrictionApi.js.map +1 -0
  43. package/dist/api/interfaces/ISnapRestrictionApi.d.ts +13 -0
  44. package/dist/api/interfaces/ISnapRestrictionApi.d.ts.map +1 -0
  45. package/dist/api/interfaces/ISnapRestrictionApi.js +3 -0
  46. package/dist/api/interfaces/ISnapRestrictionApi.js.map +1 -0
  47. package/dist/business/implementation/DrawingToolsManager.d.ts +95 -0
  48. package/dist/business/implementation/DrawingToolsManager.d.ts.map +1 -0
  49. package/dist/business/implementation/DrawingToolsManager.js +544 -0
  50. package/dist/business/implementation/DrawingToolsManager.js.map +1 -0
  51. package/dist/business/implementation/managers/HistoryManager.d.ts +19 -0
  52. package/dist/business/implementation/managers/HistoryManager.d.ts.map +1 -0
  53. package/dist/business/implementation/managers/HistoryManager.js +89 -0
  54. package/dist/business/implementation/managers/HistoryManager.js.map +1 -0
  55. package/dist/business/implementation/managers/TextVisualizationManager.d.ts +14 -0
  56. package/dist/business/implementation/managers/TextVisualizationManager.d.ts.map +1 -0
  57. package/dist/business/implementation/managers/TextVisualizationManager.js +228 -0
  58. package/dist/business/implementation/managers/TextVisualizationManager.js.map +1 -0
  59. package/dist/business/implementation/managers/geometry/GeometryManager.d.ts +23 -0
  60. package/dist/business/implementation/managers/geometry/GeometryManager.d.ts.map +1 -0
  61. package/dist/business/implementation/managers/geometry/GeometryManager.js +82 -0
  62. package/dist/business/implementation/managers/geometry/GeometryManager.js.map +1 -0
  63. package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts +73 -0
  64. package/dist/business/implementation/managers/geometry/GeometryMathManager.d.ts.map +1 -0
  65. package/dist/business/implementation/managers/geometry/GeometryMathManager.js +230 -0
  66. package/dist/business/implementation/managers/geometry/GeometryMathManager.js.map +1 -0
  67. package/dist/business/implementation/managers/geometry/GeometryState.d.ts +46 -0
  68. package/dist/business/implementation/managers/geometry/GeometryState.d.ts.map +1 -0
  69. package/dist/business/implementation/managers/geometry/GeometryState.js +323 -0
  70. package/dist/business/implementation/managers/geometry/GeometryState.js.map +1 -0
  71. package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts +16 -0
  72. package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.d.ts.map +1 -0
  73. package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js +157 -0
  74. package/dist/business/implementation/managers/geometry/helpers/GeometryManagerHelper.js.map +1 -0
  75. package/dist/business/implementation/managers/interaction/EventManager.d.ts +26 -0
  76. package/dist/business/implementation/managers/interaction/EventManager.d.ts.map +1 -0
  77. package/dist/business/implementation/managers/interaction/EventManager.js +63 -0
  78. package/dist/business/implementation/managers/interaction/EventManager.js.map +1 -0
  79. package/dist/business/implementation/managers/interaction/InteractionManager.d.ts +39 -0
  80. package/dist/business/implementation/managers/interaction/InteractionManager.d.ts.map +1 -0
  81. package/dist/business/implementation/managers/interaction/InteractionManager.js +237 -0
  82. package/dist/business/implementation/managers/interaction/InteractionManager.js.map +1 -0
  83. package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts +19 -0
  84. package/dist/business/implementation/managers/interaction/RestrictionManager.d.ts.map +1 -0
  85. package/dist/business/implementation/managers/interaction/RestrictionManager.js +117 -0
  86. package/dist/business/implementation/managers/interaction/RestrictionManager.js.map +1 -0
  87. package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.d.ts +10 -0
  88. package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.d.ts.map +1 -0
  89. package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js +52 -0
  90. package/dist/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.js.map +1 -0
  91. package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts +14 -0
  92. package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.d.ts.map +1 -0
  93. package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js +135 -0
  94. package/dist/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.js.map +1 -0
  95. package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.d.ts +16 -0
  96. package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.d.ts.map +1 -0
  97. package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js +113 -0
  98. package/dist/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.js.map +1 -0
  99. package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.d.ts +58 -0
  100. package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.d.ts.map +1 -0
  101. package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js +377 -0
  102. package/dist/business/implementation/managers/interaction/helpers/InteractionManagerHelper.js.map +1 -0
  103. package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts +19 -0
  104. package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.d.ts.map +1 -0
  105. package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js +105 -0
  106. package/dist/business/implementation/managers/interaction/restrictions/AbstractRestriction.js.map +1 -0
  107. package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.d.ts +22 -0
  108. package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.d.ts.map +1 -0
  109. package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.js +96 -0
  110. package/dist/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.js.map +1 -0
  111. package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts +39 -0
  112. package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.d.ts.map +1 -0
  113. package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js +215 -0
  114. package/dist/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.js.map +1 -0
  115. package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts +58 -0
  116. package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.d.ts.map +1 -0
  117. package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js +180 -0
  118. package/dist/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.js.map +1 -0
  119. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts +38 -0
  120. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.d.ts.map +1 -0
  121. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js +308 -0
  122. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.js.map +1 -0
  123. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts +37 -0
  124. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.d.ts.map +1 -0
  125. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js +228 -0
  126. package/dist/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.js.map +1 -0
  127. package/dist/business/implementation/utils/numberCleaner.d.ts +2 -0
  128. package/dist/business/implementation/utils/numberCleaner.d.ts.map +1 -0
  129. package/dist/business/implementation/utils/numberCleaner.js +9 -0
  130. package/dist/business/implementation/utils/numberCleaner.js.map +1 -0
  131. package/dist/business/interfaces/IDrawingToolsManager.d.ts +270 -0
  132. package/dist/business/interfaces/IDrawingToolsManager.d.ts.map +1 -0
  133. package/dist/business/interfaces/IDrawingToolsManager.js +16 -0
  134. package/dist/business/interfaces/IDrawingToolsManager.js.map +1 -0
  135. package/dist/business/interfaces/IManager.d.ts +4 -0
  136. package/dist/business/interfaces/IManager.d.ts.map +1 -0
  137. package/dist/business/interfaces/IManager.js +3 -0
  138. package/dist/business/interfaces/IManager.js.map +1 -0
  139. package/dist/business/interfaces/IRestriction.d.ts +41 -0
  140. package/dist/business/interfaces/IRestriction.d.ts.map +1 -0
  141. package/dist/business/interfaces/IRestriction.js +13 -0
  142. package/dist/business/interfaces/IRestriction.js.map +1 -0
  143. package/dist/business/interfaces/IRestrictionBase.d.ts +19 -0
  144. package/dist/business/interfaces/IRestrictionBase.d.ts.map +1 -0
  145. package/dist/business/interfaces/IRestrictionBase.js +5 -0
  146. package/dist/business/interfaces/IRestrictionBase.js.map +1 -0
  147. package/dist/business/interfaces/ISnapRestriction.d.ts +50 -0
  148. package/dist/business/interfaces/ISnapRestriction.d.ts.map +1 -0
  149. package/dist/business/interfaces/ISnapRestriction.js +4 -0
  150. package/dist/business/interfaces/ISnapRestriction.js.map +1 -0
  151. package/dist/business/interfaces/events/EventResponseMapping.d.ts +19 -0
  152. package/dist/business/interfaces/events/EventResponseMapping.d.ts.map +1 -0
  153. package/dist/business/interfaces/events/EventResponseMapping.js +4 -0
  154. package/dist/business/interfaces/events/EventResponseMapping.js.map +1 -0
  155. package/dist/business/interfaces/events/IDrawingToolsEvent.d.ts +12 -0
  156. package/dist/business/interfaces/events/IDrawingToolsEvent.d.ts.map +1 -0
  157. package/dist/business/interfaces/events/IDrawingToolsEvent.js +3 -0
  158. package/dist/business/interfaces/events/IDrawingToolsEvent.js.map +1 -0
  159. package/dist/index.d.ts +32 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +45 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/three/CSS2DRenderer.d.ts +32 -0
  164. package/dist/three/CSS2DRenderer.d.ts.map +1 -0
  165. package/dist/three/CSS2DRenderer.js +137 -0
  166. package/dist/three/CSS2DRenderer.js.map +1 -0
  167. package/package.json +55 -0
  168. package/src/api/implementation/DrawingToolsApi.ts +135 -0
  169. package/src/api/implementation/restrictions/AbstractRestrictionApi.ts +34 -0
  170. package/src/api/implementation/restrictions/AbstractSnapRestrictionApi.ts +36 -0
  171. package/src/api/implementation/restrictions/axis/AxisRestrictionApi.ts +19 -0
  172. package/src/api/implementation/restrictions/geometry/GeometryRestrictionApi.ts +56 -0
  173. package/src/api/implementation/restrictions/plane/PlaneRestrictionApi.ts +63 -0
  174. package/src/api/implementation/restrictions/plane/snap/AngularRestrictionApi.ts +35 -0
  175. package/src/api/implementation/restrictions/plane/snap/GridRestrictionApi.ts +35 -0
  176. package/src/api/interfaces/IDrawingToolsApi.ts +99 -0
  177. package/src/api/interfaces/IRestrictionApi.ts +15 -0
  178. package/src/api/interfaces/ISnapRestrictionApi.ts +18 -0
  179. package/src/business/implementation/DrawingToolsManager.ts +619 -0
  180. package/src/business/implementation/managers/HistoryManager.ts +101 -0
  181. package/src/business/implementation/managers/TextVisualizationManager.ts +245 -0
  182. package/src/business/implementation/managers/geometry/GeometryManager.ts +95 -0
  183. package/src/business/implementation/managers/geometry/GeometryMathManager.ts +273 -0
  184. package/src/business/implementation/managers/geometry/GeometryState.ts +436 -0
  185. package/src/business/implementation/managers/geometry/helpers/GeometryManagerHelper.ts +170 -0
  186. package/src/business/implementation/managers/interaction/EventManager.ts +80 -0
  187. package/src/business/implementation/managers/interaction/InteractionManager.ts +268 -0
  188. package/src/business/implementation/managers/interaction/RestrictionManager.ts +135 -0
  189. package/src/business/implementation/managers/interaction/handlers/DeletionInteractionHandler.ts +48 -0
  190. package/src/business/implementation/managers/interaction/handlers/InsertionInteractionHandler.ts +149 -0
  191. package/src/business/implementation/managers/interaction/handlers/MidPointInteractionHandler.ts +127 -0
  192. package/src/business/implementation/managers/interaction/helpers/InteractionManagerHelper.ts +411 -0
  193. package/src/business/implementation/managers/interaction/restrictions/AbstractRestriction.ts +99 -0
  194. package/src/business/implementation/managers/interaction/restrictions/axis/AxisRestriction.ts +107 -0
  195. package/src/business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction.ts +237 -0
  196. package/src/business/implementation/managers/interaction/restrictions/plane/PlaneRestriction.ts +257 -0
  197. package/src/business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction.ts +384 -0
  198. package/src/business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction.ts +262 -0
  199. package/src/business/implementation/utils/numberCleaner.ts +5 -0
  200. package/src/business/interfaces/IDrawingToolsManager.ts +313 -0
  201. package/src/business/interfaces/IManager.ts +7 -0
  202. package/src/business/interfaces/IRestriction.ts +64 -0
  203. package/src/business/interfaces/IRestrictionBase.ts +33 -0
  204. package/src/business/interfaces/ISnapRestriction.ts +70 -0
  205. package/src/business/interfaces/events/EventResponseMapping.ts +19 -0
  206. package/src/business/interfaces/events/IDrawingToolsEvent.ts +16 -0
  207. package/src/index.ts +72 -0
  208. package/src/three/CSS2DRenderer.ts +212 -0
  209. package/tsconfig.json +17 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeometryRestrictionApi.js","sourceRoot":"","sources":["../../../../../src/api/implementation/restrictions/geometry/GeometryRestrictionApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAAmE;AAInE,MAAa,sBAAuB,SAAQ,+CAAsB;IAK9D,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAAgC;QACxC,KAAK,CAAC,WAAW,CAAC,CAAC;QATvB,yBAAyB;QAEzB,8DAAmD;QAQ/C,uBAAA,IAAI,+CAAwB,WAAW,MAAA,CAAC;IAC5C,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,WAAW;QAClB,OAAO,uBAAA,IAAI,mDAAqB,CAAC,WAAW,CAAC;IACjD,CAAC;IAED,IAAW,WAAW,CAAC,KAAc;QACjC,uBAAA,IAAI,mDAAqB,CAAC,WAAW,GAAG,KAAK,CAAC;IAClD,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,uBAAA,IAAI,mDAAqB,CAAC,WAAW,CAAC;IACjD,CAAC;IAED,IAAW,WAAW,CAAC,KAAc;QACjC,uBAAA,IAAI,mDAAqB,CAAC,WAAW,GAAG,KAAK,CAAC;IAClD,CAAC;IAED,IAAW,cAAc;QACrB,OAAO,uBAAA,IAAI,mDAAqB,CAAC,cAAc,CAAC;IACpD,CAAC;IAED,IAAW,cAAc,CAAC,KAAc;QACpC,uBAAA,IAAI,mDAAqB,CAAC,cAAc,GAAG,KAAK,CAAC;IACrD,CAAC;IAED,4CAA4C;IAE5C,6BAA6B;IAEtB,WAAW,CAAC,KAAkB;QACjC,uBAAA,IAAI,mDAAqB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CAGJ;AAnDD,wDAmDC"}
@@ -0,0 +1,18 @@
1
+ import { AbstractRestrictionApi } from '../AbstractRestrictionApi';
2
+ import { AngularRestrictionApi } from './snap/AngularRestrictionApi';
3
+ import { GridRestrictionApi } from './snap/GridRestrictionApi';
4
+ import { PlaneRestriction } from '../../../../business/implementation/managers/interaction/restrictions/plane/PlaneRestriction';
5
+ import { vec3 } from 'gl-matrix';
6
+ export declare class PlaneRestrictionApi extends AbstractRestrictionApi {
7
+ #private;
8
+ constructor(restriction: PlaneRestriction);
9
+ get angularRestrictionApi(): AngularRestrictionApi;
10
+ get gridRestrictionApi(): GridRestrictionApi;
11
+ get vectorU(): vec3;
12
+ set vectorU(value: vec3);
13
+ get vectorV(): vec3;
14
+ set vectorV(value: vec3);
15
+ get origin(): vec3;
16
+ set origin(value: vec3);
17
+ }
18
+ //# sourceMappingURL=PlaneRestrictionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaneRestrictionApi.d.ts","sourceRoot":"","sources":["../../../../../src/api/implementation/restrictions/plane/PlaneRestrictionApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8FAA8F,CAAC;AAChI,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,mBAAoB,SAAQ,sBAAsB;;gBAW/C,WAAW,EAAE,gBAAgB;IAYzC,IAAW,qBAAqB,IAAI,qBAAqB,CAExD;IAED,IAAW,kBAAkB,IAAI,kBAAkB,CAElD;IAED,IAAW,OAAO,IAAI,IAAI,CAEzB;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,IAAI,EAE7B;IAED,IAAW,OAAO,IAAI,IAAI,CAEzB;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,IAAI,EAE7B;IAED,IAAW,MAAM,IAAI,IAAI,CAExB;IAED,IAAW,MAAM,CAAC,KAAK,EAAE,IAAI,EAE5B;CAGJ"}
@@ -0,0 +1,61 @@
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 _PlaneRestrictionApi_angularRestrictionApi, _PlaneRestrictionApi_gridRestrictionApi, _PlaneRestrictionApi_planeRestriction;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.PlaneRestrictionApi = void 0;
16
+ const AbstractRestrictionApi_1 = require("../AbstractRestrictionApi");
17
+ const AngularRestrictionApi_1 = require("./snap/AngularRestrictionApi");
18
+ const GridRestrictionApi_1 = require("./snap/GridRestrictionApi");
19
+ class PlaneRestrictionApi extends AbstractRestrictionApi_1.AbstractRestrictionApi {
20
+ // #endregion Properties (3)
21
+ // #region Constructors (1)
22
+ constructor(restriction) {
23
+ super(restriction);
24
+ // #region Properties (3)
25
+ _PlaneRestrictionApi_angularRestrictionApi.set(this, void 0);
26
+ _PlaneRestrictionApi_gridRestrictionApi.set(this, void 0);
27
+ _PlaneRestrictionApi_planeRestriction.set(this, void 0);
28
+ __classPrivateFieldSet(this, _PlaneRestrictionApi_planeRestriction, restriction, "f");
29
+ __classPrivateFieldSet(this, _PlaneRestrictionApi_gridRestrictionApi, new GridRestrictionApi_1.GridRestrictionApi(restriction.gridRestriction), "f");
30
+ __classPrivateFieldSet(this, _PlaneRestrictionApi_angularRestrictionApi, new AngularRestrictionApi_1.AngularRestrictionApi(restriction.angularRestriction), "f");
31
+ }
32
+ // #endregion Constructors (1)
33
+ // #region Public Getters And Setters (8)
34
+ get angularRestrictionApi() {
35
+ return __classPrivateFieldGet(this, _PlaneRestrictionApi_angularRestrictionApi, "f");
36
+ }
37
+ get gridRestrictionApi() {
38
+ return __classPrivateFieldGet(this, _PlaneRestrictionApi_gridRestrictionApi, "f");
39
+ }
40
+ get vectorU() {
41
+ return __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").vectorU;
42
+ }
43
+ set vectorU(value) {
44
+ __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").vectorU = value;
45
+ }
46
+ get vectorV() {
47
+ return __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").vectorV;
48
+ }
49
+ set vectorV(value) {
50
+ __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").vectorV = value;
51
+ }
52
+ get origin() {
53
+ return __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").origin;
54
+ }
55
+ set origin(value) {
56
+ __classPrivateFieldGet(this, _PlaneRestrictionApi_planeRestriction, "f").origin = value;
57
+ }
58
+ }
59
+ exports.PlaneRestrictionApi = PlaneRestrictionApi;
60
+ _PlaneRestrictionApi_angularRestrictionApi = new WeakMap(), _PlaneRestrictionApi_gridRestrictionApi = new WeakMap(), _PlaneRestrictionApi_planeRestriction = new WeakMap();
61
+ //# sourceMappingURL=PlaneRestrictionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaneRestrictionApi.js","sourceRoot":"","sources":["../../../../../src/api/implementation/restrictions/plane/PlaneRestrictionApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAAmE;AACnE,wEAAqE;AACrE,kEAA+D;AAI/D,MAAa,mBAAoB,SAAQ,+CAAsB;IAO3D,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAA6B;QACrC,KAAK,CAAC,WAAW,CAAC,CAAC;QAXvB,yBAAyB;QAEzB,6DAAuD;QACvD,0DAAiD;QACjD,wDAA6C;QAQzC,uBAAA,IAAI,yCAAqB,WAAW,MAAA,CAAC;QAErC,uBAAA,IAAI,2CAAuB,IAAI,uCAAkB,CAAC,WAAW,CAAC,eAAe,CAAC,MAAA,CAAC;QAC/E,uBAAA,IAAI,8CAA0B,IAAI,6CAAqB,CAAC,WAAW,CAAC,kBAAkB,CAAC,MAAA,CAAC;IAC5F,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,qBAAqB;QAC5B,OAAO,uBAAA,IAAI,kDAAuB,CAAC;IACvC,CAAC;IAED,IAAW,kBAAkB;QACzB,OAAO,uBAAA,IAAI,+CAAoB,CAAC;IACpC,CAAC;IAED,IAAW,OAAO;QACd,OAAO,uBAAA,IAAI,6CAAkB,CAAC,OAAO,CAAC;IAC1C,CAAC;IAED,IAAW,OAAO,CAAC,KAAW;QAC1B,uBAAA,IAAI,6CAAkB,CAAC,OAAO,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED,IAAW,OAAO;QACd,OAAO,uBAAA,IAAI,6CAAkB,CAAC,OAAO,CAAC;IAC1C,CAAC;IAED,IAAW,OAAO,CAAC,KAAW;QAC1B,uBAAA,IAAI,6CAAkB,CAAC,OAAO,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED,IAAW,MAAM;QACb,OAAO,uBAAA,IAAI,6CAAkB,CAAC,MAAM,CAAC;IACzC,CAAC;IAED,IAAW,MAAM,CAAC,KAAW;QACzB,uBAAA,IAAI,6CAAkB,CAAC,MAAM,GAAG,KAAK,CAAC;IAC1C,CAAC;CAGJ;AAxDD,kDAwDC"}
@@ -0,0 +1,10 @@
1
+ import { AbstractSnapRestrictionApi } from '../../AbstractSnapRestrictionApi';
2
+ import { AngularRestriction } from '../../../../../business/implementation/managers/interaction/restrictions/plane/snap/AngularRestriction';
3
+ export declare class AngularRestrictionApi extends AbstractSnapRestrictionApi {
4
+ #private;
5
+ constructor(restriction: AngularRestriction);
6
+ get angleStep(): number;
7
+ set angleStep(value: number);
8
+ get angleStepEditable(): boolean;
9
+ }
10
+ //# sourceMappingURL=AngularRestrictionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AngularRestrictionApi.d.ts","sourceRoot":"","sources":["../../../../../../src/api/implementation/restrictions/plane/snap/AngularRestrictionApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wGAAwG,CAAC;AAE5I,qBAAa,qBAAsB,SAAQ,0BAA0B;;gBASrD,WAAW,EAAE,kBAAkB;IAS3C,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,MAAM,EAEjC;IAED,IAAW,iBAAiB,IAAI,OAAO,CAEtC;CAGJ"}
@@ -0,0 +1,40 @@
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 _AngularRestrictionApi_angularRestriction;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AngularRestrictionApi = void 0;
16
+ const AbstractSnapRestrictionApi_1 = require("../../AbstractSnapRestrictionApi");
17
+ class AngularRestrictionApi extends AbstractSnapRestrictionApi_1.AbstractSnapRestrictionApi {
18
+ // #endregion Properties (1)
19
+ // #region Constructors (1)
20
+ constructor(restriction) {
21
+ super(restriction);
22
+ // #region Properties (1)
23
+ _AngularRestrictionApi_angularRestriction.set(this, void 0);
24
+ __classPrivateFieldSet(this, _AngularRestrictionApi_angularRestriction, restriction, "f");
25
+ }
26
+ // #endregion Constructors (1)
27
+ // #region Public Getters And Setters (2)
28
+ get angleStep() {
29
+ return __classPrivateFieldGet(this, _AngularRestrictionApi_angularRestriction, "f").angleStep;
30
+ }
31
+ set angleStep(value) {
32
+ __classPrivateFieldGet(this, _AngularRestrictionApi_angularRestriction, "f").angleStep = value;
33
+ }
34
+ get angleStepEditable() {
35
+ return __classPrivateFieldGet(this, _AngularRestrictionApi_angularRestriction, "f").angleStepEditable;
36
+ }
37
+ }
38
+ exports.AngularRestrictionApi = AngularRestrictionApi;
39
+ _AngularRestrictionApi_angularRestriction = new WeakMap();
40
+ //# sourceMappingURL=AngularRestrictionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AngularRestrictionApi.js","sourceRoot":"","sources":["../../../../../../src/api/implementation/restrictions/plane/snap/AngularRestrictionApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iFAA8E;AAG9E,MAAa,qBAAsB,SAAQ,uDAA0B;IAKjE,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAA+B;QACvC,KAAK,CAAC,WAAW,CAAC,CAAC;QATvB,yBAAyB;QAEzB,4DAAiD;QAQ7C,uBAAA,IAAI,6CAAuB,WAAW,MAAA,CAAC;IAC3C,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,SAAS;QAChB,OAAO,uBAAA,IAAI,iDAAoB,CAAC,SAAS,CAAC;IAC9C,CAAC;IAED,IAAW,SAAS,CAAC,KAAa;QAC9B,uBAAA,IAAI,iDAAoB,CAAC,SAAS,GAAG,KAAK,CAAC;IAC/C,CAAC;IAED,IAAW,iBAAiB;QACxB,OAAO,uBAAA,IAAI,iDAAoB,CAAC,iBAAiB,CAAC;IACtD,CAAC;CAGJ;AA/BD,sDA+BC"}
@@ -0,0 +1,10 @@
1
+ import { AbstractSnapRestrictionApi } from '../../AbstractSnapRestrictionApi';
2
+ import { GridRestriction } from '../../../../../business/implementation/managers/interaction/restrictions/plane/snap/GridRestriction';
3
+ export declare class GridRestrictionApi extends AbstractSnapRestrictionApi {
4
+ #private;
5
+ constructor(restriction: GridRestriction);
6
+ get gridUnit(): number;
7
+ set gridUnit(value: number);
8
+ get gridUnitEditable(): boolean;
9
+ }
10
+ //# sourceMappingURL=GridRestrictionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridRestrictionApi.d.ts","sourceRoot":"","sources":["../../../../../../src/api/implementation/restrictions/plane/snap/GridRestrictionApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,qGAAqG,CAAC;AAEtI,qBAAa,kBAAmB,SAAQ,0BAA0B;;gBASlD,WAAW,EAAE,eAAe;IASxC,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED,IAAW,gBAAgB,IAAI,OAAO,CAErC;CAGJ"}
@@ -0,0 +1,40 @@
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 _GridRestrictionApi_gridRestriction;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GridRestrictionApi = void 0;
16
+ const AbstractSnapRestrictionApi_1 = require("../../AbstractSnapRestrictionApi");
17
+ class GridRestrictionApi extends AbstractSnapRestrictionApi_1.AbstractSnapRestrictionApi {
18
+ // #endregion Properties (1)
19
+ // #region Constructors (1)
20
+ constructor(restriction) {
21
+ super(restriction);
22
+ // #region Properties (1)
23
+ _GridRestrictionApi_gridRestriction.set(this, void 0);
24
+ __classPrivateFieldSet(this, _GridRestrictionApi_gridRestriction, restriction, "f");
25
+ }
26
+ // #endregion Constructors (1)
27
+ // #region Public Getters And Setters (2)
28
+ get gridUnit() {
29
+ return __classPrivateFieldGet(this, _GridRestrictionApi_gridRestriction, "f").gridUnit;
30
+ }
31
+ set gridUnit(value) {
32
+ __classPrivateFieldGet(this, _GridRestrictionApi_gridRestriction, "f").gridUnit = value;
33
+ }
34
+ get gridUnitEditable() {
35
+ return __classPrivateFieldGet(this, _GridRestrictionApi_gridRestriction, "f").gridUnitEditable;
36
+ }
37
+ }
38
+ exports.GridRestrictionApi = GridRestrictionApi;
39
+ _GridRestrictionApi_gridRestriction = new WeakMap();
40
+ //# sourceMappingURL=GridRestrictionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridRestrictionApi.js","sourceRoot":"","sources":["../../../../../../src/api/implementation/restrictions/plane/snap/GridRestrictionApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iFAA8E;AAG9E,MAAa,kBAAmB,SAAQ,uDAA0B;IAK9D,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAA4B;QACpC,KAAK,CAAC,WAAW,CAAC,CAAC;QATvB,yBAAyB;QAEzB,sDAA2C;QAQvC,uBAAA,IAAI,uCAAoB,WAAW,MAAA,CAAC;IACxC,CAAC;IAED,8BAA8B;IAE9B,yCAAyC;IAEzC,IAAW,QAAQ;QACf,OAAO,uBAAA,IAAI,2CAAiB,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED,IAAW,QAAQ,CAAC,KAAa;QAC7B,uBAAA,IAAI,2CAAiB,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED,IAAW,gBAAgB;QACvB,OAAO,uBAAA,IAAI,2CAAiB,CAAC,gBAAgB,CAAC;IAClD,CAAC;CAGJ;AA/BD,gDA+BC"}
@@ -0,0 +1,89 @@
1
+ import { AxisRestrictionProperties } from '../../business/implementation/managers/interaction/restrictions/axis/AxisRestriction';
2
+ import { GeometryRestrictionProperties } from '../../business/implementation/managers/interaction/restrictions/geometry/GeometryRestriction';
3
+ import { IRestrictionApi } from './IRestrictionApi';
4
+ import { PlaneRestrictionProperties } from '../../business/implementation/managers/interaction/restrictions/plane/PlaneRestriction';
5
+ import { PointsData } from '../../business/interfaces/IDrawingToolsManager';
6
+ import { RestrictionProperties } from '../../business/interfaces/IRestriction';
7
+ import { vec3 } from 'gl-matrix';
8
+ export interface IDrawingToolsApi {
9
+ /**
10
+ * Check if the drawing tool is closed.
11
+ */
12
+ readonly closed: boolean;
13
+ /**
14
+ * The points data of the drawing tool.
15
+ */
16
+ readonly pointsData: PointsData;
17
+ /**
18
+ * The restrictions of the drawing tool.
19
+ */
20
+ readonly restrictions: {
21
+ [key: string]: IRestrictionApi;
22
+ };
23
+ /**
24
+ * Show the distance labels of the drawing tool.
25
+ */
26
+ showDistanceLabels: boolean;
27
+ /**
28
+ * Show the point labels of the drawing tool.
29
+ */
30
+ showPointLabels: boolean;
31
+ /**
32
+ * Add a point to the drawing tool.
33
+ *
34
+ * @param index The index of the point in the position array.
35
+ * @param position The position of the point.
36
+ */
37
+ addPoint(index: number, position?: vec3 | undefined): void;
38
+ /**
39
+ * Add a ray tracing intersection restriction to the drawing tool.
40
+ *
41
+ * @param properties The properties of the restriction.
42
+ * @param token The token of the restriction.
43
+ * @returns The api of the restriction.
44
+ */
45
+ addRestriction(properties: RestrictionProperties | PlaneRestrictionProperties | GeometryRestrictionProperties | AxisRestrictionProperties, token?: string): IRestrictionApi | undefined;
46
+ /**
47
+ * Check if the drawing tool can redo the last action.
48
+ */
49
+ canRedo(): boolean;
50
+ /**
51
+ * Check if the drawing tool can undo the last action.
52
+ */
53
+ canUndo(): boolean;
54
+ /**
55
+ * Cancel the drawing tool.
56
+ */
57
+ cancel(): void;
58
+ /**
59
+ * Close the drawing tool.
60
+ */
61
+ close(): void;
62
+ /**
63
+ * Redo the last action of the drawing tool.
64
+ */
65
+ redo(): void;
66
+ /**
67
+ * Remove a point from the drawing tool.
68
+ *
69
+ * @param index The index of the point in the position array.
70
+ */
71
+ removePoint(index: number): void;
72
+ /**
73
+ * Remove a restriction from the drawing tool.
74
+ *
75
+ * @param id
76
+ */
77
+ removeRestriction(id: string): void;
78
+ /**
79
+ * Undo the last action of the drawing tool.
80
+ */
81
+ undo(): void;
82
+ /**
83
+ * Receive an update of the drawing tool.
84
+ *
85
+ * @returns The points data of the drawing tool.
86
+ */
87
+ update(): PointsData | undefined;
88
+ }
89
+ //# sourceMappingURL=IDrawingToolsApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDrawingToolsApi.d.ts","sourceRoot":"","sources":["../../../src/api/interfaces/IDrawingToolsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sFAAsF,CAAC;AACjI,OAAO,EAAE,6BAA6B,EAAE,MAAM,8FAA8F,CAAC;AAC7I,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wFAAwF,CAAC;AACpI,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E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ceMappingURL=IDrawingToolsApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDrawingToolsApi.js","sourceRoot":"","sources":["../../../src/api/interfaces/IDrawingToolsApi.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface IRestrictionApi {
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
+ //# sourceMappingURL=IRestrictionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRestrictionApi.d.ts","sourceRoot":"","sources":["../../../src/api/interfaces/IRestrictionApi.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAG5B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAGpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRestrictionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRestrictionApi.js","sourceRoot":"","sources":["../../../src/api/interfaces/IRestrictionApi.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { IRestrictionApi } from './IRestrictionApi';
2
+ export interface ISnapRestrictionApi extends IRestrictionApi {
3
+ /**
4
+ * If the enabling or disabling of the restriction is allowed to the end user.
5
+ * If it is not editable, the default value for enabling or disabling the restriction is used.
6
+ */
7
+ readonly enabledEditable: boolean;
8
+ /**
9
+ * The priority of the restriction.
10
+ */
11
+ priority: number;
12
+ }
13
+ //# sourceMappingURL=ISnapRestrictionApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISnapRestrictionApi.d.ts","sourceRoot":"","sources":["../../../src/api/interfaces/ISnapRestrictionApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAGxD;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAGpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ISnapRestrictionApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISnapRestrictionApi.js","sourceRoot":"","sources":["../../../src/api/interfaces/ISnapRestrictionApi.ts"],"names":[],"mappings":""}
@@ -0,0 +1,95 @@
1
+ import { Callbacks, DefaultTextures, IDrawingToolsManager, MATERIAL_INDEX, PointsData, Settings, SettingsOptional } from '../interfaces/IDrawingToolsManager';
2
+ import { ITreeNode, IViewportApi } from '@shapediver/viewer';
3
+ import { GeometryManager } from './managers/geometry/GeometryManager';
4
+ import { GeometryMathManager } from './managers/geometry/GeometryMathManager';
5
+ import { GeometryState } from './managers/geometry/GeometryState';
6
+ import { HistoryManager } from './managers/HistoryManager';
7
+ import { InteractionManager } from './managers/interaction/InteractionManager';
8
+ import { IRay } from '@shapediver/viewer.features.interaction';
9
+ import { IRestriction, RestrictionProperties } from '../interfaces/IRestriction';
10
+ import { RestrictionManager } from './managers/interaction/RestrictionManager';
11
+ import { TextVisualizationManager } from './managers/TextVisualizationManager';
12
+ import { vec3 } from 'gl-matrix';
13
+ export declare class DrawingToolsManager implements IDrawingToolsManager {
14
+ #private;
15
+ constructor(viewport: IViewportApi, callbacks: Callbacks, settings: SettingsOptional, defaultTextures?: DefaultTextures);
16
+ get callbacks(): Callbacks;
17
+ get closed(): boolean;
18
+ get defaultTextures(): DefaultTextures;
19
+ get geometryManager(): GeometryManager;
20
+ get geometryMathManager(): GeometryMathManager;
21
+ get geometryState(): GeometryState;
22
+ get historyManager(): HistoryManager;
23
+ get indicesArrayLines(): Uint8Array | null | undefined;
24
+ get insertionActive(): boolean;
25
+ get interactionManager(): InteractionManager;
26
+ get parentNode(): ITreeNode;
27
+ get positionArray(): Float32Array;
28
+ get restrictionManager(): RestrictionManager;
29
+ get restrictions(): {
30
+ [key: string]: IRestriction;
31
+ };
32
+ get settings(): Settings;
33
+ get showDistanceLabels(): boolean;
34
+ set showDistanceLabels(value: boolean);
35
+ get showPointLabels(): boolean;
36
+ set showPointLabels(value: boolean);
37
+ get textVisualizationManager(): TextVisualizationManager;
38
+ get uuid(): string;
39
+ get viewport(): IViewportApi;
40
+ /**
41
+ * Add a point to the drawing tool.
42
+ *
43
+ * @param index
44
+ * @param position
45
+ * @returns
46
+ */
47
+ addPoint(index: number, position?: vec3 | undefined, temporary?: boolean): void;
48
+ addPointTemporary(index: number, position?: vec3 | undefined): void;
49
+ /**
50
+ * Add a ray tracing intersection restriction to the drawing tool.
51
+ *
52
+ * @param planeProperties
53
+ * @returns
54
+ */
55
+ addRestriction(properties: RestrictionProperties, token?: string): string | undefined;
56
+ canRedo(): boolean;
57
+ canUndo(): boolean;
58
+ cancel(): void;
59
+ close(): void;
60
+ getPointsData(): PointsData;
61
+ keyPressed(key: string | string[]): boolean;
62
+ movePoint(index: number, position: vec3, temporary?: boolean): void;
63
+ movePointTemporary(index: number, position: vec3): void;
64
+ onDown(event: PointerEvent, ray: IRay): void;
65
+ onKeyDown(event: KeyboardEvent): void;
66
+ onKeyUp(event: KeyboardEvent): void;
67
+ onMove(event: PointerEvent, ray: IRay): void;
68
+ onOut(): void;
69
+ onUp(): void;
70
+ redo(): void;
71
+ /**
72
+ * Remove a point from the drawing tool.
73
+ *
74
+ * @param index
75
+ * @returns
76
+ */
77
+ removePoint(index: number, temporary?: boolean): void;
78
+ removePointTemporary(index: number): void;
79
+ removePoints(indices: number[]): void;
80
+ /**
81
+ * Remove a restriction from the drawing tool.
82
+ *
83
+ * @param token
84
+ */
85
+ removeRestriction(token: string): void;
86
+ resetMaterialIndices(): void;
87
+ startInsertion(): void;
88
+ undo(): void;
89
+ update(): PointsData | undefined;
90
+ updateMaterialIndex(index: number, materialIndex: MATERIAL_INDEX): void;
91
+ updateTextVisualization(): void;
92
+ private cleanSettings;
93
+ private keyPressCheck;
94
+ }
95
+ //# sourceMappingURL=DrawingToolsManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawingToolsManager.d.ts","sourceRoot":"","sources":["../../../src/business/implementation/DrawingToolsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,gBAAgB,EACnB,MAAM,oCAAoC,CAAC;AAU5C,OAAO,EAEH,SAAS,EACT,YAAY,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAoB,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,mBAAoB,YAAW,oBAAoB;;gBA0BhD,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,CAAC,EAAE,eAAe;IA8CvH,IAAW,SAAS,IAAI,SAAS,CAEhC;IAED,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,IAAW,eAAe,IAAI,eA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