@xtctwins/tctwins-core 1.0.23 → 1.0.25
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/dist/tctwins-core.es.js +3885 -3690
- package/dist/tctwins-core.min.es.js +3 -3
- package/package.json +1 -1
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +14 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +14 -0
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +7 -0
- package/types/viewer/Viewer.d.ts +1 -1
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +9 -0
- package/types/viewer/scene/Component.d.ts +142 -142
- package/types/viewer/scene/scene/Scene.d.ts +1 -1
package/package.json
CHANGED
|
@@ -124,4 +124,18 @@ export declare class AngleMeasurementsPlugin extends Plugin {
|
|
|
124
124
|
* @param e
|
|
125
125
|
*/
|
|
126
126
|
on(event: "mouseLeave", e: any): void;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* trigger when click or touch measure object
|
|
130
|
+
* @param event
|
|
131
|
+
* @param e
|
|
132
|
+
*/
|
|
133
|
+
on(event: "clickMeasure", e: any): void;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* trigger when touch measure object
|
|
137
|
+
* @param event
|
|
138
|
+
* @param e
|
|
139
|
+
*/
|
|
140
|
+
on(event: "touchMeasure", e: any): void;
|
|
127
141
|
}
|
|
@@ -159,4 +159,18 @@ export declare class DistanceMeasurementsPlugin extends Plugin {
|
|
|
159
159
|
* @param e
|
|
160
160
|
*/
|
|
161
161
|
on(event: "mouseLeave", e: any): void;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* trigger when click or touch measure object
|
|
165
|
+
* @param event
|
|
166
|
+
* @param e
|
|
167
|
+
*/
|
|
168
|
+
on(event: "clickMeasure", e: any): void;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* trigger when touch measure object
|
|
172
|
+
* @param event
|
|
173
|
+
* @param e
|
|
174
|
+
*/
|
|
175
|
+
on(event: "touchMeasure", e: any): void;
|
|
162
176
|
}
|
|
@@ -167,4 +167,11 @@ export declare class NavCubePlugin extends Plugin {
|
|
|
167
167
|
* @return {Boolean} True when NavCube projection is synchronized with {@link Camera.projection}.
|
|
168
168
|
*/
|
|
169
169
|
getSynchProjection(): boolean;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Destroys this NavCubePlugin.
|
|
173
|
+
*
|
|
174
|
+
* Does not destroy the canvas the NavCubePlugin was configured with.
|
|
175
|
+
*/
|
|
176
|
+
destroy(): void;
|
|
170
177
|
}
|
package/types/viewer/Viewer.d.ts
CHANGED
|
@@ -117,6 +117,15 @@ export declare class CameraControl extends Component {
|
|
|
117
117
|
*/
|
|
118
118
|
on(event: "doublePickedNothing", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
119
119
|
|
|
120
|
+
on(event: "mouseDownEntity", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
121
|
+
on(event: "mouseDownNothing", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
122
|
+
on(event: "touchEntity", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
123
|
+
on(event: "touchSurface", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
124
|
+
on(event: "touchNothing", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
125
|
+
on(event: "touchDoublePicked", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
126
|
+
on(event: "touchDoublePickedSurface", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
127
|
+
on(event: "touchDoublePickedNothing", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
|
|
128
|
+
|
|
120
129
|
/**
|
|
121
130
|
* 停止漫游
|
|
122
131
|
*/
|
|
@@ -5,151 +5,151 @@ import { Scene } from "./scene/Scene";
|
|
|
5
5
|
* Base class for all xeokit components.
|
|
6
6
|
*/
|
|
7
7
|
export abstract class Component {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
constructor(owner?: any, cfg?: {});
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parent {@link Scene} that contains this Component.
|
|
12
|
+
*
|
|
13
|
+
* @property scene
|
|
14
|
+
* @type {Scene}
|
|
15
|
+
* @final
|
|
16
|
+
*/
|
|
17
|
+
scene: Scene;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The viewer that contains this Scene.
|
|
21
|
+
* @property viewer
|
|
22
|
+
* @type {Viewer}
|
|
23
|
+
*/
|
|
24
|
+
viewer: Viewer;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
27
|
Arbitrary, user-defined metadata on this component.
|
|
28
28
|
|
|
29
29
|
@property metadata
|
|
30
30
|
@type Object
|
|
31
31
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
32
|
+
meta: any;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* ID of this Component, unique within the {@link Scene}.
|
|
36
|
+
*
|
|
37
|
+
* Components are mapped by this ID in {@link Scene.components}.
|
|
38
|
+
*
|
|
39
|
+
* @property id
|
|
40
|
+
* @type {String}
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The {@link Component} that owns the lifecycle of this Component, if any.
|
|
46
|
+
*
|
|
47
|
+
* When that component is destroyed, this component will be automatically destroyed also.
|
|
48
|
+
*
|
|
49
|
+
* Will be null if this Component has no owner.
|
|
50
|
+
*
|
|
51
|
+
* @property owner
|
|
52
|
+
* @type {Component}
|
|
53
|
+
*/
|
|
54
|
+
get owner(): Component;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Tests if this component is of the given type, or is a subclass of the given type.
|
|
58
|
+
* @type {Boolean}
|
|
59
|
+
*/
|
|
60
|
+
isType(type: any): boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fires an event on this component.
|
|
64
|
+
*
|
|
65
|
+
* Notifies existing subscribers to the event, optionally retains the event to give to
|
|
66
|
+
* any subsequent notifications on the event as they are made.
|
|
67
|
+
*
|
|
68
|
+
* @param {String} event The event type name
|
|
69
|
+
* @param {Object} value The event parameters
|
|
70
|
+
* @param {Boolean} [forget=false] When true, does not retain for subsequent subscribers
|
|
71
|
+
*/
|
|
72
|
+
fire(event: string, value: any, forget?: boolean): void;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Subscribes to an event on this component.
|
|
76
|
+
*
|
|
77
|
+
* The callback is be called with this component as scope.
|
|
78
|
+
*
|
|
79
|
+
* @param {String} event The event
|
|
80
|
+
* @param {Function} callback Called fired on the event
|
|
81
|
+
* @param {Object} [scope=this] Scope for the callback
|
|
82
|
+
* @return {String} Handle to the subscription, which may be used to unsubscribe with {@link .off}.
|
|
83
|
+
*/
|
|
84
|
+
on(event: string, callback: Function, scope?: any): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Cancels an event subscription that was previously made with {@link Component.on} or {@link Component.once}.
|
|
88
|
+
*
|
|
89
|
+
* @param {String} subId Subscription ID
|
|
90
|
+
*/
|
|
91
|
+
off(subId: string): void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.
|
|
95
|
+
*
|
|
96
|
+
* This is equivalent to calling {@link Component.on}, and then calling {@link Component.off} inside the callback function.
|
|
97
|
+
*
|
|
98
|
+
* @param {String} event Data event to listen to
|
|
99
|
+
* @param {Function} callback Called when fresh data is available at the event
|
|
100
|
+
* @param {Object} [scope=this] Scope for the callback
|
|
101
|
+
*/
|
|
102
|
+
once(event: string, callback: Function, scope?: any): void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Returns true if there are any subscribers to the given event on this component.
|
|
106
|
+
*
|
|
107
|
+
* @param {String} event The event
|
|
108
|
+
* @return {Boolean} True if there are any subscribers to the given event on this component.
|
|
109
|
+
*/
|
|
110
|
+
hasSubs(event: string): boolean;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Logs a console debugging message for this component.
|
|
114
|
+
*
|
|
115
|
+
* The console message will have this format: *````[LOG] [<component type> <component id>: <message>````*
|
|
116
|
+
*
|
|
117
|
+
* Also fires the message as a "log" event on the parent {@link Scene}.
|
|
118
|
+
*
|
|
119
|
+
* @param {String} message The message to log
|
|
120
|
+
*/
|
|
121
|
+
log(message: string): void;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Logs a warning for this component to the JavaScript console.
|
|
125
|
+
*
|
|
126
|
+
* The console message will have this format: *````[WARN] [<component type> =<component id>: <message>````*
|
|
127
|
+
*
|
|
128
|
+
* Also fires the message as a "warn" event on the parent {@link Scene}.
|
|
129
|
+
*
|
|
130
|
+
* @param {String} message The message to log
|
|
131
|
+
*/
|
|
132
|
+
warn(message: string): void;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Logs an error for this component to the JavaScript console.
|
|
136
|
+
*
|
|
137
|
+
* The console message will have this format: *````[ERROR] [<component type> =<component id>: <message>````*
|
|
138
|
+
*
|
|
139
|
+
* Also fires the message as an "error" event on the parent {@link Scene}.
|
|
140
|
+
*
|
|
141
|
+
* @param {String} message The message to log
|
|
142
|
+
*/
|
|
143
|
+
error(message: string): void;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Destroys all {@link Component}s that are owned by this. These are Components that were instantiated with
|
|
147
|
+
* this Component as their first constructor argument.
|
|
148
|
+
*/
|
|
149
|
+
clear(): void;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Destroys this component.
|
|
153
|
+
*/
|
|
154
|
+
destroy(callback: Function): void;
|
|
155
155
|
}
|