包详细信息

circuit-json-to-simple-3d

seveibar2.6k0.0.5

Convert Circuit JSON into a simplified 3d representation, suitable for visual snapshot testing or inspecting prior to assembly.

自述文件

circuit-json-to-simple-3d

Convert Circuit JSON into a simplified 3d representation, suitable for visual snapshot testing or inspecting prior to assembly.

example 3d svg

Usage

import { convertCircuitJsonToSimple3dSvg } from "circuit-json-to-simple-3d"

// Basic usage
convertCircuitJsonToSimple3dSvg(circuitJson)
// <svg>...</svg>

// With options
convertCircuitJsonToSimple3dSvg(circuitJson, {
  anglePreset: "angle1", // "angle1" | "angle2" | "left" | "right" | "left-raised" | "right-raised"
  defaultZoomMultiplier: 1.5, // Zoom level multiplier
  background: {
    color: "#ffffff", // CSS color value
    opacity: 0.8 // Opacity (0-1)
  },
  width: 800, // SVG width
  height: 600, // SVG height
})