three-slicer-viewer 0.2.5 → 0.3.0

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/COMPONENTS.md CHANGED
@@ -1,4 +1,7 @@
1
- # three-slicer/components
1
+ # three-slicer-viewer/components — the settings form
2
+
3
+ (Published as `three-slicer-viewer/components`, MIT. `three-slicer/components` is the same component with upstream's
4
+ schema, tab tree and toggle rules plugged in; everything below applies to both.)
2
5
 
3
6
  Reusable React components for the browser slicer. Props-driven — no global state, no React context, no router coupling (proven standalone by the tarball consumer gate `packages/pack_check.sh`).
4
7
 
package/README.md CHANGED
@@ -9,6 +9,10 @@ exports; it does not slice. Slicing is plugged in through two props — `slicer`
9
9
  `catalog` (vendor presets) — which `three-slicer/viewer` supplies. Install `three-slicer` for that, and note that
10
10
  doing so puts your application under AGPL.
11
11
 
12
+ Developed in the [`Web_Three_Slicer`](https://github.com/kimgh06/Web_Three_Slicer) monorepo (`packages-mit/`), where it
13
+ is built and tested beside the kernel; this repository is that folder's history, pushed on every release. Issues and
14
+ pull requests are welcome here — a change lands upstream and comes back with the next sync.
15
+
12
16
  ## The viewer
13
17
 
14
18
  ```jsx
package/VIEWER.md CHANGED
@@ -1,4 +1,7 @@
1
- # three-slicer/viewer
1
+ # three-slicer-viewer — the viewer
2
+
3
+ (Published as `three-slicer-viewer`, MIT. `three-slicer/viewer` is the same component with the WASM kernel and the
4
+ vendor catalog plugged in; everything below applies to both.)
2
5
 
3
6
  3D slicer viewer as a React component: three.js viewport (orbit/transform gizmos), model import (STL/OBJ/3MF/AMF/PLY + pluggable formats such as STEP, multi-object, drag & drop), Web Worker slicing via `three-slicer`, support and material painting, per-extruder filament presets, multi-plate, and a GPU-instanced volumetric toolpath preview ported from OrcaSlicer's libvgcode (millions of segments in a single draw path, per-feature colors, layer range slider, G-code export).
4
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "three-slicer-viewer",
3
- "version": "0.2.5",
4
- "description": "The three-slicer viewer without the slicer \u2014 model loading, G-code parsing, GPU toolpath rendering and the settings transforms, under MIT. Plug a slicer in through the `slicer` prop.",
3
+ "version": "0.3.0",
4
+ "description": "The three-slicer viewer without the slicer — model loading, G-code parsing, GPU toolpath rendering and the settings transforms, under MIT. Plug a slicer in through the `slicer` prop.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -76,8 +76,15 @@
76
76
  "optional": true
77
77
  }
78
78
  },
79
+ "devDependencies": {
80
+ "react": "^18.3.1",
81
+ "react-dom": "^18.3.1",
82
+ "three": "^0.160.0",
83
+ "vite": "^5.4.11"
84
+ },
79
85
  "scripts": {
80
86
  "build": "vite build && cp src/make_worker.js dist/make_worker.js",
81
- "prepublishOnly": "npm run build && node test_version_lockstep.mjs && node test_toolpath_contract.mjs"
87
+ "prepublishOnly": "npm run build && node test_version_lockstep.mjs && node test_toolpath_contract.mjs",
88
+ "test": "for f in test_*.mjs; do node $f || exit 1; done"
82
89
  }
83
90
  }
@@ -1,4 +1,4 @@
1
- // three-slicer/viewer/loaders — pure loaders, independent of the kernel.
1
+ // three-slicer-viewer/loaders — pure loaders, independent of the kernel.
2
2
 
3
3
  /** The 5 built-ins plus any extension registered via `registerLoader()`, which pushes onto this array. */
4
4
  export const SUPPORTED_EXT: string[]
@@ -20,7 +20,7 @@ export function loadModel(name: string, buffer: ArrayBuffer): Promise<LoadedObje
20
20
  * so the app wires them up itself. The `<Viewport/>` file dialog and drag-and-drop filters pick them up automatically.
21
21
  *
22
22
  * ```js
23
- * import { registerLoader } from 'three-slicer/viewer/loaders'
23
+ * import { registerLoader } from 'three-slicer-viewer/loaders'
24
24
  * registerLoader('step,stp', async (buffer, name) => [{ name, modelPos }])
25
25
  * ```
26
26
  */