@pilotdev/pilot-web-3d 1.0.5-1 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/index.d.ts +51 -10
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Installation
|
|
2
|
-
> `npm install --save @pilotdev/pilot-web-3d`
|
|
2
|
+
> `npm install --save-dev @pilotdev/pilot-web-3d`
|
|
3
3
|
|
|
4
4
|
# Summary
|
|
5
|
-
This package contains type definitions for Ascon
|
|
5
|
+
This package contains type definitions for Ascon **PilotWeb3D** component (https://pilotcloud.ascon.net/).
|
|
6
6
|
|
|
7
7
|
### Additional Details
|
|
8
|
-
* Last updated: Thu,
|
|
8
|
+
* Last updated: Thu, 15 Nov 2022 16:10:25 GMT
|
|
9
9
|
* Global values: `PilotWeb3d`
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
///// <reference types="@types/three" />
|
|
1
2
|
/// <reference path="./three/three.d.ts" />
|
|
2
3
|
declare namespace PilotWeb3D {
|
|
3
4
|
|
|
@@ -145,6 +146,8 @@ declare namespace PilotWeb3D {
|
|
|
145
146
|
static VIEWER_MOUSE_MOVE_EVENT: string;
|
|
146
147
|
static VIEWER_MOUSE_UP_EVENT: string;
|
|
147
148
|
static VIEWER_MOUSE_LONG_TOUCH_EVENT: string;
|
|
149
|
+
static SETTING_CHANGED_EVENT: string;
|
|
150
|
+
static SETTING_RESET_EVENT: string;
|
|
148
151
|
}
|
|
149
152
|
class EventTypes extends CoreEventTypes {
|
|
150
153
|
static SELECTION_CHANGED_EVENT: string;
|
|
@@ -155,11 +158,14 @@ declare namespace PilotWeb3D {
|
|
|
155
158
|
selected: string[];
|
|
156
159
|
modelPartId: string;
|
|
157
160
|
}
|
|
158
|
-
|
|
161
|
+
class SettingChangedEvent extends Event {
|
|
162
|
+
name: string;
|
|
163
|
+
oldValue: any;
|
|
164
|
+
newValue: any;
|
|
165
|
+
}
|
|
159
166
|
class ModelPartEvent extends Event {
|
|
160
167
|
modelPartId: string;
|
|
161
168
|
}
|
|
162
|
-
|
|
163
169
|
interface EventsDispatcher {
|
|
164
170
|
addEventListener(event: string, listener: EventListener, options?: any): void;
|
|
165
171
|
removeEventListener(event: string, listener: EventListener): void;
|
|
@@ -220,7 +226,8 @@ declare namespace PilotWeb3D {
|
|
|
220
226
|
container: HTMLElement;
|
|
221
227
|
layerManagers: Map<number, ILayerManager>;
|
|
222
228
|
extensionsLoader: ExtensionLoader;
|
|
223
|
-
|
|
229
|
+
settingsManager: Readonly<ISettingsManager>;
|
|
230
|
+
events: Readonly<EventsDispatcher>;
|
|
224
231
|
/**
|
|
225
232
|
*
|
|
226
233
|
* @returns
|
|
@@ -240,8 +247,41 @@ declare namespace PilotWeb3D {
|
|
|
240
247
|
getExtensions(): Extension[];
|
|
241
248
|
}
|
|
242
249
|
|
|
243
|
-
function CreateViewer(container: HTMLElement): GuiViewer3D;
|
|
250
|
+
function CreateViewer(container: HTMLElement, configuration?: Viewer3DConfiguration): GuiViewer3D;
|
|
244
251
|
|
|
252
|
+
type ViewerSettings = Record<string, any>;
|
|
253
|
+
class ViewerConfiguration {
|
|
254
|
+
[key: string]: any;
|
|
255
|
+
}
|
|
256
|
+
class Viewer3DConfiguration extends ViewerConfiguration {
|
|
257
|
+
settings?: ViewerSettings;
|
|
258
|
+
}
|
|
259
|
+
class SettingsNames {
|
|
260
|
+
static TELEMETRY: string;
|
|
261
|
+
static AXES: string;
|
|
262
|
+
static CAMERA_ANIMATION: string;
|
|
263
|
+
static HIDE_SMALL_ELEMENTS: string;
|
|
264
|
+
static GLOBAL_LIGHT: string;
|
|
265
|
+
static LIGHT_SOURCE: string;
|
|
266
|
+
static ANTI_ALIASING: string;
|
|
267
|
+
static HIDE_SMALL_ELEMENTS_WHEN_NAVIGATING: string;
|
|
268
|
+
static SMALL_ELEMENT_SIZE: string;
|
|
269
|
+
static LABEL_LINE_LENGTH: string;
|
|
270
|
+
static HIDE_EDGES_WHEN_NAVIGATING: string;
|
|
271
|
+
static DISPLAY_MODE: string;
|
|
272
|
+
static NAVIGATION_CUBE: string;
|
|
273
|
+
}
|
|
274
|
+
enum DisplayMode {
|
|
275
|
+
FACES_AND_EDGES = 0,
|
|
276
|
+
FACES = 1,
|
|
277
|
+
EDGES = 2
|
|
278
|
+
}
|
|
279
|
+
enum ValueType {
|
|
280
|
+
STRING = 0,
|
|
281
|
+
NUMBER = 1,
|
|
282
|
+
ENUM = 2,
|
|
283
|
+
BOOL = 3
|
|
284
|
+
}
|
|
245
285
|
interface ILayerManager {
|
|
246
286
|
createLayer(name: string): ILayer;
|
|
247
287
|
deleteLayer(name: string): boolean;
|
|
@@ -310,16 +350,17 @@ declare namespace PilotWeb3D {
|
|
|
310
350
|
CLICK = "click"
|
|
311
351
|
}
|
|
312
352
|
}
|
|
313
|
-
|
|
353
|
+
interface ISettingsManager {
|
|
354
|
+
changeSetting<T>(name: string, value: T, notify?: boolean): void;
|
|
355
|
+
getSettingValue<T>(name: string): T;
|
|
356
|
+
}
|
|
314
357
|
class ExtensionBase {
|
|
315
358
|
protected _viewer: ViewerBase;
|
|
316
359
|
constructor(viewer3D: ViewerBase, options?: object);
|
|
317
360
|
load(): boolean | Promise<boolean>;
|
|
318
361
|
unload(): boolean;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
* @returns {string} Returns the name of the extension.
|
|
322
|
-
*/
|
|
362
|
+
activate() : boolean;
|
|
363
|
+
deactivate(): boolean;
|
|
323
364
|
getName(): string;
|
|
324
365
|
onMouseDown(event: MouseEvent): void;
|
|
325
366
|
onMouseMove(event: MouseEvent): void;
|
|
@@ -330,7 +371,7 @@ declare namespace PilotWeb3D {
|
|
|
330
371
|
|
|
331
372
|
class Extension extends ExtensionBase{
|
|
332
373
|
protected _viewer: Viewer3D;
|
|
333
|
-
constructor(viewer: Viewer3D, options?:
|
|
374
|
+
constructor(viewer: Viewer3D, options?: any);
|
|
334
375
|
}
|
|
335
376
|
|
|
336
377
|
class ExtensionManager {
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pilotdev/pilot-web-3d",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "TypeScript definitions for ASCON Pilot.Web.3D component",
|
|
5
5
|
"main": "",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {},
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"typeScriptVersion": "4.4.3",
|
|
10
|
-
"dependencies": {
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"three": "0.135.0"
|
|
12
|
+
}
|
|
11
13
|
}
|