https://github.com/drsensor/_______
https://github.com/drsensor/_______
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/drsensor/_______
- Owner: DrSensor
- Created: 2024-11-26T22:02:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-26T23:04:32.000Z (over 1 year ago)
- Last Synced: 2025-02-14T05:30:53.945Z (over 1 year ago)
- Language: TypeScript
- Size: 1.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @tscircuit/core
[tscircuit](https://github.com/tscircuit/tscircuit) · [Development Guide](./docs/DEVELOPMENT.md)
A rewrite of [tscircuit builder](https://github.com/tscircuit/builder) with a ThreeJS/react-three-like API and architecture.
## Usage
```tsx
import { Board, Resistor, Led, Trace, Project } from "@tscircuit/core"
const project = new Project()
const board = new Board({
width: "10mm",
height: "10mm",
})
project.add(board)
const R1 = new Resistor({ resistance: "10k", footprint: "0402" })
board.add(R1)
// You can also add elements with React
board.add()
const trace = new Trace({ width: "0.2mm" })
trace.connect(R1.output, LED1.anode)
board.add(trace)
project.getJson() // [{ type: "board", ...}, { type: "resistor", ...}, ...]
```