@xtctwins/tctwins-core 1.0.30 → 1.0.32

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,13 +1,13 @@
1
1
  {
2
2
  "name": "@xtctwins/tctwins-core",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es.js",
7
7
  "main": "./dist/tctwins-core.cjs.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "scripts": {
10
- "build": "rollup --config rollup.config.js && rollup --config rollup.minified.config.js",
10
+ "build": "rollup --config rollup.config.js && webpack --config webpack.min.config.js",
11
11
  "dev": "rollup --config rollup.dev.config.js; cp node_modules/web-ifc/web-ifc.wasm dist/.",
12
12
  "test": "percy exec -- node ./snapshots.js",
13
13
  "docs": "rm -Rf ./docs/*; ./node_modules/.bin/esdoc",
@@ -1,11 +1,11 @@
1
- import {Viewer} from "../../viewer";
1
+ import { Viewer } from "../../viewer";
2
2
 
3
3
  /**
4
4
  * A PointerLens shows a magnified view of a {@link Viewer}'s canvas, centered at the position of the
5
5
  * mouse or touch pointer.
6
6
  *
7
7
  * @example
8
- * import { Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "../../dist/xeokit-sdk.es.js";
8
+ * import { Viewer, XTCLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "../../dist/xeokit-sdk.es.js";
9
9
  *
10
10
  * const viewer = new Viewer({
11
11
  * canvasId: "myCanvas",
@@ -16,11 +16,11 @@ import {Viewer} from "../../viewer";
16
16
  * viewer.camera.look = [4.40, 3.72, 8.89];
17
17
  * viewer.camera.up = [-0.01, 0.99, 0.039];
18
18
  *
19
- * const xktLoader = new XKTLoaderPlugin(viewer);
19
+ * const xtcLoader = new XTCLoaderPlugin(viewer);
20
20
  *
21
- * const sceneModel = xktLoader.load({
21
+ * const sceneModel = xtcLoader.load({
22
22
  * id: "myModel",
23
- * src: "../../assets/models/xkt/v10/glTF-Embedded/Duplex_A_20110505.glTFEmbedded.xkt",
23
+ * src: "../../assets/models/xtc/v10/glTF-Embedded/Duplex_A_20110505.glTFEmbedded.xtc",
24
24
  * edges: true
25
25
  * });
26
26
  *
@@ -35,110 +35,112 @@ import {Viewer} from "../../viewer";
35
35
  * angleMeasurementsMouseControl.activate();
36
36
  */
37
37
  export class PointerLens {
38
+ /**
39
+ * Constructs a new PointerLens.
40
+ *
41
+ * @param {Viewer} viewer The Viewer instance.
42
+ * @param {Object} [cfg] PointerLens configuration.
43
+ * @param {boolean} [cfg.active=true] Whether PointerLens is active. The PointerLens can only be shown when this is `true` (default).
44
+ * @param {number} [cfg.zoomFactor=2] The zoom factor for the lens.
45
+ */
46
+ constructor(
47
+ viewer: Viewer,
48
+ cfg?: {
49
+ active?: boolean;
50
+ zoomFactor?: number;
51
+ }
52
+ );
38
53
 
39
- /**
40
- * Constructs a new PointerLens.
41
- *
42
- * @param {Viewer} viewer The Viewer instance.
43
- * @param {Object} [cfg] PointerLens configuration.
44
- * @param {boolean} [cfg.active=true] Whether PointerLens is active. The PointerLens can only be shown when this is `true` (default).
45
- * @param {number} [cfg.zoomFactor=2] The zoom factor for the lens.
46
- */
47
- constructor(viewer: Viewer, cfg?: {
48
- active?: boolean;
49
- zoomFactor?: number;
50
- });
54
+ /**
55
+ * Sets the zoom factor for the lens.
56
+ *
57
+ * This is `2` by default.
58
+ *
59
+ * @param {number} zoomFactor The zoom factor for the lens.
60
+ */
61
+ set zoomFactor(zoomFactor: number);
51
62
 
52
- /**
53
- * Sets the zoom factor for the lens.
54
- *
55
- * This is `2` by default.
56
- *
57
- * @param {number} zoomFactor The zoom factor for the lens.
58
- */
59
- set zoomFactor(zoomFactor: number);
63
+ /**
64
+ * Gets the zoom factor for the lens.
65
+ *
66
+ * This is `2` by default.
67
+ *
68
+ * @returns {number} The zoom factor for the lens.
69
+ */
70
+ get zoomFactor(): number;
60
71
 
61
- /**
62
- * Gets the zoom factor for the lens.
63
- *
64
- * This is `2` by default.
65
- *
66
- * @returns {number} The zoom factor for the lens.
67
- */
68
- get zoomFactor(): number;
72
+ /**
73
+ * Sets the canvas central position of the lens.
74
+ *
75
+ * @param {number[]} centerPos The canvas central position of the lens.
76
+ */
77
+ set centerPos(centerPos: number[]);
69
78
 
70
- /**
71
- * Sets the canvas central position of the lens.
72
- *
73
- * @param {number[]} centerPos The canvas central position of the lens.
74
- */
75
- set centerPos(centerPos: number[]);
79
+ /**
80
+ * Gets the canvas central position of the lens.
81
+ *
82
+ * @returns {number[]} The canvas central position of the lens.
83
+ */
84
+ get centerPos(): number[];
76
85
 
77
- /**
78
- * Gets the canvas central position of the lens.
79
- *
80
- * @returns {number[]} The canvas central position of the lens.
81
- */
82
- get centerPos(): number[];
86
+ /**
87
+ * Sets the canvas coordinates of the pointer.
88
+ *
89
+ * @param {number[]} cursorPos The canvas coordinates of the pointer.
90
+ */
91
+ set cursorPos(cursorPos: number[]);
83
92
 
84
- /**
85
- * Sets the canvas coordinates of the pointer.
86
- *
87
- * @param {number[]} cursorPos The canvas coordinates of the pointer.
88
- */
89
- set cursorPos(cursorPos: number[]);
93
+ /**
94
+ * Gets the canvas coordinates of the pointer.
95
+ *
96
+ * @returns {number[]} The canvas coordinates of the pointer.
97
+ */
98
+ get cursorPos(): number[];
90
99
 
91
- /**
92
- * Gets the canvas coordinates of the pointer.
93
- *
94
- * @returns {number[]} The canvas coordinates of the pointer.
95
- */
96
- get cursorPos(): number[];
100
+ /**
101
+ * Sets whether the cursor has snapped to anything.
102
+ *
103
+ * @param {boolean} snapped Whether the cursor has snapped to anything.
104
+ */
105
+ set snapped(snapped: boolean);
97
106
 
98
- /**
99
- * Sets whether the cursor has snapped to anything.
100
- *
101
- * @param {boolean} snapped Whether the cursor has snapped to anything.
102
- */
103
- set snapped(snapped: boolean);
107
+ /**
108
+ * Gets whether the cursor has snapped to anything.
109
+ *
110
+ * @returns {boolean} Whether the cursor has snapped to anything.
111
+ */
112
+ get snapped(): boolean;
104
113
 
105
- /**
106
- * Gets whether the cursor has snapped to anything.
107
- *
108
- * @returns {boolean} Whether the cursor has snapped to anything.
109
- */
110
- get snapped(): boolean;
114
+ /**
115
+ * Sets if this PointerLens is active.
116
+ *
117
+ * @param {boolean} active Whether this PointerLens is active.
118
+ */
119
+ set active(active: boolean);
111
120
 
112
- /**
113
- * Sets if this PointerLens is active.
114
- *
115
- * @param {boolean} active Whether this PointerLens is active.
116
- */
117
- set active(active: boolean);
121
+ /**
122
+ * Gets if this PointerLens is active.
123
+ *
124
+ * @returns {boolean} Whether this PointerLens is active.
125
+ */
126
+ get active(): boolean;
118
127
 
119
- /**
120
- * Gets if this PointerLens is active.
121
- *
122
- * @returns {boolean} Whether this PointerLens is active.
123
- */
124
- get active(): boolean;
128
+ /**
129
+ * Sets if this PointerLens is visible.
130
+ *
131
+ * @param {boolean} visible Whether this PointerLens is visible.
132
+ */
133
+ set visible(visible: boolean);
125
134
 
126
- /**
127
- * Sets if this PointerLens is visible.
128
- *
129
- * @param {boolean} visible Whether this PointerLens is visible.
130
- */
131
- set visible(visible: boolean);
135
+ /**
136
+ * Gets if this PointerLens is visible.
137
+ *
138
+ * @returns {boolean} Whether this PointerLens is visible.
139
+ */
140
+ get visible(): boolean;
132
141
 
133
- /**
134
- * Gets if this PointerLens is visible.
135
- *
136
- * @returns {boolean} Whether this PointerLens is visible.
137
- */
138
- get visible(): boolean;
139
-
140
- /**
141
- * Destroys this PointerLens.
142
- */
143
- destroy(): void;
142
+ /**
143
+ * Destroys this PointerLens.
144
+ */
145
+ destroy(): void;
144
146
  }
@@ -7,7 +7,7 @@ import { PointerLens } from "../../extras/PointerLens/PointerLens";
7
7
  * Creates {@link AngleMeasurement}s in an {@link AngleMeasurementsPlugin} from mouse input.
8
8
  *
9
9
  * @example
10
- * import { Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "xeokit-sdk.es.js";
10
+ * import { Viewer, XTCLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "xeokit-sdk.es.js";
11
11
  *
12
12
  * const viewer = new Viewer({
13
13
  * canvasId: "myCanvas",
@@ -17,11 +17,11 @@ import { PointerLens } from "../../extras/PointerLens/PointerLens";
17
17
  * viewer.camera.look = [4.40, 3.72, 8.89];
18
18
  * viewer.camera.up = [-0.01, 0.99, 0.039];
19
19
  *
20
- * const xktLoader = new XKTLoaderPlugin(viewer);
20
+ * const xtcLoader = new XTCLoaderPlugin(viewer);
21
21
  *
22
- * const sceneModel = xktLoader.load({
22
+ * const sceneModel = xtcLoader.load({
23
23
  * id: "myModel",
24
- * src: "Duplex.xkt"
24
+ * src: "Duplex.xtc"
25
25
  * });
26
26
  *
27
27
  * const angleMeasurements = new AngleMeasurementsPlugin(viewer);
@@ -6,7 +6,7 @@ import { PointerCircle } from "../../extras/PointerCircle/PointerCircle.js";
6
6
  * Creates {@link AngleMeasurement}s in an {@link AngleMeasurementsPlugin} from mouse input.
7
7
  *
8
8
  * @example
9
- * import { Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "xeokit-sdk.es.js";
9
+ * import { Viewer, XTCLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "xeokit-sdk.es.js";
10
10
  *
11
11
  * const viewer = new Viewer({
12
12
  * canvasId: "myCanvas",
@@ -16,11 +16,11 @@ import { PointerCircle } from "../../extras/PointerCircle/PointerCircle.js";
16
16
  * viewer.camera.look = [4.40, 3.72, 8.89];
17
17
  * viewer.camera.up = [-0.01, 0.99, 0.039];
18
18
  *
19
- * const xktLoader = new XKTLoaderPlugin(viewer);
19
+ * const xtcLoader = new XTCLoaderPlugin(viewer);
20
20
  *
21
- * const sceneModel = xktLoader.load({
21
+ * const sceneModel = xtcLoader.load({
22
22
  * id: "myModel",
23
- * src: "Duplex.xkt"
23
+ * src: "Duplex.xtc"
24
24
  * });
25
25
  *
26
26
  * const angleMeasurements = new AngleMeasurementsPlugin(viewer);