beckhoff-xts-viewer-3d 0.3.1 → 2.0.0

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 CHANGED
@@ -25,26 +25,26 @@ import { XtsViewer3D } from 'beckhoff-xts-viewer-3d';
25
25
  config={{
26
26
  processingUnits: [
27
27
  {
28
- index: 0,
28
+ objectId: 0,
29
29
  moverType: 'AT9014_0055',
30
30
  parts: [
31
31
  {
32
+ objectId: 0,
32
33
  globalNumber: 0,
33
- index: 0,
34
34
  modules: [
35
- { moduleType: 'AT2001_0250' },
36
- { moduleType: 'AT2000_0250' },
37
- { moduleType: 'AT2050_0500' },
38
- { moduleType: 'AT2050_0501' },
39
- { moduleType: 'AT2001_0250' },
40
- { moduleType: 'AT2000_0250' },
41
- { moduleType: 'AT2050_0500' },
42
- { moduleType: 'AT2050_0501' },
35
+ { moduleType: 'AT2001_0250', globalNumber: 1 },
36
+ { moduleType: 'AT2000_0250', globalNumber: 2 },
37
+ { moduleType: 'AT2050_0500', globalNumber: 3 },
38
+ { moduleType: 'AT2050_0501', globalNumber: 4 },
39
+ { moduleType: 'AT2001_0250', globalNumber: 5 },
40
+ { moduleType: 'AT2000_0250', globalNumber: 6 },
41
+ { moduleType: 'AT2050_0500', globalNumber: 7 },
42
+ { moduleType: 'AT2050_0501', globalNumber: 8 },
43
43
  ],
44
44
  },
45
45
  ],
46
46
  movers: [
47
- { moverIndex: 0, id: 'mover-0', partOid: 0, partPositionMm: 200 },
47
+ { index: 0, id: 0, partOid: 0, partPositionMm: 200 },
48
48
  ],
49
49
  },
50
50
  ],
@@ -137,8 +137,10 @@ reflections, ACES tone mapping and anisotropic textures are on by default.
137
137
  - **CAD ViewCube** — opt-in, snap to standard orthogonal views.
138
138
  - **Imperative ref API** — `zoomToFit` / `setCamera` / `getCamera` /
139
139
  `getMoverWorldTransform` / `getBoundingBox` / `exportModel` /
140
- `exportScreenshot` / `setMoverPosition(s)` / `getMoverPosition` /
141
- `checkMoverCollisions` / `reloadAssets`.
140
+ `exportScreenshot` / `setMoverPosition(s)` (Record or
141
+ `MoverPositionEntry[]` indexed by `MoverConfig.index`) / `getMoverPosition` /
142
+ `setModuleStatuses` / `clearModuleStatuses` / `checkMoverCollisions` /
143
+ `reloadAssets`.
142
144
  - **Designed for scale** — the `⚡ Perf stress` demo runs three ovals × 250
143
145
  movers each (= 750 simultaneously animated movers) without React commits
144
146
  during the steady state.
@@ -254,7 +256,7 @@ function App() {
254
256
  useEffect(() => {
255
257
  let raf = 0;
256
258
  const tick = (t: number) => {
257
- viewerRef.current?.setMoverPosition('mover-0', (t / 5) % 3000);
259
+ viewerRef.current?.setMoverPosition(0, (t / 5) % 3000);
258
260
  raf = requestAnimationFrame(tick);
259
261
  };
260
262
  raf = requestAnimationFrame(tick);
@@ -434,12 +436,12 @@ areas, stops, ghosts, and `getMoverWorldTransform` all follow:
434
436
  ```tsx
435
437
  processingUnits: [
436
438
  {
437
- index: 0,
439
+ objectId: 0,
438
440
  moverType: 'AT9014_0055',
439
441
  positionFrame: { direction: 'negative', originMm: 1500 },
440
442
  parts: [/* … */],
441
443
  movers: [
442
- { moverIndex: 0, id: 'mover-0', partOid: 0, partPositionMm: 0 },
444
+ { index: 0, id: 0, partOid: 0, partPositionMm: 0 },
443
445
  ],
444
446
  },
445
447
  ]
@@ -526,16 +528,6 @@ Webpack / Next.js: alias `three` to your root `node_modules/three`. See
526
528
  for the full snippets and how to bust Vite's pre-bundle cache after the
527
529
  change.
528
530
 
529
- ### Known harmless console warnings
530
-
531
- - **`THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.`**
532
- — emitted by `@react-three/fiber`'s root-store factory
533
- (`new THREE.Clock()` inside its internal `events-*.esm.js`). three.js
534
- deprecated `Clock` in r183; functional behaviour is unchanged and
535
- frame timing still works correctly. The warning will disappear once
536
- r3f migrates its root store to `THREE.Timer`. Not actionable on the
537
- consumer side; safe to ignore.
538
-
539
531
  ---
540
532
 
541
533
  ## Documentation