@cadit-app/image-extrude 0.1.1 → 0.3.2
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/README.md +18 -0
- package/dist/bundle.js +61754 -0
- package/dist/src/params.js +5 -5
- package/dist/src/resvg.d.ts +3 -0
- package/dist/src/resvg.d.ts.map +1 -1
- package/dist/src/resvg.js +33 -16
- package/dist/src/tracing.d.ts +4 -0
- package/dist/src/tracing.d.ts.map +1 -1
- package/dist/src/tracing.js +5 -1
- package/package.json +28 -13
- package/src/crossSectionUtils.ts +0 -30
- package/src/main.ts +0 -77
- package/src/makeCrossSection.ts +0 -57
- package/src/manifoldUtils.ts +0 -13
- package/src/params.ts +0 -70
- package/src/resvg.ts +0 -63
- package/src/threeMfExport.ts +0 -67
- package/src/tracing.ts +0 -94
- package/src/types.d.ts +0 -40
- package/src/utils.ts +0 -55
package/README.md
CHANGED
|
@@ -94,6 +94,24 @@ const manifold = crossSection.extrude(5);
|
|
|
94
94
|
| `maxWidth` | `number` | Maximum width in mm |
|
|
95
95
|
| `despeckleSize` | `number` | Remove spots smaller than this (trace only) |
|
|
96
96
|
|
|
97
|
+
## Build & Bundle
|
|
98
|
+
|
|
99
|
+
This package ships as a **pre-bundled** ES module for browser use.
|
|
100
|
+
|
|
101
|
+
### Why we bundle
|
|
102
|
+
|
|
103
|
+
CADit's script runtime uses esbuild to bundle external scripts at runtime, fetching dependencies from CDN (esm.sh). Some dependencies like `potrace` (which uses `jimp` for image processing) don't work correctly when fetched from CDN due to complex browser shims.
|
|
104
|
+
|
|
105
|
+
By pre-bundling at publish time, we ensure:
|
|
106
|
+
- All dependencies are resolved correctly at build time
|
|
107
|
+
- The bundle works reliably in CADit's browser environment
|
|
108
|
+
- No CDN resolution issues at runtime
|
|
109
|
+
|
|
110
|
+
### Exports
|
|
111
|
+
|
|
112
|
+
- **Default** (`@cadit-app/image-extrude`): Pre-bundled version for CADit/browser use
|
|
113
|
+
- **Unbundled** (`@cadit-app/image-extrude/unbundled`): TypeScript-compiled modules for Node.js/CLI use
|
|
114
|
+
|
|
97
115
|
## License
|
|
98
116
|
|
|
99
117
|
MIT
|