@chestnutlabs/gcode-preview-vue 0.13.0 → 0.14.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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* and staying pure TypeScript keeps the package on the plain tsc build with typed props/emits.
|
|
11
11
|
*/
|
|
12
12
|
import { type PropType } from 'vue';
|
|
13
|
-
import type { BuildVolumeDef, CameraMode, CameraState, CameraView, ColorMode, QualityMode, Theme, TubeOptions } from '@chestnutlabs/gcode-renderer-three';
|
|
13
|
+
import type { BuildVolumeDef, CameraMode, CameraState, CameraView, ColorMode, QualityMode, QualityPolicy, Theme, TubeOptions } from '@chestnutlabs/gcode-renderer-three';
|
|
14
14
|
import type { Confidence, DialectMetadata, Warning } from '@chestnutlabs/toolpath-core';
|
|
15
15
|
import type { MachineGeometry, ProgressObservation } from '@chestnutlabs/toolpath-core';
|
|
16
16
|
import type { WireParseOptions, WorkerLike } from '@chestnutlabs/gcode-parser';
|
|
@@ -45,6 +45,10 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
45
45
|
type: PropType<QualityMode | "auto">;
|
|
46
46
|
default: string;
|
|
47
47
|
};
|
|
48
|
+
qualityMode: {
|
|
49
|
+
type: PropType<QualityPolicy>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
48
52
|
/** #150 (DD-009 D3): camera projection. */
|
|
49
53
|
cameraMode: {
|
|
50
54
|
type: PropType<CameraMode>;
|
|
@@ -130,7 +134,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
130
134
|
};
|
|
131
135
|
/** Advanced/test renderer injectables (pass-throughs of the renderer contract). */
|
|
132
136
|
rendererOptions: {
|
|
133
|
-
type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
|
|
137
|
+
type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
|
|
134
138
|
default: undefined;
|
|
135
139
|
};
|
|
136
140
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -203,6 +207,10 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
203
207
|
type: PropType<QualityMode | "auto">;
|
|
204
208
|
default: string;
|
|
205
209
|
};
|
|
210
|
+
qualityMode: {
|
|
211
|
+
type: PropType<QualityPolicy>;
|
|
212
|
+
default: undefined;
|
|
213
|
+
};
|
|
206
214
|
/** #150 (DD-009 D3): camera projection. */
|
|
207
215
|
cameraMode: {
|
|
208
216
|
type: PropType<CameraMode>;
|
|
@@ -288,7 +296,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
288
296
|
};
|
|
289
297
|
/** Advanced/test renderer injectables (pass-throughs of the renderer contract). */
|
|
290
298
|
rendererOptions: {
|
|
291
|
-
type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
|
|
299
|
+
type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
|
|
292
300
|
default: undefined;
|
|
293
301
|
};
|
|
294
302
|
}>> & Readonly<{
|
|
@@ -335,6 +343,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
335
343
|
renderer: RendererMode;
|
|
336
344
|
buildVolume: BuildVolumeDef | MachineGeometry;
|
|
337
345
|
quality: QualityMode | "auto";
|
|
346
|
+
qualityMode: QualityPolicy;
|
|
338
347
|
cameraMode: CameraMode;
|
|
339
348
|
frameContent: "object" | "all";
|
|
340
349
|
interactionQuality: "auto" | "off";
|
|
@@ -358,6 +367,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
358
367
|
mode?: RendererMode;
|
|
359
368
|
buildVolume?: BuildVolumeDef;
|
|
360
369
|
quality?: QualityMode | "auto";
|
|
370
|
+
qualityMode?: QualityPolicy;
|
|
361
371
|
cameraMode?: CameraMode;
|
|
362
372
|
frameContent?: "object" | "all";
|
|
363
373
|
interactionQuality?: "off" | "auto";
|
|
@@ -369,6 +379,6 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
|
|
|
369
379
|
createRenderer?: (canvas: import("@chestnutlabs/gcode-renderer-three").RenderTargetCanvas) => import("@chestnutlabs/gcode-renderer-three").GLRendererLike;
|
|
370
380
|
scheduleFrame?: (cb: () => void) => void;
|
|
371
381
|
chunksPerTick?: number;
|
|
372
|
-
}, "buildVolume" | "quality" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">;
|
|
382
|
+
}, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">;
|
|
373
383
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
374
384
|
//# sourceMappingURL=gcode-preview-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gcode-preview-component.d.ts","sourceRoot":"","sources":["../src/gcode-preview-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA6C,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/E,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,EACL,WAAW,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,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,OAAO,EAAE;kBAClB,eAAe,GAAG,SAAS;;;;cAGX,MAAM;iBAAW,MAAM;;;;wBAEV,MAAM;oBAAc,MAAM;;;kBAChC,MAAM;iBAAW,WAAW;;;cAC9B,WAAW;YAAM,WAAW;gBAAU,MAAM;;;;;cAG/B,MAAM;iBAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;wBAxClC,UAAU;;;;;;;;;;;;;;;;;;4EAiQ/C,CAAC"}
|
|
@@ -24,6 +24,7 @@ export const GcodePreview = defineComponent({
|
|
|
24
24
|
/** Consumer-configured volume — wins over file-discovered geometry (DD-005 precedence). */
|
|
25
25
|
buildVolume: { type: Object, default: undefined },
|
|
26
26
|
quality: { type: String, default: 'auto' },
|
|
27
|
+
qualityMode: { type: String, default: undefined },
|
|
27
28
|
/** #150 (DD-009 D3): camera projection. */
|
|
28
29
|
cameraMode: { type: String, default: 'perspective' },
|
|
29
30
|
/** #306/#6: frame the printed 'object' (excl. skirt/prime) or 'all' extrusion. Default 'all'. */
|
|
@@ -88,6 +89,7 @@ export const GcodePreview = defineComponent({
|
|
|
88
89
|
mode: props.renderer,
|
|
89
90
|
buildVolume: 'bed' in (props.buildVolume ?? {}) ? undefined : props.buildVolume,
|
|
90
91
|
quality: props.quality,
|
|
92
|
+
qualityMode: props.qualityMode,
|
|
91
93
|
cameraMode: props.cameraMode,
|
|
92
94
|
frameContent: props.frameContent,
|
|
93
95
|
interactionQuality: props.interactionQuality,
|
|
@@ -185,6 +187,10 @@ export const GcodePreview = defineComponent({
|
|
|
185
187
|
preview.controls.setColorMode(mode);
|
|
186
188
|
});
|
|
187
189
|
watch(() => props.quality, (quality) => preview.controls.setQuality(quality));
|
|
190
|
+
watch(() => props.qualityMode, (mode) => {
|
|
191
|
+
if (mode !== undefined)
|
|
192
|
+
preview.controls.setQualityMode(mode);
|
|
193
|
+
});
|
|
188
194
|
watch(() => props.cameraMode, (mode) => preview.controls.setCameraMode(mode));
|
|
189
195
|
watch(() => props.frameContent, (mode) => preview.controls.setFrameContent(mode));
|
|
190
196
|
watch(() => props.interactionQuality, (mode) => preview.controls.setInteractionQuality(mode));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chestnutlabs/gcode-preview-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Thin Vue 3 integration for the Chestnut Labs G-code viewer (DD-007): useGcodePreview composable + GcodePreview component over the framework-neutral parser/renderer/progress packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gcode",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"test": "vitest run"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@chestnutlabs/gcode-parser": "0.
|
|
54
|
-
"@chestnutlabs/gcode-renderer-three": "0.
|
|
55
|
-
"@chestnutlabs/toolpath-core": "0.
|
|
56
|
-
"@chestnutlabs/gcode-preview-core": "0.
|
|
53
|
+
"@chestnutlabs/gcode-parser": "0.14.0",
|
|
54
|
+
"@chestnutlabs/gcode-renderer-three": "0.14.0",
|
|
55
|
+
"@chestnutlabs/toolpath-core": "0.14.0",
|
|
56
|
+
"@chestnutlabs/gcode-preview-core": "0.14.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"vue": "^3.4.0"
|