@shapediver/viewer.rendering-engine.intersection-restriction-engine 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +3 -0
  3. package/dist/api/implementation/AbstractRestrictionApi.d.ts +10 -0
  4. package/dist/api/implementation/AbstractRestrictionApi.d.ts.map +1 -0
  5. package/dist/api/implementation/AbstractRestrictionApi.js +38 -0
  6. package/dist/api/implementation/AbstractRestrictionApi.js.map +1 -0
  7. package/dist/api/implementation/AbstractSnapRestrictionApi.d.ts +13 -0
  8. package/dist/api/implementation/AbstractSnapRestrictionApi.d.ts.map +1 -0
  9. package/dist/api/implementation/AbstractSnapRestrictionApi.js +47 -0
  10. package/dist/api/implementation/AbstractSnapRestrictionApi.js.map +1 -0
  11. package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.d.ts +7 -0
  12. package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.d.ts.map +1 -0
  13. package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.js +24 -0
  14. package/dist/api/implementation/camera_plane/CameraPlaneRestrictionApi.js.map +1 -0
  15. package/dist/api/implementation/geometry/GeometryRestrictionApi.d.ts +15 -0
  16. package/dist/api/implementation/geometry/GeometryRestrictionApi.d.ts.map +1 -0
  17. package/dist/api/implementation/geometry/GeometryRestrictionApi.js +54 -0
  18. package/dist/api/implementation/geometry/GeometryRestrictionApi.js.map +1 -0
  19. package/dist/api/implementation/line/LineRestrictionApi.d.ts +11 -0
  20. package/dist/api/implementation/line/LineRestrictionApi.d.ts.map +1 -0
  21. package/dist/api/implementation/line/LineRestrictionApi.js +40 -0
  22. package/dist/api/implementation/line/LineRestrictionApi.js.map +1 -0
  23. package/dist/api/implementation/plane/PlaneRestrictionApi.d.ts +20 -0
  24. package/dist/api/implementation/plane/PlaneRestrictionApi.d.ts.map +1 -0
  25. package/dist/api/implementation/plane/PlaneRestrictionApi.js +67 -0
  26. package/dist/api/implementation/plane/PlaneRestrictionApi.js.map +1 -0
  27. package/dist/api/implementation/plane/snap/AngularRestrictionApi.d.ts +10 -0
  28. package/dist/api/implementation/plane/snap/AngularRestrictionApi.d.ts.map +1 -0
  29. package/dist/api/implementation/plane/snap/AngularRestrictionApi.js +40 -0
  30. package/dist/api/implementation/plane/snap/AngularRestrictionApi.js.map +1 -0
  31. package/dist/api/implementation/plane/snap/AxisRestrictionApi.d.ts +7 -0
  32. package/dist/api/implementation/plane/snap/AxisRestrictionApi.d.ts.map +1 -0
  33. package/dist/api/implementation/plane/snap/AxisRestrictionApi.js +24 -0
  34. package/dist/api/implementation/plane/snap/AxisRestrictionApi.js.map +1 -0
  35. package/dist/api/implementation/plane/snap/GridRestrictionApi.d.ts +10 -0
  36. package/dist/api/implementation/plane/snap/GridRestrictionApi.d.ts.map +1 -0
  37. package/dist/api/implementation/plane/snap/GridRestrictionApi.js +40 -0
  38. package/dist/api/implementation/plane/snap/GridRestrictionApi.js.map +1 -0
  39. package/dist/api/implementation/point/PointRestrictionApi.d.ts +10 -0
  40. package/dist/api/implementation/point/PointRestrictionApi.d.ts.map +1 -0
  41. package/dist/api/implementation/point/PointRestrictionApi.js +37 -0
  42. package/dist/api/implementation/point/PointRestrictionApi.js.map +1 -0
  43. package/dist/api/interfaces/IRestrictionApi.d.ts +11 -0
  44. package/dist/api/interfaces/IRestrictionApi.d.ts.map +1 -0
  45. package/dist/api/interfaces/IRestrictionApi.js +3 -0
  46. package/dist/api/interfaces/IRestrictionApi.js.map +1 -0
  47. package/dist/api/interfaces/ISnapRestrictionApi.d.ts +13 -0
  48. package/dist/api/interfaces/ISnapRestrictionApi.d.ts.map +1 -0
  49. package/dist/api/interfaces/ISnapRestrictionApi.js +3 -0
  50. package/dist/api/interfaces/ISnapRestrictionApi.js.map +1 -0
  51. package/dist/implementation/EventManager.d.ts +26 -0
  52. package/dist/implementation/EventManager.d.ts.map +1 -0
  53. package/dist/implementation/EventManager.js +63 -0
  54. package/dist/implementation/EventManager.js.map +1 -0
  55. package/dist/implementation/GeometryMathManager.d.ts +82 -0
  56. package/dist/implementation/GeometryMathManager.d.ts.map +1 -0
  57. package/dist/implementation/GeometryMathManager.js +240 -0
  58. package/dist/implementation/GeometryMathManager.js.map +1 -0
  59. package/dist/implementation/RestrictionManager.d.ts +29 -0
  60. package/dist/implementation/RestrictionManager.d.ts.map +1 -0
  61. package/dist/implementation/RestrictionManager.js +220 -0
  62. package/dist/implementation/RestrictionManager.js.map +1 -0
  63. package/dist/implementation/restrictions/AbstractRestriction.d.ts +42 -0
  64. package/dist/implementation/restrictions/AbstractRestriction.d.ts.map +1 -0
  65. package/dist/implementation/restrictions/AbstractRestriction.js +130 -0
  66. package/dist/implementation/restrictions/AbstractRestriction.js.map +1 -0
  67. package/dist/implementation/restrictions/AbstractSnapRestriction.d.ts +32 -0
  68. package/dist/implementation/restrictions/AbstractSnapRestriction.d.ts.map +1 -0
  69. package/dist/implementation/restrictions/AbstractSnapRestriction.js +125 -0
  70. package/dist/implementation/restrictions/AbstractSnapRestriction.js.map +1 -0
  71. package/dist/implementation/restrictions/RestrictionsHelper.d.ts +11 -0
  72. package/dist/implementation/restrictions/RestrictionsHelper.d.ts.map +1 -0
  73. package/dist/implementation/restrictions/RestrictionsHelper.js +47 -0
  74. package/dist/implementation/restrictions/RestrictionsHelper.js.map +1 -0
  75. package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.d.ts +19 -0
  76. package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.d.ts.map +1 -0
  77. package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.js +64 -0
  78. package/dist/implementation/restrictions/camera_plane/CameraPlaneRestriction.js.map +1 -0
  79. package/dist/implementation/restrictions/geometry/GeometryRestriction.d.ts +41 -0
  80. package/dist/implementation/restrictions/geometry/GeometryRestriction.d.ts.map +1 -0
  81. package/dist/implementation/restrictions/geometry/GeometryRestriction.js +259 -0
  82. package/dist/implementation/restrictions/geometry/GeometryRestriction.js.map +1 -0
  83. package/dist/implementation/restrictions/line/LineRestriction.d.ts +28 -0
  84. package/dist/implementation/restrictions/line/LineRestriction.d.ts.map +1 -0
  85. package/dist/implementation/restrictions/line/LineRestriction.js +104 -0
  86. package/dist/implementation/restrictions/line/LineRestriction.js.map +1 -0
  87. package/dist/implementation/restrictions/plane/PlaneRestriction.d.ts +68 -0
  88. package/dist/implementation/restrictions/plane/PlaneRestriction.d.ts.map +1 -0
  89. package/dist/implementation/restrictions/plane/PlaneRestriction.js +259 -0
  90. package/dist/implementation/restrictions/plane/PlaneRestriction.js.map +1 -0
  91. package/dist/implementation/restrictions/plane/snap/AngularRestriction.d.ts +41 -0
  92. package/dist/implementation/restrictions/plane/snap/AngularRestriction.d.ts.map +1 -0
  93. package/dist/implementation/restrictions/plane/snap/AngularRestriction.js +321 -0
  94. package/dist/implementation/restrictions/plane/snap/AngularRestriction.js.map +1 -0
  95. package/dist/implementation/restrictions/plane/snap/AxisRestriction.d.ts +28 -0
  96. package/dist/implementation/restrictions/plane/snap/AxisRestriction.d.ts.map +1 -0
  97. package/dist/implementation/restrictions/plane/snap/AxisRestriction.js +172 -0
  98. package/dist/implementation/restrictions/plane/snap/AxisRestriction.js.map +1 -0
  99. package/dist/implementation/restrictions/plane/snap/GridRestriction.d.ts +40 -0
  100. package/dist/implementation/restrictions/plane/snap/GridRestriction.d.ts.map +1 -0
  101. package/dist/implementation/restrictions/plane/snap/GridRestriction.js +211 -0
  102. package/dist/implementation/restrictions/plane/snap/GridRestriction.js.map +1 -0
  103. package/dist/implementation/restrictions/point/PointRestriction.d.ts +25 -0
  104. package/dist/implementation/restrictions/point/PointRestriction.d.ts.map +1 -0
  105. package/dist/implementation/restrictions/point/PointRestriction.js +78 -0
  106. package/dist/implementation/restrictions/point/PointRestriction.js.map +1 -0
  107. package/dist/index.d.ts +30 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +38 -0
  110. package/dist/index.js.map +1 -0
  111. package/dist/interfaces/IDragAnchor.d.ts +9 -0
  112. package/dist/interfaces/IDragAnchor.d.ts.map +1 -0
  113. package/dist/interfaces/IDragAnchor.js +3 -0
  114. package/dist/interfaces/IDragAnchor.js.map +1 -0
  115. package/dist/interfaces/IRestriction.d.ts +89 -0
  116. package/dist/interfaces/IRestriction.d.ts.map +1 -0
  117. package/dist/interfaces/IRestriction.js +25 -0
  118. package/dist/interfaces/IRestriction.js.map +1 -0
  119. package/dist/interfaces/IRestrictionManager.d.ts +14 -0
  120. package/dist/interfaces/IRestrictionManager.d.ts.map +1 -0
  121. package/dist/interfaces/IRestrictionManager.js +3 -0
  122. package/dist/interfaces/IRestrictionManager.js.map +1 -0
  123. package/dist/interfaces/ISnapRestriction.d.ts +67 -0
  124. package/dist/interfaces/ISnapRestriction.d.ts.map +1 -0
  125. package/dist/interfaces/ISnapRestriction.js +4 -0
  126. package/dist/interfaces/ISnapRestriction.js.map +1 -0
  127. package/dist/interfaces/IVisualizationSettings.d.ts +33 -0
  128. package/dist/interfaces/IVisualizationSettings.d.ts.map +1 -0
  129. package/dist/interfaces/IVisualizationSettings.js +3 -0
  130. package/dist/interfaces/IVisualizationSettings.js.map +1 -0
  131. package/package.json +54 -0
@@ -0,0 +1,67 @@
1
+ import { IRay } from '@shapediver/viewer.rendering-engine.intersection-engine';
2
+ import { RestrictionMetaData, RestrictionResult } 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 {
28
+ /**
29
+ * The unique identifier of the restriction.
30
+ */
31
+ readonly id: string;
32
+ /**
33
+ * If the restriction is actively being used at the moment.
34
+ */
35
+ active: boolean;
36
+ /**
37
+ * Whether the restriction is enabled or not.
38
+ */
39
+ enabled: boolean;
40
+ /**
41
+ * If the enabling or disabling of the restriction is allowed to the end user.
42
+ * If it is not editable, the default value for enabling or disabling the restriction is used.
43
+ */
44
+ enabledEditable: boolean;
45
+ /**
46
+ * The priority of the restriction.
47
+ */
48
+ priority: number;
49
+ /**
50
+ * Whether the visualization of the restriction is shown or not (if there is one).
51
+ */
52
+ showVisualization: boolean;
53
+ /**
54
+ * Remove the visualization of the restriction.
55
+ */
56
+ removeVisualization(): void;
57
+ /**
58
+ * Restrict the position of a point.
59
+ *
60
+ * @param ray The ray that is used for the restriction.
61
+ * @param point The position of the point.
62
+ * @param metaData The meta data of the point.
63
+ * @returns The restricted position of the point.
64
+ */
65
+ snap(ray: IRay, point: vec3, metaData?: RestrictionMetaData): RestrictionResult | undefined;
66
+ }
67
+ //# sourceMappingURL=ISnapRestriction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISnapRestriction.d.ts","sourceRoot":"","sources":["../../src/interfaces/ISnapRestriction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yDAAyD,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxE,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,gBAAgB;IAG7B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAM3B;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAC5B;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,SAAS,CAAC;CAG/F"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // #endregion Interfaces (1)
4
+ //# sourceMappingURL=ISnapRestriction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISnapRestriction.js","sourceRoot":"","sources":["../../src/interfaces/ISnapRestriction.ts"],"names":[],"mappings":";;AAqFA,4BAA4B"}
@@ -0,0 +1,33 @@
1
+ import { IMaterialBasicLineDataProperties, IMaterialMultiPointDataProperties } from '@shapediver/viewer.shared.types';
2
+ export interface IVisualizationSettings {
3
+ /**
4
+ * If the distance labels are shown.
5
+ * The distance labels display the distance between the points.
6
+ *
7
+ * @default true
8
+ */
9
+ distanceLabels: boolean;
10
+ /**
11
+ * The multiplication factor of the point size when interactions are performed.
12
+ * If the factor is set to 2, the point size is doubled when interacting.
13
+ *
14
+ * @default 2
15
+ */
16
+ distanceMultiplicationFactor: number;
17
+ /**
18
+ * The material properties of the lines.
19
+ */
20
+ lines: IMaterialBasicLineDataProperties;
21
+ /**
22
+ * If the point labels are shown.
23
+ * The point labels display the position of the points.
24
+ *
25
+ * @default false
26
+ */
27
+ pointLabels: boolean;
28
+ /**
29
+ * The material properties of the points.
30
+ */
31
+ points: IMaterialMultiPointDataProperties;
32
+ }
33
+ //# sourceMappingURL=IVisualizationSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVisualizationSettings.d.ts","sourceRoot":"","sources":["../../src/interfaces/IVisualizationSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AAEtH,MAAM,WAAW,sBAAsB;IAGnC;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;OAEG;IACH,KAAK,EAAE,gCAAgC,CAAA;IACvC;;;;;OAKG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,iCAAiC,CAAC;CAG7C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IVisualizationSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVisualizationSettings.js","sourceRoot":"","sources":["../../src/interfaces/IVisualizationSettings.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@shapediver/viewer.rendering-engine.intersection-restriction-engine",
3
+ "version": "3.5.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
+ "package.json",
14
+ "dist/",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/shapediver/Viewer.git"
24
+ },
25
+ "scripts": {
26
+ "check": "tsc --noEmit",
27
+ "build": "bash ../../scripts/building/build.sh",
28
+ "build-all": "npm run build",
29
+ "build-watch": "bash ../../scripts/building/build-watch.sh",
30
+ "build-dep": "bash ../../scripts/building/build-dep.sh"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/shapediver/Viewer/issues"
34
+ },
35
+ "homepage": "https://github.com/shapediver/Viewer#readme",
36
+ "typings": "dist/index.d.ts",
37
+ "jest": {
38
+ "preset": "ts-jest",
39
+ "testEnvironment": "node"
40
+ },
41
+ "dependencies": {
42
+ "@shapediver/viewer": "3.5.0",
43
+ "@shapediver/viewer.rendering-engine.intersection-engine": "3.5.0",
44
+ "@shapediver/viewer.rendering-engine.rendering-engine-threejs": "3.5.0",
45
+ "@shapediver/viewer.shared.math": "3.5.0",
46
+ "@shapediver/viewer.shared.node-tree": "3.5.0",
47
+ "@shapediver/viewer.shared.services": "3.5.0",
48
+ "@shapediver/viewer.shared.types": "3.5.0",
49
+ "@types/three": "0.162.0",
50
+ "gl-matrix": "3.3.0",
51
+ "three": "0.162.0"
52
+ },
53
+ "gitHead": "9d0bb53a8341fe114c9860eed755063f6d854193"
54
+ }