@inweb/client 25.3.11 → 25.3.13

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 (206) hide show
  1. package/README.md +17 -35
  2. package/dist/client.js +33 -17365
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.min.js +1 -1
  5. package/dist/client.module.js +9 -5552
  6. package/dist/client.module.js.map +1 -1
  7. package/lib/Api/Assembly.d.ts +0 -1
  8. package/lib/Api/ClashTest.d.ts +0 -1
  9. package/lib/Api/Client.d.ts +1 -2
  10. package/lib/Api/ClientEvents.d.ts +0 -1
  11. package/lib/Api/File.d.ts +0 -1
  12. package/lib/Api/HttpClient.d.ts +0 -1
  13. package/lib/Api/IAssembly.d.ts +0 -1
  14. package/lib/Api/IFile.d.ts +0 -1
  15. package/lib/Api/IHttpClient.d.ts +0 -1
  16. package/lib/Api/IUser.d.ts +0 -1
  17. package/lib/Api/Job.d.ts +0 -1
  18. package/lib/Api/Member.d.ts +0 -1
  19. package/lib/Api/Model.d.ts +13 -1
  20. package/lib/Api/Permission.d.ts +0 -1
  21. package/lib/Api/Project.d.ts +0 -1
  22. package/lib/Api/Role.d.ts +0 -1
  23. package/lib/Api/User.d.ts +0 -1
  24. package/lib/Api/impl/FetchError.d.ts +0 -1
  25. package/lib/Api/impl/Utils.d.ts +0 -1
  26. package/lib/Api/impl/http.d.ts +0 -1
  27. package/lib/ConvetMath.d.ts +0 -1
  28. package/lib/index.d.ts +1 -13
  29. package/package.json +5 -11
  30. package/src/Api/Client.ts +2 -1
  31. package/src/Api/Model.ts +19 -0
  32. package/src/index.ts +1 -13
  33. package/lib/Viewer/CanvasEvents.d.ts +0 -2
  34. package/lib/Viewer/Commands/ApplyModelTransform.d.ts +0 -2
  35. package/lib/Viewer/Commands/ClearMarkup.d.ts +0 -2
  36. package/lib/Viewer/Commands/ClearSlices.d.ts +0 -2
  37. package/lib/Viewer/Commands/CreatePreview.d.ts +0 -2
  38. package/lib/Viewer/Commands/Explode.d.ts +0 -2
  39. package/lib/Viewer/Commands/GetDefaultViewPositions.d.ts +0 -2
  40. package/lib/Viewer/Commands/GetModels.d.ts +0 -2
  41. package/lib/Viewer/Commands/GetSelected.d.ts +0 -2
  42. package/lib/Viewer/Commands/HideSelected.d.ts +0 -2
  43. package/lib/Viewer/Commands/IsolateSelected.d.ts +0 -2
  44. package/lib/Viewer/Commands/RegenerateAll.d.ts +0 -2
  45. package/lib/Viewer/Commands/ResetView.d.ts +0 -2
  46. package/lib/Viewer/Commands/SelectModel.d.ts +0 -2
  47. package/lib/Viewer/Commands/SetActiveDragger.d.ts +0 -2
  48. package/lib/Viewer/Commands/SetDefaultViewPosition.d.ts +0 -2
  49. package/lib/Viewer/Commands/SetMarkupColor.d.ts +0 -2
  50. package/lib/Viewer/Commands/SetSelected.d.ts +0 -2
  51. package/lib/Viewer/Commands/ShowAll.d.ts +0 -2
  52. package/lib/Viewer/Commands/Unselect.d.ts +0 -2
  53. package/lib/Viewer/Commands/ZoomToExtents.d.ts +0 -2
  54. package/lib/Viewer/Commands/ZoomToObjects.d.ts +0 -2
  55. package/lib/Viewer/Commands/ZoomToSelected.d.ts +0 -2
  56. package/lib/Viewer/Commands.d.ts +0 -3
  57. package/lib/Viewer/Draggers/Actions/OrbitAction.d.ts +0 -22
  58. package/lib/Viewer/Draggers/Actions/PanAction.d.ts +0 -18
  59. package/lib/Viewer/Draggers/Actions/ZoomAction.d.ts +0 -8
  60. package/lib/Viewer/Draggers/Common/Geometry.d.ts +0 -115
  61. package/lib/Viewer/Draggers/Common/GestureManager.d.ts +0 -41
  62. package/lib/Viewer/Draggers/Common/OdBaseDragger.d.ts +0 -54
  63. package/lib/Viewer/Draggers/Common/OdaGeAction.d.ts +0 -30
  64. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.d.ts +0 -31
  65. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureUtils.d.ts +0 -20
  66. package/lib/Viewer/Draggers/MeasureLineDragger/index.d.ts +0 -24
  67. package/lib/Viewer/Draggers/OdBaseCuttingPlaneDragger.d.ts +0 -27
  68. package/lib/Viewer/Draggers/OdCuttingPlaneXAxisDragger.d.ts +0 -8
  69. package/lib/Viewer/Draggers/OdCuttingPlaneYAxisDragger.d.ts +0 -8
  70. package/lib/Viewer/Draggers/OdCuttingPlaneZAxisDragger.d.ts +0 -8
  71. package/lib/Viewer/Draggers/OdOrbitDragger.d.ts +0 -15
  72. package/lib/Viewer/Draggers/OdPanDragger.d.ts +0 -12
  73. package/lib/Viewer/Draggers/OdZoomDragger.d.ts +0 -12
  74. package/lib/Viewer/Draggers/OdZoomWheelDragger.d.ts +0 -11
  75. package/lib/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.d.ts +0 -19
  76. package/lib/Viewer/Draggers/OdZoomWindowDragger/index.d.ts +0 -14
  77. package/lib/Viewer/Draggers/OdaLineDragger.d.ts +0 -15
  78. package/lib/Viewer/Draggers/OdaTextDragger.d.ts +0 -16
  79. package/lib/Viewer/Draggers/OdaWalkDragger.d.ts +0 -30
  80. package/lib/Viewer/Draggers/OrbitAroundBuildingDragger.d.ts +0 -19
  81. package/lib/Viewer/EventEmitter2.d.ts +0 -54
  82. package/lib/Viewer/ICommands.d.ts +0 -25
  83. package/lib/Viewer/IEventEmitter2.d.ts +0 -13
  84. package/lib/Viewer/IViewer.d.ts +0 -30
  85. package/lib/Viewer/Loaders/BaseLoader.d.ts +0 -11
  86. package/lib/Viewer/Loaders/LoaderFactory.d.ts +0 -11
  87. package/lib/Viewer/Loaders/TCSLoader.d.ts +0 -5
  88. package/lib/Viewer/Loaders/UpdaterController.d.ts +0 -15
  89. package/lib/Viewer/Loaders/VsfXLoader.d.ts +0 -5
  90. package/lib/Viewer/Loaders/VsfXPartialLoader.d.ts +0 -5
  91. package/lib/Viewer/Loaders/VsfXStreamingLoader.d.ts +0 -5
  92. package/lib/Viewer/Markup/Api/IMarkupArrow.d.ts +0 -22
  93. package/lib/Viewer/Markup/Api/IMarkupCloud.d.ts +0 -15
  94. package/lib/Viewer/Markup/Api/IMarkupColorable.d.ts +0 -5
  95. package/lib/Viewer/Markup/Api/IMarkupEllipse.d.ts +0 -15
  96. package/lib/Viewer/Markup/Api/IMarkupImage.d.ts +0 -15
  97. package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +0 -13
  98. package/lib/Viewer/Markup/Api/IMarkupObject.d.ts +0 -12
  99. package/lib/Viewer/Markup/Api/IMarkupRectangle.d.ts +0 -15
  100. package/lib/Viewer/Markup/Api/IMarkupText.d.ts +0 -13
  101. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaArrow.d.ts +0 -47
  102. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaCloud.d.ts +0 -36
  103. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.d.ts +0 -41
  104. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaImage.d.ts +0 -37
  105. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +0 -37
  106. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.d.ts +0 -39
  107. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaText.d.ts +0 -38
  108. package/lib/Viewer/Markup/IMarkup.d.ts +0 -40
  109. package/lib/Viewer/Markup/IViewpoint.d.ts +0 -129
  110. package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +0 -72
  111. package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +0 -19
  112. package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +0 -34
  113. package/lib/Viewer/Markup/MarkupFactory.d.ts +0 -7
  114. package/lib/Viewer/Options.d.ts +0 -239
  115. package/lib/Viewer/OptionsEvents.d.ts +0 -26
  116. package/lib/Viewer/Viewer.d.ts +0 -354
  117. package/lib/Viewer/ViewerCommands.d.ts +0 -23
  118. package/lib/Viewer/ViewerEvents.d.ts +0 -601
  119. package/lib/Viewer/utils.d.ts +0 -4
  120. package/src/Viewer/CanvasEvents.ts +0 -41
  121. package/src/Viewer/Commands/ApplyModelTransform.ts +0 -70
  122. package/src/Viewer/Commands/ClearMarkup.ts +0 -28
  123. package/src/Viewer/Commands/ClearSlices.ts +0 -27
  124. package/src/Viewer/Commands/CreatePreview.ts +0 -33
  125. package/src/Viewer/Commands/Explode.ts +0 -38
  126. package/src/Viewer/Commands/GetDefaultViewPositions.ts +0 -36
  127. package/src/Viewer/Commands/GetModels.ts +0 -43
  128. package/src/Viewer/Commands/GetSelected.ts +0 -58
  129. package/src/Viewer/Commands/HideSelected.ts +0 -37
  130. package/src/Viewer/Commands/IsolateSelected.ts +0 -37
  131. package/src/Viewer/Commands/RegenerateAll.ts +0 -37
  132. package/src/Viewer/Commands/ResetView.ts +0 -43
  133. package/src/Viewer/Commands/SelectModel.ts +0 -52
  134. package/src/Viewer/Commands/SetActiveDragger.ts +0 -29
  135. package/src/Viewer/Commands/SetDefaultViewPosition.ts +0 -50
  136. package/src/Viewer/Commands/SetMarkupColor.ts +0 -29
  137. package/src/Viewer/Commands/SetSelected.ts +0 -47
  138. package/src/Viewer/Commands/ShowAll.ts +0 -37
  139. package/src/Viewer/Commands/Unselect.ts +0 -37
  140. package/src/Viewer/Commands/ZoomToExtents.ts +0 -43
  141. package/src/Viewer/Commands/ZoomToObjects.ts +0 -47
  142. package/src/Viewer/Commands/ZoomToSelected.ts +0 -39
  143. package/src/Viewer/Commands.ts +0 -81
  144. package/src/Viewer/Draggers/Actions/OrbitAction.ts +0 -250
  145. package/src/Viewer/Draggers/Actions/PanAction.ts +0 -102
  146. package/src/Viewer/Draggers/Actions/ZoomAction.ts +0 -45
  147. package/src/Viewer/Draggers/Common/Geometry.ts +0 -152
  148. package/src/Viewer/Draggers/Common/GestureManager.ts +0 -263
  149. package/src/Viewer/Draggers/Common/OdBaseDragger.ts +0 -270
  150. package/src/Viewer/Draggers/Common/OdaGeAction.ts +0 -146
  151. package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +0 -248
  152. package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +0 -182
  153. package/src/Viewer/Draggers/MeasureLineDragger/index.ts +0 -166
  154. package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +0 -182
  155. package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +0 -53
  156. package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +0 -53
  157. package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +0 -53
  158. package/src/Viewer/Draggers/OdOrbitDragger.ts +0 -70
  159. package/src/Viewer/Draggers/OdPanDragger.ts +0 -62
  160. package/src/Viewer/Draggers/OdZoomDragger.ts +0 -59
  161. package/src/Viewer/Draggers/OdZoomWheelDragger.ts +0 -103
  162. package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +0 -123
  163. package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +0 -75
  164. package/src/Viewer/Draggers/OdaLineDragger.ts +0 -80
  165. package/src/Viewer/Draggers/OdaTextDragger.ts +0 -118
  166. package/src/Viewer/Draggers/OdaWalkDragger.ts +0 -278
  167. package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +0 -184
  168. package/src/Viewer/EventEmitter2.ts +0 -116
  169. package/src/Viewer/ICommands.ts +0 -53
  170. package/src/Viewer/IEventEmitter2.ts +0 -36
  171. package/src/Viewer/IViewer.ts +0 -59
  172. package/src/Viewer/Loaders/BaseLoader.ts +0 -40
  173. package/src/Viewer/Loaders/LoaderFactory.ts +0 -47
  174. package/src/Viewer/Loaders/TCSLoader.ts +0 -82
  175. package/src/Viewer/Loaders/UpdaterController.ts +0 -36
  176. package/src/Viewer/Loaders/VsfXLoader.ts +0 -65
  177. package/src/Viewer/Loaders/VsfXPartialLoader.ts +0 -208
  178. package/src/Viewer/Loaders/VsfXStreamingLoader.ts +0 -87
  179. package/src/Viewer/Markup/Api/IMarkupArrow.ts +0 -12
  180. package/src/Viewer/Markup/Api/IMarkupCloud.ts +0 -15
  181. package/src/Viewer/Markup/Api/IMarkupColorable.ts +0 -4
  182. package/src/Viewer/Markup/Api/IMarkupEllipse.ts +0 -15
  183. package/src/Viewer/Markup/Api/IMarkupImage.ts +0 -15
  184. package/src/Viewer/Markup/Api/IMarkupLine.ts +0 -13
  185. package/src/Viewer/Markup/Api/IMarkupObject.ts +0 -15
  186. package/src/Viewer/Markup/Api/IMarkupRectangle.ts +0 -15
  187. package/src/Viewer/Markup/Api/IMarkupText.ts +0 -12
  188. package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +0 -117
  189. package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +0 -208
  190. package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +0 -118
  191. package/src/Viewer/Markup/Api/Impl/Konva/KonvaImage.ts +0 -123
  192. package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +0 -131
  193. package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +0 -119
  194. package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +0 -110
  195. package/src/Viewer/Markup/IMarkup.ts +0 -41
  196. package/src/Viewer/Markup/IViewpoint.ts +0 -146
  197. package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +0 -1144
  198. package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +0 -39
  199. package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +0 -228
  200. package/src/Viewer/Markup/MarkupFactory.ts +0 -32
  201. package/src/Viewer/Options.ts +0 -527
  202. package/src/Viewer/OptionsEvents.ts +0 -28
  203. package/src/Viewer/Viewer.ts +0 -1180
  204. package/src/Viewer/ViewerCommands.ts +0 -45
  205. package/src/Viewer/ViewerEvents.ts +0 -700
  206. package/src/Viewer/utils.ts +0 -74
@@ -1,239 +0,0 @@
1
- import { EventEmitter2 } from "./EventEmitter2";
2
- export interface RGB {
3
- red: number;
4
- green: number;
5
- blue: number;
6
- }
7
- /**
8
- * `VisualizeJS` parameters.
9
- */
10
- export interface OptionsData {
11
- /**
12
- * Show WCS
13
- *
14
- * @defaultValue true
15
- */
16
- showWCS?: boolean;
17
- /**
18
- * Enable camera animation
19
- *
20
- * @defaultValue true
21
- */
22
- cameraAnimation?: boolean;
23
- /**
24
- * Enable antialiasing use FXAA
25
- *
26
- * @defaultValue true
27
- */
28
- antialiasing?: boolean;
29
- /**
30
- * Enable ground shadows
31
- *
32
- * @defaultValue false
33
- */
34
- groundShadow?: boolean;
35
- /**
36
- * Enable shadows
37
- *
38
- * @defaultValue false
39
- */
40
- shadows?: boolean;
41
- /**
42
- * Camera speed on X axis
43
- *
44
- * @defaultValue 4
45
- */
46
- cameraAxisXSpeed?: number;
47
- /**
48
- * Camera speed on Y axis
49
- *
50
- * @defaultValue 1
51
- */
52
- cameraAxisYSpeed?: number;
53
- /**
54
- * Ambient occlusion
55
- *
56
- * @defaultValue false
57
- */
58
- ambientOcclusion?: boolean;
59
- /**
60
- * Enable streaming mode
61
- *
62
- * If enableStreamingMode is true then enablePartialMode will be used, otherwise -
63
- * enablePartialMode will be ignored and file / assembly will be loaded in one go
64
- *
65
- * @defaultValue true
66
- */
67
- enableStreamingMode?: boolean;
68
- /**
69
- * Enable partial load mode to be able open large drawing If enablePartialMode enabled, then
70
- * sceneGraph will be switched off
71
- *
72
- * @defaultValue false
73
- */
74
- enablePartialMode?: boolean;
75
- /**
76
- * The size of the memory buffer that the Viewer can use for graphics data
77
- *
78
- * @defaultValue 3294967296
79
- */
80
- memoryLimit?: number;
81
- /**
82
- * Cutting plane fill color
83
- *
84
- * @defaultValue { red: 0xff, green: 0x98, blue: 0x00 }
85
- */
86
- cuttingPlaneFillColor?: RGB;
87
- /**
88
- * Outline edges color in RGB format.
89
- */
90
- edgesColor?: {
91
- r: number;
92
- g: number;
93
- b: number;
94
- };
95
- /**
96
- * Faces color in the RGB format.
97
- */
98
- facesColor?: {
99
- r: number;
100
- g: number;
101
- b: number;
102
- };
103
- /**
104
- * Show or hide edges.
105
- */
106
- edgesVisibility?: boolean;
107
- /**
108
- * Show edges over drawing.
109
- */
110
- edgesOverlap?: boolean;
111
- /**
112
- * Show faces over drawing.
113
- */
114
- facesOverlap?: boolean;
115
- /**
116
- * Faces transparency value from 0 to 255.
117
- */
118
- facesTransparancy?: number;
119
- /**
120
- * Enable custom highlight settings.
121
- */
122
- enableCustomHighlight?: boolean;
123
- /**
124
- * Enable or disable scene graph, it increases perfomance improvement, but consumes memory
125
- * Large drawings can take up a lot of memory. If sceneGraph enabled, then enablePartialMode
126
- * will be switched off
127
- */
128
- sceneGraph: boolean;
129
- /**
130
- * Edge display models. No edges is usefull for less memory consumption: `false` - no edges
131
- * are displayed, `true` - display isolines.
132
- */
133
- edgeModel: boolean;
134
- /**
135
- * Reverse the mouse wheel direction for zooming: false - moving the wheel up zooms in,
136
- * moving down zooms out, `true` - moving the wheel up zooms out, moving down zooms in.
137
- */
138
- reverseZoomWheel: boolean;
139
- /**
140
- * Enable mouse wheel zooming.
141
- */
142
- enableZoomWheel: boolean;
143
- /**
144
- * Enable touch gestures. This option will be ignored when enableZoomWheel is disabled, since
145
- * gestures contains touch zoom.
146
- */
147
- enableGestures: boolean;
148
- /**
149
- * Default file geometry data type. Can be one of:
150
- *
151
- * - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
152
- * - `gltf` - `glTF`, for opening a file in `Three.js` viewer.
153
- */
154
- geometryType?: string;
155
- }
156
- export declare class Options {
157
- protected _emitter?: EventEmitter2;
158
- protected _data: OptionsData;
159
- constructor(emitter?: EventEmitter2);
160
- static defaults(): OptionsData;
161
- notifierChangeEvent(): void;
162
- saveToStorage(): void;
163
- loadFromStorage(): void;
164
- /**
165
- * Reset options to default
166
- *
167
- * @param fields - Name of fields to be reset
168
- */
169
- resetToDefaults(fields?: string[]): void;
170
- get data(): OptionsData;
171
- set data(value: OptionsData);
172
- get showWCS(): boolean;
173
- set showWCS(value: boolean);
174
- get cameraAnimation(): boolean;
175
- set cameraAnimation(value: boolean);
176
- get antialiasing(): boolean;
177
- set antialiasing(value: boolean);
178
- get groundShadow(): boolean;
179
- set groundShadow(value: boolean);
180
- get shadows(): boolean;
181
- set shadows(value: boolean);
182
- get cameraAxisXSpeed(): number;
183
- set cameraAxisXSpeed(value: number);
184
- get cameraAxisYSpeed(): number;
185
- set cameraAxisYSpeed(value: number);
186
- get ambientOcclusion(): boolean;
187
- set ambientOcclusion(value: boolean);
188
- get enableStreamingMode(): boolean;
189
- set enableStreamingMode(value: boolean);
190
- get enablePartialMode(): boolean;
191
- set enablePartialMode(value: boolean);
192
- get memoryLimit(): number;
193
- set memoryLimit(value: number);
194
- get cuttingPlaneFillColor(): RGB;
195
- set cuttingPlaneFillColor(value: RGB);
196
- get edgesColor(): {
197
- r: number;
198
- g: number;
199
- b: number;
200
- };
201
- set edgesColor(value: {
202
- r: number;
203
- g: number;
204
- b: number;
205
- });
206
- get facesColor(): {
207
- r: number;
208
- g: number;
209
- b: number;
210
- };
211
- set facesColor(value: {
212
- r: number;
213
- g: number;
214
- b: number;
215
- });
216
- get edgesVisibility(): boolean;
217
- set edgesVisibility(value: boolean);
218
- get edgesOverlap(): boolean;
219
- set edgesOverlap(value: boolean);
220
- get facesOverlap(): boolean;
221
- set facesOverlap(value: boolean);
222
- get facesTransparancy(): number;
223
- set facesTransparancy(value: number);
224
- get enableCustomHighlight(): boolean;
225
- set enableCustomHighlight(value: boolean);
226
- get sceneGraph(): boolean;
227
- set sceneGraph(value: boolean);
228
- get edgeModel(): boolean;
229
- set edgeModel(value: boolean);
230
- get reverseZoomWheel(): boolean;
231
- set reverseZoomWheel(value: boolean);
232
- get enableZoomWheel(): boolean;
233
- set enableZoomWheel(value: boolean);
234
- get enableGestures(): boolean;
235
- set enableGestures(value: boolean);
236
- get geometryType(): string;
237
- set geometryType(value: string);
238
- }
239
- //# sourceMappingURL=Options.d.ts.map
@@ -1,26 +0,0 @@
1
- import { Options } from "./Options";
2
- /**
3
- * An event that fires when options has been changed.
4
- *
5
- * @event
6
- */
7
- export interface OptionsChangeEvent {
8
- /**
9
- * Event type.
10
- */
11
- type: "optionschange";
12
- /**
13
- * New parameters.
14
- */
15
- data: Options;
16
- }
17
- /**
18
- * Options events.
19
- */
20
- export interface OptionsEventMap {
21
- /**
22
- * An event that fires when options has been changed.
23
- */
24
- optionschange: OptionsChangeEvent;
25
- }
26
- //# sourceMappingURL=OptionsEvents.d.ts.map
@@ -1,354 +0,0 @@
1
- import { IViewer } from "./IViewer";
2
- import { EventEmitter2 } from "./EventEmitter2";
3
- import { ViewerEventMap } from "./ViewerEvents";
4
- import { OptionsEventMap } from "./OptionsEvents";
5
- import { OdBaseDragger } from "./Draggers/Common/OdBaseDragger";
6
- import { Client } from "../Api/Client";
7
- import { File } from "../Api/File";
8
- import { Assembly } from "../Api/Assembly";
9
- import { Model } from "../Api/Model";
10
- import { Options, OptionsData } from "./Options";
11
- import { IMarkup, MarkupType } from "./Markup/IMarkup";
12
- import { IViewpoint } from "./Markup/IViewpoint";
13
- /**
14
- * The `Client.js` library class that provides methods to integrate with the
15
- * [VisualizeJS](https://cloud.opendesign.com/docs/index.html#/visualizejs) library.
16
- */
17
- export declare class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> implements IViewer {
18
- private _activeDragger;
19
- private _zoomWheelDragger;
20
- private _gestureManager;
21
- private _enableAutoUpdate;
22
- private _isNeedRender;
23
- private _isRunAsyncUpdate;
24
- private _renderTime;
25
- protected _options: Options;
26
- protected _visualizeJsUrl: string;
27
- protected _abortControllerForReferences: AbortController | undefined;
28
- private canvaseventlistener;
29
- draggerFactory: Map<string, typeof OdBaseDragger>;
30
- canvasEvents: string[];
31
- private frameId;
32
- private _resizeObserver;
33
- canvas: HTMLCanvasElement | undefined;
34
- markup: IMarkup;
35
- visualizeJs: any;
36
- _abortController: AbortController | undefined;
37
- _abortControllerForRequestMap: Map<string, AbortController> | undefined;
38
- client: Client;
39
- /**
40
- * @param client - The `Client` instance that provides access to a server. Do not specify
41
- * `Client` if you need a standalone viewer instance without access to server models.
42
- * @param params - An object containing viewer configuration parameters.
43
- * @param params.visualizeJsUrl - `VisualizeJS` library URL. Set this URL to use your own
44
- * library instance, or leave it undefined or blank to use the default URL defined by
45
- * `Client.js` you are using.
46
- *
47
- * _Note: Your own `VisualizeJS` library version must match the version of the `Client.js`
48
- * you are using._
49
- * @param params.enableAutoUpdate - Enable auto-update of the viewer after any changes. If
50
- * the auto-update is disabled, you need to update the `VisualizeJS` viewer and the active
51
- * dragger manually using the `update` event. Default is `true`.
52
- */
53
- constructor(client?: Client, params?: {
54
- visualizeJsUrl?: string;
55
- enableAutoUpdate?: boolean;
56
- markupType?: MarkupType;
57
- });
58
- /**
59
- * `VisualizeJS` parameters.
60
- */
61
- get options(): Options;
62
- /**
63
- * `VisualizeJS` library URL. Use {@link Viewer#configure | configure()} to change library URL.
64
- *
65
- * @readonly
66
- */
67
- get visualizeJsUrl(): string;
68
- /**
69
- * Change the viewer configuration parameters.
70
- *
71
- * @param params - An object containing new configuration parameters.
72
- * @param params.visualizeJsUrl - `VisualizeJS` library URL. Set this URL to use your own
73
- * library instance or leave it blank to use the default URL defined by `Client.js`.
74
- */
75
- configure(params: {
76
- visualizeJsUrl?: string;
77
- }): this;
78
- /**
79
- * A [Viewer]{@link Viewer} event measuring progress of loading a `VisualizeJS` library.
80
- *
81
- * @property {string} type - `visualizeprogress`
82
- * @property {number} loaded - A 64-bit unsigned integer value indicating the amount of work
83
- * already performed by the underlying process. The ratio of work done can be calculated by
84
- * dividing total by the value of this property.
85
- * @property {number} total - A 64-bit unsigned integer representing the total amount of work
86
- * that the underlying process is in the progress of performing.
87
- * @event visualizeprogress
88
- */
89
- /**
90
- * Load `VisualizeJS` module and initialize it with the specified canvas. Call
91
- * {@link Viewer#dispose | dispose()} to release allocated resources.
92
- *
93
- * @async
94
- * @param canvas - HTML `<canvas>` element for `VisualizeJS`.
95
- * @param onProgress - A callback function that handles events measuring progress of loading
96
- * of the `VisualizeJS` library. Retrieves {@link event:visualizeprogress | visualizeprogress} event.
97
- */
98
- initialize(canvas: HTMLCanvasElement, onProgress?: (event: ProgressEvent) => void): Promise<this>;
99
- /**
100
- * Releases all resources allocated by this `Viewer` instance. Call this method before
101
- * release the `Viewer` instance.
102
- */
103
- dispose(): this;
104
- /**
105
- * Returns `true` if `VisualizeJS` module has been loaded andinitialized.
106
- */
107
- isInitialized(): boolean;
108
- private render;
109
- resize(): this;
110
- /**
111
- * Updates the viewer. Do nothing if the auto-update mode is disabled in the constructor (use
112
- * the `update` event to update viewer manually).
113
- *
114
- * Fires:
115
- *
116
- * - {@link UpdateEvent | update}
117
- *
118
- * @param force - If `true` updates the viewer immidietly. Otherwise updates on next
119
- * animation frame. Default is `false`.
120
- */
121
- update(force?: boolean): void;
122
- /**
123
- * Update with internal schedule, need after change operation when have long update for
124
- * update without lock UI
125
- *
126
- * @param maxScheduleUpdateTimeInMs - Maximum time for one update, by default 30 ms
127
- * @param maxScheduleUpdateCount - Maximum count of schedule update
128
- * @returns return void Promise
129
- */
130
- private scheduleUpdateAsync;
131
- updateAsync(maxScheduleUpdateTimeInMs?: number, maxScheduleUpdateCount?: number): Promise<void>;
132
- /**
133
- * Returns `VisualizeJS`
134
- * {@link https://cloud.opendesign.com/docs/index.html#/visualizejs_api | module} instance.
135
- */
136
- visLib(): any;
137
- /**
138
- * Returns `VisualizeJS`
139
- * {@link https://cloud.opendesign.com/docs/index.html#/vis/Viewer | Viewer} instance.
140
- */
141
- visViewer(): any;
142
- syncOpenCloudVisualStyle(isInitializing: boolean): this;
143
- syncOptions(options?: OptionsData): this;
144
- syncHighlightingOptions(options?: OptionsData): this;
145
- /**
146
- * List of names of available draggers:
147
- *
148
- * - `Line`
149
- * - `Text`
150
- * - `Pan`
151
- * - `Orbit`
152
- * - `Zoom`
153
- * - `ZoomWindow`
154
- * - `OrbitAroundBuilding`
155
- * - `MeasureLine`
156
- * - `CuttingPlaneXAxis`
157
- * - `CuttingPlaneYAxis`
158
- * - `CuttingPlaneZAxis`
159
- * - `Walk`
160
- *
161
- * @readonly
162
- */
163
- get draggers(): string[];
164
- /**
165
- * Register dragger on draggerFactory.
166
- *
167
- * @param name - Dragger name.
168
- * @param dragger - Dragger class.
169
- */
170
- registerDragger(name: string, dragger: typeof OdBaseDragger): void;
171
- /**
172
- * Returns active dragger instance or `null` if there is no active dragger.
173
- */
174
- activeDragger(): any | null;
175
- /**
176
- * Set active dragger. `Viewer` must be {@link Viewer#initialize | initialized} before enable
177
- * dragger or exception is thrown.
178
- *
179
- * Fires:
180
- *
181
- * - {@link ChangeActiveDragger | changeactivedragger}
182
- *
183
- * @param name - Dragger name. Can be one of the {@link Viewer#draggers | draggers} list.
184
- * @returns Returns active dragger instance or `null` if there is no dragger with the given name.
185
- */
186
- setActiveDragger(name: string): OdBaseDragger | null;
187
- /**
188
- * Reset the state of the active dragger.
189
- */
190
- resetActiveDragger(): void;
191
- /**
192
- * Remove all cutting planes.
193
- */
194
- clearSlices(): void;
195
- /**
196
- * Remove markup overlay.
197
- */
198
- clearOverlay(): void;
199
- /**
200
- * Synchronize markup overlay.
201
- */
202
- syncOverlay(): any;
203
- /**
204
- * Returns `true` if current drawing is 3D drawing.
205
- */
206
- is3D(): boolean;
207
- /**
208
- * Returns a list of original handles for the selected entities.
209
- */
210
- getSelected(): string[];
211
- /**
212
- * Select model entities by original handles that are obtained using
213
- * {@link File.getProperties | File.getProperties()} or
214
- * {@link File.searchProperties | File.searchProperties()} methods.
215
- *
216
- * Fires:
217
- *
218
- * - {@link SelectEvent | select}
219
- *
220
- * @param handles - The list of original handles.
221
- */
222
- setSelected(handles?: string[]): void;
223
- /**
224
- * Load model references into the viewer. References are images, fonts, or any other files to
225
- * correct rendering of the model.
226
- *
227
- * @async
228
- * @param model - Instance of model with references. If a `File` instance is specified
229
- * instead of a model, the file references will be loaded.
230
- */
231
- loadReferences(model: Model | File | Assembly): Promise<this>;
232
- applyModelTransformMatrix(model: Model | Assembly): void;
233
- applySceneGraphSettings(options?: Options): void;
234
- /**
235
- * Loads a model of a file or assembly into the viewer.
236
- *
237
- * This method requires a [Client]{@link Client | Client} instance to work. For standalone
238
- * viewer instance use {@link Viewer#openVsfFile | openVsfFile()} or
239
- * {@link Viewer#openVsfxFile | openVsfxFile()}.
240
- *
241
- * Fires:
242
- *
243
- * - {@link OpenEvent | open}
244
- * - {@link GeometryStartEvent | geometrystart}
245
- * - {@link GeometryProgressEvent | geometryprogress}
246
- * - {@link DatabaseChunkEvent | databasechunk}
247
- * - {@link GeometryChunkEvent | geometrychunk}
248
- * - {@link GeometryEndEvent | geometryend}
249
- * - {@link GeometryErrorEvent | geometryerror}
250
- *
251
- * @async
252
- * @param model - Model instance to load. If a `File` instance with multiple models is
253
- * specified, the default model will be loaded. If there is no default model, first
254
- * availiable model will be loaded.
255
- */
256
- open(model: Model | File | Assembly): Promise<this>;
257
- /**
258
- * Loads a VSF file into the viewer.
259
- *
260
- * Fires:
261
- *
262
- * - {@link OpenEvent | open}
263
- * - {@link GeometryStartEvent | geometrystart}
264
- * - {@link GeometryProgressEvent | geometryprogress}
265
- * - {@link DatabaseChunkEvent | databasechunk}
266
- * - {@link GeometryEndEvent | geometryend}
267
- * - {@link GeometryErrorEvent | geometryerror}
268
- *
269
- * @param buffer - Binary data buffer to load.
270
- */
271
- openVsfFile(buffer: Uint8Array | ArrayBuffer): this;
272
- /**
273
- * Loads a VSFX file into the viewer.
274
- *
275
- * Fires:
276
- *
277
- * - {@link OpenEvent | open}
278
- * - {@link GeometryStartEvent | geometrystart}
279
- * - {@link GeometryProgressEvent | geometryprogress}
280
- * - {@link DatabaseChunkEvent | databasechunk}
281
- * - {@link GeometryEndEvent | geometryend}
282
- * - {@link GeometryErrorEvent | geometryerror}
283
- *
284
- * @param buffer - Binary data buffer to load.
285
- */
286
- openVsfxFile(buffer: Uint8Array | ArrayBuffer): this;
287
- /**
288
- * Cancels asynchronous model loading started by {@link Viewer#open | open()}.
289
- */
290
- cancel(): this;
291
- /**
292
- * Unloads the model and clears the viewer.
293
- */
294
- clear(): this;
295
- /**
296
- * Get markup color.
297
- *
298
- * @returns Color with `RGB` values.
299
- */
300
- getMarkupColor(): {
301
- r: number;
302
- g: number;
303
- b: number;
304
- };
305
- /**
306
- * Set markup color.
307
- *
308
- * @param r - `Red` part of color.
309
- * @param g - `Green` part of color.
310
- * @param b - `Blue` part of color.
311
- */
312
- setMarkupColor(r?: number, g?: number, b?: number): void;
313
- /**
314
- * Colorize all markup entities with the specified color.
315
- *
316
- * @param r - `Red` part of color.
317
- * @param g - `Green` part of color.
318
- * @param b - `Blue` part of color.
319
- */
320
- colorizeAllMarkup(r?: number, g?: number, b?: number): void;
321
- /**
322
- * Add an empty markup entity to the overlay.
323
- */
324
- addMarkupEntity(entityName: string): any;
325
- /**
326
- * Draw a viewpoint. To get a list of available model viewpoints, use the
327
- * {@link Model#getViewpoints | Model.getViewpoints()} or
328
- * {@link File#getViewpoints | File.getViewpoints()}.
329
- *
330
- * @param viewpoint - Viewpoint.
331
- */
332
- drawViewpoint(viewpoint: IViewpoint): void;
333
- /**
334
- * Create a viewpoint. To add a viewpoint to the list of model viewpoints, use the
335
- * {@link Model#saveViewpoint | Model.saveViewpoint()} or
336
- * {@link File#saveViewpoint | File.saveViewpoint()}.
337
- */
338
- createViewpoint(): IViewpoint;
339
- private getPoint3dFromArray;
340
- private getLogicalPoint3dAsArray;
341
- private getOrthogonalCameraSettings;
342
- private setOrthogonalCameraSettings;
343
- private getClippingPlanes;
344
- private setClippingPlanes;
345
- /**
346
- * Executes the command denoted by the given command identifier.
347
- *
348
- * @param id - Identifier of the command to execute.
349
- * @param args - Parameters passed to the command function.
350
- * @returns A returned value of the given command. Returns `undefined` when the command doesn't exists.
351
- */
352
- executeCommand(id: string, ...args: any[]): any;
353
- }
354
- //# sourceMappingURL=Viewer.d.ts.map
@@ -1,23 +0,0 @@
1
- import "./Commands/ApplyModelTransform";
2
- import "./Commands/ClearMarkup";
3
- import "./Commands/ClearSlices";
4
- import "./Commands/CreatePreview";
5
- import "./Commands/Explode";
6
- import "./Commands/GetDefaultViewPositions";
7
- import "./Commands/GetModels";
8
- import "./Commands/GetSelected";
9
- import "./Commands/HideSelected";
10
- import "./Commands/IsolateSelected";
11
- import "./Commands/RegenerateAll";
12
- import "./Commands/ResetView";
13
- import "./Commands/SelectModel";
14
- import "./Commands/SetActiveDragger";
15
- import "./Commands/SetDefaultViewPosition";
16
- import "./Commands/SetMarkupColor";
17
- import "./Commands/SetSelected";
18
- import "./Commands/ShowAll";
19
- import "./Commands/Unselect";
20
- import "./Commands/ZoomToExtents";
21
- import "./Commands/ZoomToObjects";
22
- import "./Commands/ZoomToSelected";
23
- //# sourceMappingURL=ViewerCommands.d.ts.map