jscad-electronics 0.0.2 → 0.0.3

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -1
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 tscircuit Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,85 @@
1
1
  # jscad-electronics
2
2
 
3
- ELectronics CAD Components for use with [tscircuit](https://github.com/tscircuit/tscircuit)
3
+ 3D Electronic Component Models for JSCAD and tscircuit
4
+
5
+ [![npm version](https://badge.fury.io/js/jscad-electronics.svg)](https://badge.fury.io/js/jscad-electronics)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ [Docs](https://docs.tscircuit.com) · [Website](https://tscircuit.com) · [Twitter](https://x.com/tscircuit) · [discord](https://tscircuit.com/community/join-redirect) · [Quickstart](https://docs.tscircuit.com/quickstart) · [Online Playground](https://tscircuit.com/playground)
9
+
10
+ jscad-electronics is a library of 3D electronic component models for use with [JSCAD](https://github.com/jscad/OpenJSCAD.org) and [tscircuit](https://github.com/tscircuit/tscircuit). It provides accurate and customizable 3D models for various electronic components, making it easier to create 3D representations of PCBs and electronic assemblies.
11
+
12
+ ## Features
13
+
14
+ - Wide range of electronic component models (e.g., resistors, capacitors, ICs, connectors)
15
+ - Customizable dimensions and parameters for each component
16
+ - Integration with tscircuit for advanced PCB design capabilities
17
+ - Easy-to-use React components for JSCAD integration
18
+
19
+ ## Installation
20
+
21
+ Install jscad-electronics using npm:
22
+
23
+ ```bash
24
+ npm install jscad-electronics
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ Here's a basic example of how to use jscad-electronics with JSCAD:
30
+
31
+ ```jsx
32
+ import { JsCadFixture } from "jscad-fiber"
33
+ import { SOT233P, ExtrudedPads } from "jscad-electronics"
34
+
35
+ export default () => {
36
+ return (
37
+ <JsCadFixture zAxisUp>
38
+ <SOT233P />
39
+ <ExtrudedPads footprint="sot23" />
40
+ </JsCadFixture>
41
+ )
42
+ }
43
+ ```
44
+
45
+ This example creates a 3D model of an SOT-23-3P component with extruded pads.
46
+
47
+ ## Available Components
48
+
49
+ jscad-electronics includes models for various components, including:
50
+
51
+ - Resistors (0402, 0603, 0805)
52
+ - Capacitors
53
+ - ICs (DIP, SOIC, TSSOP, QFN, QFP, BGA)
54
+ - Diodes (SOD-123)
55
+ - Transistors (SOT-23, SOT-563, SOT-723)
56
+ - And more!
57
+
58
+ Check the `lib` directory for a full list of available components.
59
+
60
+ ## Customization
61
+
62
+ Most components accept parameters for customization. For example:
63
+
64
+ ```jsx
65
+ <QFN fullWidth={4} height={0.8} thermalPadSize={2} />
66
+ ```
67
+
68
+ Refer to the individual component files for available customization options.
69
+
70
+ ## Integration with tscircuit
71
+
72
+ jscad-electronics is designed to work seamlessly with tscircuit. You can use these 3D models in your tscircuit projects to create accurate 3D representations of your PCB designs just by
73
+ using the `footprint` prop
74
+
75
+ ## Contributing
76
+
77
+ Contributions are welcome! Please feel free to submit a Pull Request.
78
+
79
+ ## License
80
+
81
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
82
+
83
+ ## Support
84
+
85
+ If you encounter any problems or have any questions, please open an issue on the [GitHub repository](https://github.com/tscircuit/jscad-electronics/issues).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscad-electronics",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "main": "./dist/index.js",
6
6
  "repository": {
7
7
  "type": "git",