@tscircuit/3d-viewer 0.0.426 → 0.0.427

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26789,7 +26789,7 @@ import * as THREE14 from "three";
26789
26789
  // package.json
26790
26790
  var package_default = {
26791
26791
  name: "@tscircuit/3d-viewer",
26792
- version: "0.0.425",
26792
+ version: "0.0.426",
26793
26793
  main: "./dist/index.js",
26794
26794
  module: "./dist/index.js",
26795
26795
  type: "module",
@@ -27501,7 +27501,7 @@ var useCameraController = ({
27501
27501
  }) => {
27502
27502
  const controlsRef = useRef5(null);
27503
27503
  const baseDistance = useMemo14(() => {
27504
- const [x, y, z133] = initialCameraPosition ?? [5, 5, 5];
27504
+ const [x, y, z133] = initialCameraPosition ?? [5, -5, 5];
27505
27505
  const distance2 = Math.hypot(
27506
27506
  x - defaultTarget.x,
27507
27507
  y - defaultTarget.y,
@@ -27649,7 +27649,7 @@ var RotationTracker = () => {
27649
27649
  var CadViewerContainer = forwardRef2(
27650
27650
  ({
27651
27651
  children,
27652
- initialCameraPosition = [5, 5, 5],
27652
+ initialCameraPosition = [5, -5, 5],
27653
27653
  autoRotateDisabled,
27654
27654
  clickToInteractEnabled = false,
27655
27655
  boardDimensions,
@@ -29930,22 +29930,22 @@ var CadViewerJscad = forwardRef3(
29930
29930
  }, [soup, circuitJson, childrenSoup]);
29931
29931
  const boardGeom = useBoardGeomBuilder(internalCircuitJson);
29932
29932
  const initialCameraPosition = useMemo19(() => {
29933
- if (!internalCircuitJson) return [5, 5, 5];
29933
+ if (!internalCircuitJson) return [5, -5, 5];
29934
29934
  try {
29935
29935
  const board = su4(internalCircuitJson).pcb_board.list()[0];
29936
- if (!board) return [5, 5, 5];
29936
+ if (!board) return [5, -5, 5];
29937
29937
  const { width: width10, height: height10 } = board;
29938
29938
  if (!width10 && !height10) {
29939
- return [5, 5, 5];
29939
+ return [5, -5, 5];
29940
29940
  }
29941
29941
  const minCameraDistance = 5;
29942
29942
  const adjustedBoardWidth = Math.max(width10, minCameraDistance);
29943
29943
  const adjustedBoardHeight = Math.max(height10, minCameraDistance);
29944
29944
  const largestDim = Math.max(adjustedBoardWidth, adjustedBoardHeight);
29945
- return [largestDim / 2, largestDim / 2, largestDim];
29945
+ return [largestDim / 2, -largestDim / 2, largestDim];
29946
29946
  } catch (e) {
29947
29947
  console.error(e);
29948
- return [5, 5, 5];
29948
+ return [5, -5, 5];
29949
29949
  }
29950
29950
  }, [internalCircuitJson]);
29951
29951
  const boardDimensions = useMemo19(() => {
@@ -31884,12 +31884,12 @@ try {
31884
31884
  return { x: center.x, y: center.y };
31885
31885
  }, [boardData]);
31886
31886
  const initialCameraPosition = useMemo21(() => {
31887
- if (!boardData) return [5, 5, 5];
31887
+ if (!boardData) return [5, -5, 5];
31888
31888
  const { width: width10 = 0, height: height10 = 0 } = boardData;
31889
31889
  const safeWidth = Math.max(width10, 1);
31890
31890
  const safeHeight = Math.max(height10, 1);
31891
31891
  const largestDim = Math.max(safeWidth, safeHeight, 5);
31892
- return [largestDim * 0.75, largestDim * 0.75, largestDim * 0.75];
31892
+ return [largestDim * 0.75, -largestDim * 0.75, largestDim * 0.75];
31893
31893
  }, [boardData]);
31894
31894
  if (manifoldLoadingError) {
31895
31895
  return /* @__PURE__ */ jsxs7(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/3d-viewer",
3
- "version": "0.0.426",
3
+ "version": "0.0.427",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",