@xtctwins/tctwins-core 1.0.23 → 1.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtctwins/tctwins-core",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es.js",
@@ -68,4 +68,4 @@
68
68
  "/dist",
69
69
  "/types"
70
70
  ]
71
- }
71
+ }
@@ -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
  }
@@ -258,5 +258,5 @@ export declare class Viewer {
258
258
 
259
259
  /** Destroys this Viewer.
260
260
  */
261
- destroy(): void;
261
+ destroy(callback: Function): void;
262
262
  }
@@ -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
- 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
- /**
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
- 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(): void;
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
  }
@@ -858,5 +858,5 @@ export declare class Scene extends Component {
858
858
  /**
859
859
  * Destroys this Scene.
860
860
  */
861
- destroy(): void;
861
+ destroy(callback: Function): void;
862
862
  }