@tscircuit/3d-viewer 0.0.564 → 0.0.566
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/dist/index.d.ts +3 -3
- package/dist/index.js +2 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { AnyCircuitElement, PcbBoard } from 'circuit-json';
|
|
3
1
|
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { AnyCircuitElement, PcbBoard } from 'circuit-json';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { GLTFExporterOptions } from 'three-stdlib';
|
|
6
6
|
import { ManifoldToplevel } from 'manifold-3d';
|
|
7
7
|
import { JSDOM } from 'jsdom';
|
|
8
8
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
9
9
|
|
|
10
|
-
declare const CadViewer: (props: any) =>
|
|
10
|
+
declare const CadViewer: (props: any) => React__default.JSX.Element;
|
|
11
11
|
|
|
12
12
|
interface CircuitToSvgOptions {
|
|
13
13
|
width?: number;
|
package/dist/index.js
CHANGED
|
@@ -32321,7 +32321,7 @@ import * as THREE20 from "three";
|
|
|
32321
32321
|
// package.json
|
|
32322
32322
|
var package_default = {
|
|
32323
32323
|
name: "@tscircuit/3d-viewer",
|
|
32324
|
-
version: "0.0.
|
|
32324
|
+
version: "0.0.565",
|
|
32325
32325
|
main: "./dist/index.js",
|
|
32326
32326
|
module: "./dist/index.js",
|
|
32327
32327
|
type: "module",
|
|
@@ -33544,10 +33544,6 @@ var boardMaterialColors = {
|
|
|
33544
33544
|
fr1: colors.fr1Tan,
|
|
33545
33545
|
fr4: colors.fr4Tan
|
|
33546
33546
|
};
|
|
33547
|
-
var tracesMaterialColors = {
|
|
33548
|
-
fr1: colors.fr1TracesWithMaskCopper,
|
|
33549
|
-
fr4: colors.fr4TracesWithoutMaskTan
|
|
33550
|
-
};
|
|
33551
33547
|
var soldermaskColors = {
|
|
33552
33548
|
fr1: colors.fr1SolderMaskGreen,
|
|
33553
33549
|
fr4: colors.fr4SolderMaskGreen
|
|
@@ -33629,15 +33625,6 @@ var createSimplifiedBoardGeom = (circuitJson) => {
|
|
|
33629
33625
|
const material = boardMaterialColors[materialName] ?? colors.fr4Tan;
|
|
33630
33626
|
return [(0, import_colors.colorize)(material, boardGeom)];
|
|
33631
33627
|
};
|
|
33632
|
-
var createBoardGeomFromCircuitJson = (circuitJson, opts = {}) => {
|
|
33633
|
-
console.warn(
|
|
33634
|
-
"createBoardGeomFromCircuitJson is deprecated. Use BoardGeomBuilder or createSimplifiedBoardGeom."
|
|
33635
|
-
);
|
|
33636
|
-
if (opts.simplifiedBoard) {
|
|
33637
|
-
return createSimplifiedBoardGeom(circuitJson);
|
|
33638
|
-
}
|
|
33639
|
-
return createSimplifiedBoardGeom(circuitJson);
|
|
33640
|
-
};
|
|
33641
33628
|
|
|
33642
33629
|
// src/BoardGeomBuilder.ts
|
|
33643
33630
|
var import_colors3 = __toESM(require_colors(), 1);
|
|
@@ -46053,7 +46040,7 @@ async function convertCircuitJsonTo3dSvg(circuitJson, options = {}) {
|
|
|
46053
46040
|
await renderComponent(component, scene);
|
|
46054
46041
|
}
|
|
46055
46042
|
const boardData = su18(circuitJson).pcb_board.list()[0];
|
|
46056
|
-
const boardGeom =
|
|
46043
|
+
const boardGeom = createSimplifiedBoardGeom(circuitJson);
|
|
46057
46044
|
if (boardGeom) {
|
|
46058
46045
|
const solderMaskColor = colors.fr4SolderMaskGreen;
|
|
46059
46046
|
const baseColor = new THREE47.Color(
|