@tscircuit/3d-viewer 0.0.640 → 0.0.641
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 +4 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,6 +121,7 @@ const svgString = await convert3dCircuitToSvg(circuitJson, options)
|
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
The `convert3dCircuitToSvg` function accepts the following options:
|
|
124
|
+
|
|
124
125
|
- `width`: Width of the output SVG (default: 800)
|
|
125
126
|
- `height`: Height of the output SVG (default: 600)
|
|
126
127
|
- `backgroundColor`: Background color in hex format (default: "#ffffff")
|
|
@@ -137,6 +138,7 @@ The `convert3dCircuitToSvg` function accepts the following options:
|
|
|
137
138
|
Main component for rendering the 3D PCB viewer.
|
|
138
139
|
|
|
139
140
|
Props:
|
|
141
|
+
|
|
140
142
|
- `circuit-json`: (optional) An array of AnyCircuitElement objects representing the PCB layout.
|
|
141
143
|
- `children`: (optional) React children elements describing the PCB layout (alternative to using `circuit-json`).
|
|
142
144
|
- `resolveStaticAsset`: (optional) Function that receives each component model URL (`obj`, `wrl`, `stl`, `gltf`, `glb`, `step`) and returns the resolved URL to load.
|
|
@@ -146,12 +148,14 @@ Props:
|
|
|
146
148
|
Defines the PCB board dimensions.
|
|
147
149
|
|
|
148
150
|
Props:
|
|
151
|
+
|
|
149
152
|
- `width`: Width of the board (e.g., "20mm").
|
|
150
153
|
- `height`: Height of the board (e.g., "20mm").
|
|
151
154
|
|
|
152
155
|
### Component Elements
|
|
153
156
|
|
|
154
157
|
Various component elements can be used as children of the `<board>` element:
|
|
158
|
+
|
|
155
159
|
- `<resistor>`
|
|
156
160
|
- `<capacitor>`
|
|
157
161
|
- `<chip>`
|
|
@@ -306,7 +310,6 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
306
310
|
|
|
307
311
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
308
312
|
|
|
309
|
-
|
|
310
313
|
### Section views
|
|
311
314
|
|
|
312
315
|
Right-click the viewer and choose **Advanced → Section View…**.
|
package/dist/index.js
CHANGED
|
@@ -22344,7 +22344,7 @@ import * as THREE31 from "three";
|
|
|
22344
22344
|
// package.json
|
|
22345
22345
|
var package_default = {
|
|
22346
22346
|
name: "@tscircuit/3d-viewer",
|
|
22347
|
-
version: "0.0.
|
|
22347
|
+
version: "0.0.640",
|
|
22348
22348
|
repository: {
|
|
22349
22349
|
type: "git",
|
|
22350
22350
|
url: "https://github.com/tscircuit/3d-viewer"
|
|
@@ -22860,6 +22860,7 @@ var Canvas = forwardRef(
|
|
|
22860
22860
|
mountRef.current.removeChild(renderer.domElement);
|
|
22861
22861
|
}
|
|
22862
22862
|
renderer.dispose();
|
|
22863
|
+
renderer.forceContextLoss();
|
|
22863
22864
|
scene.remove(rootObject.current);
|
|
22864
22865
|
if (window.__TSCIRCUIT_THREE_OBJECT === rootObject.current) {
|
|
22865
22866
|
window.__TSCIRCUIT_THREE_OBJECT = void 0;
|