pcb-scene3d-viewer 1.1.1 → 1.1.2

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/docs/api.md CHANGED
@@ -16,6 +16,8 @@ The markup includes:
16
16
  - `[data-scene-3d-preset]` camera preset buttons;
17
17
  - `[data-scene-3d-toggle]` visibility toggles;
18
18
  - `[data-scene-3d-export="models-zip"]` model export action.
19
+ - `[data-scene-3d-adjustment]` transform inputs rendered after a component is
20
+ selected.
19
21
 
20
22
  `translate` is an optional `(key) => string` function. Built-in English
21
23
  fallbacks are used when no translator is provided.
@@ -44,6 +46,11 @@ Methods:
44
46
  - `setSelectedComponent(componentKey)`: highlights and inspects a component.
45
47
  - `dispose()`: releases event listeners, worker clients, and runtime resources.
46
48
 
49
+ When a component is selected, the controller renders live scale, rotation, and
50
+ offset controls in the inspector. Edits are kept in memory for the mounted
51
+ controller only and are forwarded to the runtime through
52
+ `setComponentAdjustment()`.
53
+
47
54
  ## CircuitJSON Input
48
55
 
49
56
  ### `PcbScene3dCircuitJsonAdapter`
@@ -82,6 +89,9 @@ Methods:
82
89
  - `setToggle(toggleName, enabled)`: updates `external-models`,
83
90
  `fallback-bodies`, or `copper`.
84
91
  - `setSelectedDesignator(designator)`: updates highlighted component.
92
+ - `setComponentAdjustment(designator, adjustment)`: applies a live,
93
+ model-local transform adjustment. `adjustment` uses `{ scale, rotationDeg,
94
+ offsetMil }` with X/Y/Z objects in scene units.
85
95
  - `whenReady()`: resolves after initial runtime setup.
86
96
  - `dispose()`: releases renderer, controls, listeners, and DOM nodes.
87
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcb-scene3d-viewer",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Reusable Three.js PCB 3D scene viewer for normalized ECAD and CircuitJSON scene descriptions",
5
5
  "keywords": [
6
6
  "pcb",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "circuitjson-toolkit": "^1.0.1",
55
55
  "fflate": "^0.8.2",
56
- "occt-import-js": "^0.0.23",
56
+ "@sunbox/occt-import-js": "^0.0.25",
57
57
  "three": "^0.183.2"
58
58
  },
59
59
  "devDependencies": {