@chestnutlabs/gcode-preview-svelte 0.14.0 → 0.16.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/dist/GcodePreview.svelte +7 -0
- package/package.json +5 -5
package/dist/GcodePreview.svelte
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
export let quality = 'auto';
|
|
23
23
|
/** Fidelity policy (DD-023 §4 D6): 'full' | 'adaptive' | 'fast'. 3D only. */
|
|
24
24
|
export let qualityMode = undefined;
|
|
25
|
+
/** #60 curtain: 'lines' (default, stream the preview), 'hold' (reveal only the final build), or 'off'. 3D only. */
|
|
26
|
+
export let progressivePreview = undefined;
|
|
25
27
|
/** #150 (DD-009 D3): camera projection ('perspective' | 'orthographic'). */
|
|
26
28
|
export let cameraMode = 'perspective';
|
|
27
29
|
/** #306/#6: frame the printed 'object' (excl. skirt/prime) or 'all' extrusion. Default 'all'. */
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
buildVolume: isMachine ? undefined : buildVolume,
|
|
72
74
|
quality,
|
|
73
75
|
qualityMode,
|
|
76
|
+
progressivePreview,
|
|
74
77
|
cameraMode,
|
|
75
78
|
frameContent,
|
|
76
79
|
interactionQuality,
|
|
@@ -107,6 +110,9 @@
|
|
|
107
110
|
case 'parse-progress':
|
|
108
111
|
dispatch('parseprogress', { bytesProcessed: e.progress.bytesProcessed, totalBytes: e.progress.totalBytes });
|
|
109
112
|
break;
|
|
113
|
+
case 'stage':
|
|
114
|
+
dispatch('stage', { stage: e.stage, progress: e.progress, detail: e.detail });
|
|
115
|
+
break;
|
|
110
116
|
case 'buildComplete': {
|
|
111
117
|
dispatch('buildcomplete', { segments: e.segments, quality: e.quality });
|
|
112
118
|
let disclosure = '';
|
|
@@ -150,6 +156,7 @@
|
|
|
150
156
|
$: if (colorMode !== undefined) preview.controls.setColorMode(colorMode);
|
|
151
157
|
$: preview.controls.setQuality(quality);
|
|
152
158
|
$: if (qualityMode) preview.controls.setQualityMode(qualityMode);
|
|
159
|
+
$: if (progressivePreview) preview.controls.setProgressivePreview(progressivePreview);
|
|
153
160
|
$: preview.controls.setCameraMode(cameraMode);
|
|
154
161
|
$: preview.controls.setFrameContent(frameContent);
|
|
155
162
|
$: preview.controls.setInteractionQuality(interactionQuality);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chestnutlabs/gcode-preview-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Thin Svelte integration for the Chestnut Labs G-code viewer (DD-007 D1 amendment): createGcodePreview store/action API + GcodePreview component as a reactivity bridge over @chestnutlabs/gcode-preview-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gcode",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"test": "vitest run"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@chestnutlabs/gcode-parser": "0.
|
|
59
|
-
"@chestnutlabs/gcode-preview-core": "0.
|
|
60
|
-
"@chestnutlabs/gcode-renderer-three": "0.
|
|
61
|
-
"@chestnutlabs/toolpath-core": "0.
|
|
58
|
+
"@chestnutlabs/gcode-parser": "0.16.0",
|
|
59
|
+
"@chestnutlabs/gcode-preview-core": "0.16.0",
|
|
60
|
+
"@chestnutlabs/gcode-renderer-three": "0.16.0",
|
|
61
|
+
"@chestnutlabs/toolpath-core": "0.16.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"svelte": "^4.0.0 || ^5.0.0"
|