circuit-json-to-gltf 0.0.150 → 0.0.151
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 +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4005 -3848
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -76,6 +76,7 @@ convertCircuitJsonToGltf(circuitJson: CircuitJson, options?: ConversionOptions):
|
|
|
76
76
|
- `silkscreenColor`: Silkscreen color in board textures; overrides `pcb_board.silkscreen_color`
|
|
77
77
|
- `solderMaskWithCopperColor`: Color of traces and copper covered by solder mask; otherwise derived from the solder-mask color
|
|
78
78
|
- `drillColor`: Drill opening color in board textures
|
|
79
|
+
- `showReferenceSurfaces`: Render `cad_reference_surface` records as translucent rectangles with outlines, outward normal arrows, and `PART.surface` labels (default: `false`). Explicit width/height are respected; frames without extents use a 10 mm diagnostic rectangle. Works without an owner CAD model.
|
|
79
80
|
- `showBoundingBoxes`: Show bounding boxes for debugging (default: `false`)
|
|
80
81
|
- `projectBaseUrl`: Optional base URL used to resolve `node_modules` model assets via `/package_files/download`
|
|
81
82
|
- `authHeaders`: Optional auth headers for model downloads, e.g. `{ Authorization: "Bearer ..." }`
|
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ interface ConversionOptions {
|
|
|
50
50
|
silkscreenColor?: string;
|
|
51
51
|
solderMaskWithCopperColor?: string;
|
|
52
52
|
drillColor?: string;
|
|
53
|
+
/** Show named CAD reference surfaces as diagnostic frames. Defaults to false. */
|
|
54
|
+
showReferenceSurfaces?: boolean;
|
|
53
55
|
showBoundingBoxes?: boolean;
|
|
54
56
|
coordinateTransform?: CoordinateTransformConfig;
|
|
55
57
|
projectBaseUrl?: string;
|
|
@@ -132,6 +134,8 @@ interface Box3D {
|
|
|
132
134
|
rotation?: Point3;
|
|
133
135
|
color?: Color;
|
|
134
136
|
sideColor?: Color;
|
|
137
|
+
/** Explicit CAD color override, distinct from the fallback mesh color. */
|
|
138
|
+
materialColorOverride?: string;
|
|
135
139
|
texture?: {
|
|
136
140
|
top?: string;
|
|
137
141
|
bottom?: string;
|
|
@@ -200,6 +204,8 @@ interface CircuitTo3DOptions {
|
|
|
200
204
|
/** Include full Circuit JSON error messages for screen overlay renderers. Defaults to false. */
|
|
201
205
|
showErrors?: boolean;
|
|
202
206
|
coordinateTransform?: CoordinateTransformConfig;
|
|
207
|
+
/** Show named CAD reference surfaces as diagnostic frames. Defaults to false. */
|
|
208
|
+
showReferenceSurfaces?: boolean;
|
|
203
209
|
showBoundingBoxes?: boolean;
|
|
204
210
|
projectBaseUrl?: string;
|
|
205
211
|
authHeaders?: AuthHeaders;
|