@sienci/gviewer 0.1.16 → 0.1.18
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 +25 -0
- package/dist/{GCodeSVGRenderer-AJzTt7mi.js → GCodeSVGRenderer-DZeQSwum.js} +670 -573
- package/dist/{GCodeSVGRenderer-BOliBeEd.cjs → GCodeSVGRenderer-eKBgdYHt.cjs} +3 -3
- package/dist/react.cjs +1 -1
- package/dist/react.js +67 -61
- package/dist/types/viewer/GCodeViewer.d.ts +35 -0
- package/dist/types/viewer/bed/machineBed.d.ts +10 -0
- package/dist/types/viewer/grid/grid.d.ts +6 -3
- package/dist/types/viewer/types.d.ts +22 -1
- package/dist/viewer.cjs +1 -1
- package/dist/viewer.js +11 -4
- package/package.json +1 -1
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),V=require("./GCodeSVGRenderer-eKBgdYHt.cjs");function G(a){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(d,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return d.default=a,Object.freeze(d)}const o=G(w),C=o.forwardRef(function(d,s){const{id:i,options:l,callbacks:c,className:m,style:f}=d,u=o.useRef(null),r=o.useRef(null);return o.useEffect(()=>{const e=u.current;if(!e)return;const p=new V.GCodeViewer({id:i,container:e,options:l,callbacks:c});return r.current=p,()=>{r.current=null,p.dispose()}},[i]),o.useEffect(()=>{var e;(e=r.current)==null||e.setOptions(l??{})},[l]),o.useEffect(()=>{var e;(e=r.current)==null||e.setCallbacks(c??{})},[c]),o.useImperativeHandle(s,()=>{const e=()=>{const t=r.current;if(!t)throw new Error("GCodeViewer is not ready.");return t};return{get id(){return i},setCallbacks(t){e().setCallbacks(t)},snapCameraToView(t,n){e().snapCameraToView(t,n)},setRotateEnabled(t){e().setRotateEnabled(t)},screenToWorld(t,n,F){return e().screenToWorld(t,n,F)},setBitPosition(t,n){e().setBitPosition(t,n)},setBitVisible(t){e().setBitVisible(t)},setBitSpinning(t){e().setBitSpinning(t)},setToolpathRotationA(t){e().setToolpathRotationA(t)},hideUntilLine(t,n){e().hideUntilLine(t,n)},seekToLine(t,n){e().seekToLine(t,n)},showAll(){e().showAll()},resetColors(){e().resetColors()},loadFromUrl(t,n){return e().loadFromUrl(t,n)},loadFromFile(t){return e().loadFromFile(t)},loadFromText(t){return e().loadFromText(t)},loadFromLines(t){return e().loadFromLines(t)},loadFromWorkerData(t){return e().loadFromWorkerData(t)},unload(){e().unload()},setOptions(t){e().setOptions(t)},getOptions(){return e().getOptions()},resize(){e().resize()},focusToModel(){e().focusToModel()},resetCamera(){e().resetCamera()},getBounds(){return e().getBounds()},dispose(){e().dispose()}}},[i]),o.createElement("div",{ref:u,className:m,style:f})}),g=o.forwardRef(function(d,s){const{id:i,options:l,className:c,style:m}=d,f=o.useRef(null),u=o.useRef(null);return o.useEffect(()=>{const r=f.current;if(!r)return;const e=new V.GCodeSVGRenderer(r,l);return u.current=e,()=>{u.current=null,e.dispose()}},[]),o.useEffect(()=>{var r;l&&((r=u.current)==null||r.setOptions(l))},[l]),o.useImperativeHandle(s,()=>{const r=()=>{const e=u.current;if(!e)throw new Error("GCodeSVGRenderer is not ready.");return e};return{loadFromLines:e=>r().loadFromLines(e),loadFromFile:e=>r().loadFromFile(e),loadFromText:e=>r().loadFromText(e),loadFromWorkerData:e=>r().loadFromWorkerData(e),loadFromPrecomputedGroups:e=>r().loadFromPrecomputedGroups(e),clear:()=>r().clear(),resetView:()=>r().resetView(),setOptions:e=>r().setOptions(e),setProjectionMode:e=>r().setProjectionMode(e),setBitPosition:e=>r().setBitPosition(e),setBitVisible:e=>r().setBitVisible(e),getSVGElement:()=>r().getSVGElement(),dispose:()=>r().dispose()}},[]),o.createElement("div",{ref:f,className:c,style:{width:"100%",height:"100%",...m}})});exports.GCodeSVGVisualizer=g;exports.GCodeVisualizer=C;
|
package/dist/react.js
CHANGED
|
@@ -1,58 +1,64 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import { a as
|
|
3
|
-
const
|
|
2
|
+
import { a as w, G as V } from "./GCodeSVGRenderer-DZeQSwum.js";
|
|
3
|
+
const G = o.forwardRef(
|
|
4
4
|
function(u, c) {
|
|
5
|
-
const { id: a, options: n, callbacks: l, className: m, style: d } = u, i = o.useRef(null),
|
|
5
|
+
const { id: a, options: n, callbacks: l, className: m, style: d } = u, i = o.useRef(null), r = o.useRef(null);
|
|
6
6
|
return o.useEffect(() => {
|
|
7
7
|
const e = i.current;
|
|
8
8
|
if (!e)
|
|
9
9
|
return;
|
|
10
|
-
const f = new
|
|
11
|
-
return
|
|
12
|
-
|
|
10
|
+
const f = new w({ id: a, container: e, options: n, callbacks: l });
|
|
11
|
+
return r.current = f, () => {
|
|
12
|
+
r.current = null, f.dispose();
|
|
13
13
|
};
|
|
14
14
|
}, [a]), o.useEffect(() => {
|
|
15
15
|
var e;
|
|
16
|
-
(e =
|
|
16
|
+
(e = r.current) == null || e.setOptions(n ?? {});
|
|
17
17
|
}, [n]), o.useEffect(() => {
|
|
18
18
|
var e;
|
|
19
|
-
(e =
|
|
19
|
+
(e = r.current) == null || e.setCallbacks(l ?? {});
|
|
20
20
|
}, [l]), o.useImperativeHandle(
|
|
21
21
|
c,
|
|
22
22
|
() => {
|
|
23
23
|
const e = () => {
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
24
|
+
const t = r.current;
|
|
25
|
+
if (!t)
|
|
26
26
|
throw new Error("GCodeViewer is not ready.");
|
|
27
|
-
return
|
|
27
|
+
return t;
|
|
28
28
|
};
|
|
29
29
|
return {
|
|
30
30
|
get id() {
|
|
31
31
|
return a;
|
|
32
32
|
},
|
|
33
|
-
setCallbacks(
|
|
34
|
-
e().setCallbacks(
|
|
33
|
+
setCallbacks(t) {
|
|
34
|
+
e().setCallbacks(t);
|
|
35
35
|
},
|
|
36
|
-
snapCameraToView(
|
|
37
|
-
e().snapCameraToView(
|
|
36
|
+
snapCameraToView(t, s) {
|
|
37
|
+
e().snapCameraToView(t, s);
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
e().
|
|
39
|
+
setRotateEnabled(t) {
|
|
40
|
+
e().setRotateEnabled(t);
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
e().
|
|
42
|
+
screenToWorld(t, s, F) {
|
|
43
|
+
return e().screenToWorld(t, s, F);
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
e().
|
|
45
|
+
setBitPosition(t, s) {
|
|
46
|
+
e().setBitPosition(t, s);
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
e().
|
|
48
|
+
setBitVisible(t) {
|
|
49
|
+
e().setBitVisible(t);
|
|
50
50
|
},
|
|
51
|
-
|
|
52
|
-
e().
|
|
51
|
+
setBitSpinning(t) {
|
|
52
|
+
e().setBitSpinning(t);
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
e().
|
|
54
|
+
setToolpathRotationA(t) {
|
|
55
|
+
e().setToolpathRotationA(t);
|
|
56
|
+
},
|
|
57
|
+
hideUntilLine(t, s) {
|
|
58
|
+
e().hideUntilLine(t, s);
|
|
59
|
+
},
|
|
60
|
+
seekToLine(t, s) {
|
|
61
|
+
e().seekToLine(t, s);
|
|
56
62
|
},
|
|
57
63
|
showAll() {
|
|
58
64
|
e().showAll();
|
|
@@ -60,26 +66,26 @@ const C = o.forwardRef(
|
|
|
60
66
|
resetColors() {
|
|
61
67
|
e().resetColors();
|
|
62
68
|
},
|
|
63
|
-
loadFromUrl(
|
|
64
|
-
return e().loadFromUrl(
|
|
69
|
+
loadFromUrl(t, s) {
|
|
70
|
+
return e().loadFromUrl(t, s);
|
|
65
71
|
},
|
|
66
|
-
loadFromFile(
|
|
67
|
-
return e().loadFromFile(
|
|
72
|
+
loadFromFile(t) {
|
|
73
|
+
return e().loadFromFile(t);
|
|
68
74
|
},
|
|
69
|
-
loadFromText(
|
|
70
|
-
return e().loadFromText(
|
|
75
|
+
loadFromText(t) {
|
|
76
|
+
return e().loadFromText(t);
|
|
71
77
|
},
|
|
72
|
-
loadFromLines(
|
|
73
|
-
return e().loadFromLines(
|
|
78
|
+
loadFromLines(t) {
|
|
79
|
+
return e().loadFromLines(t);
|
|
74
80
|
},
|
|
75
|
-
loadFromWorkerData(
|
|
76
|
-
return e().loadFromWorkerData(
|
|
81
|
+
loadFromWorkerData(t) {
|
|
82
|
+
return e().loadFromWorkerData(t);
|
|
77
83
|
},
|
|
78
84
|
unload() {
|
|
79
85
|
e().unload();
|
|
80
86
|
},
|
|
81
|
-
setOptions(
|
|
82
|
-
e().setOptions(
|
|
87
|
+
setOptions(t) {
|
|
88
|
+
e().setOptions(t);
|
|
83
89
|
},
|
|
84
90
|
getOptions() {
|
|
85
91
|
return e().getOptions();
|
|
@@ -104,39 +110,39 @@ const C = o.forwardRef(
|
|
|
104
110
|
[a]
|
|
105
111
|
), o.createElement("div", { ref: i, className: m, style: d });
|
|
106
112
|
}
|
|
107
|
-
),
|
|
113
|
+
), R = o.forwardRef(
|
|
108
114
|
function(u, c) {
|
|
109
115
|
const { id: a, options: n, className: l, style: m } = u, d = o.useRef(null), i = o.useRef(null);
|
|
110
116
|
return o.useEffect(() => {
|
|
111
|
-
const
|
|
112
|
-
if (!
|
|
113
|
-
const e = new
|
|
117
|
+
const r = d.current;
|
|
118
|
+
if (!r) return;
|
|
119
|
+
const e = new V(r, n);
|
|
114
120
|
return i.current = e, () => {
|
|
115
121
|
i.current = null, e.dispose();
|
|
116
122
|
};
|
|
117
123
|
}, []), o.useEffect(() => {
|
|
118
|
-
var
|
|
119
|
-
n && ((
|
|
124
|
+
var r;
|
|
125
|
+
n && ((r = i.current) == null || r.setOptions(n));
|
|
120
126
|
}, [n]), o.useImperativeHandle(c, () => {
|
|
121
|
-
const
|
|
127
|
+
const r = () => {
|
|
122
128
|
const e = i.current;
|
|
123
129
|
if (!e) throw new Error("GCodeSVGRenderer is not ready.");
|
|
124
130
|
return e;
|
|
125
131
|
};
|
|
126
132
|
return {
|
|
127
|
-
loadFromLines: (e) =>
|
|
128
|
-
loadFromFile: (e) =>
|
|
129
|
-
loadFromText: (e) =>
|
|
130
|
-
loadFromWorkerData: (e) =>
|
|
131
|
-
loadFromPrecomputedGroups: (e) =>
|
|
132
|
-
clear: () =>
|
|
133
|
-
resetView: () =>
|
|
134
|
-
setOptions: (e) =>
|
|
135
|
-
setProjectionMode: (e) =>
|
|
136
|
-
setBitPosition: (e) =>
|
|
137
|
-
setBitVisible: (e) =>
|
|
138
|
-
getSVGElement: () =>
|
|
139
|
-
dispose: () =>
|
|
133
|
+
loadFromLines: (e) => r().loadFromLines(e),
|
|
134
|
+
loadFromFile: (e) => r().loadFromFile(e),
|
|
135
|
+
loadFromText: (e) => r().loadFromText(e),
|
|
136
|
+
loadFromWorkerData: (e) => r().loadFromWorkerData(e),
|
|
137
|
+
loadFromPrecomputedGroups: (e) => r().loadFromPrecomputedGroups(e),
|
|
138
|
+
clear: () => r().clear(),
|
|
139
|
+
resetView: () => r().resetView(),
|
|
140
|
+
setOptions: (e) => r().setOptions(e),
|
|
141
|
+
setProjectionMode: (e) => r().setProjectionMode(e),
|
|
142
|
+
setBitPosition: (e) => r().setBitPosition(e),
|
|
143
|
+
setBitVisible: (e) => r().setBitVisible(e),
|
|
144
|
+
getSVGElement: () => r().getSVGElement(),
|
|
145
|
+
dispose: () => r().dispose()
|
|
140
146
|
};
|
|
141
147
|
}, []), o.createElement("div", {
|
|
142
148
|
ref: d,
|
|
@@ -146,6 +152,6 @@ const C = o.forwardRef(
|
|
|
146
152
|
}
|
|
147
153
|
);
|
|
148
154
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
155
|
+
R as GCodeSVGVisualizer,
|
|
156
|
+
G as GCodeVisualizer
|
|
151
157
|
};
|
|
@@ -20,11 +20,13 @@ export declare class GCodeViewer implements GCodeViewerHandle {
|
|
|
20
20
|
private axesGroup;
|
|
21
21
|
private gridLabelsGroup;
|
|
22
22
|
private boundingBoxGroup;
|
|
23
|
+
private machineBedGroup;
|
|
23
24
|
private bitMarker;
|
|
24
25
|
private preLaserBitType;
|
|
25
26
|
private toolpathStreams;
|
|
26
27
|
private toolpathCutBucketCount;
|
|
27
28
|
private toolpathRotationA;
|
|
29
|
+
private lastBitPosition;
|
|
28
30
|
private sim3dHandle;
|
|
29
31
|
private currentLines;
|
|
30
32
|
private linePositions;
|
|
@@ -47,6 +49,37 @@ export declare class GCodeViewer implements GCodeViewerHandle {
|
|
|
47
49
|
durationMs?: number;
|
|
48
50
|
distance?: number;
|
|
49
51
|
}): void;
|
|
52
|
+
/**
|
|
53
|
+
* Enable or disable orbit *rotation* while leaving pan and zoom untouched.
|
|
54
|
+
*
|
|
55
|
+
* Used to pin the camera to a fixed view (e.g. top-down) so a press-and-hold
|
|
56
|
+
* gesture is not interpreted as a rotate-drag and the picked plane stays
|
|
57
|
+
* stable under the cursor. Picking (screenToWorld) works from any camera
|
|
58
|
+
* orientation, so this is a UX lock, not a correctness requirement.
|
|
59
|
+
*/
|
|
60
|
+
setRotateEnabled(enabled: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
* Convert a viewport pixel (clientX/clientY, e.g. from a PointerEvent) into a
|
|
63
|
+
* point on a horizontal toolpath plane, in the scene's coordinate space.
|
|
64
|
+
*
|
|
65
|
+
* A ray is cast from the camera through the pixel and intersected with the
|
|
66
|
+
* plane Z = `planeZ`, which defaults to the bit's current Z so the pick lands
|
|
67
|
+
* on the plane the tool is sitting on. Returns null when the pixel is outside
|
|
68
|
+
* a laid-out canvas or the ray is parallel to the plane (no intersection).
|
|
69
|
+
*
|
|
70
|
+
* The result is in world/scene space. The toolpath root sits at the origin,
|
|
71
|
+
* so for a normal (non-rotary) file this equals the gcode work coordinate.
|
|
72
|
+
* For a rotary file the toolpath root is rotated about X, so the returned XY
|
|
73
|
+
* is not a meaningful work coordinate — callers supporting only XY moves
|
|
74
|
+
* should gate on file type.
|
|
75
|
+
*/
|
|
76
|
+
screenToWorld(clientX: number, clientY: number, options?: {
|
|
77
|
+
planeZ?: number;
|
|
78
|
+
}): {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
z: number;
|
|
82
|
+
} | null;
|
|
50
83
|
private startSnapToView;
|
|
51
84
|
loadFromUrl(url: string, args?: {
|
|
52
85
|
signal?: AbortSignal;
|
|
@@ -71,11 +104,13 @@ export declare class GCodeViewer implements GCodeViewerHandle {
|
|
|
71
104
|
private renderGridAndAxes;
|
|
72
105
|
private refreshGridLabels;
|
|
73
106
|
private refreshBoundingBox;
|
|
107
|
+
private refreshMachineBed;
|
|
74
108
|
private setBitMarker;
|
|
75
109
|
private setGridGroup;
|
|
76
110
|
private setAxesGroup;
|
|
77
111
|
private setGridLabelsGroup;
|
|
78
112
|
private setBoundingBoxGroup;
|
|
113
|
+
private setMachineBedGroup;
|
|
79
114
|
private setGeometryEmpty;
|
|
80
115
|
private setToolpathGeometry;
|
|
81
116
|
private refreshToolpathColors;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import type { GCodeViewerOptions } from "../types";
|
|
3
|
+
export declare function createMachineBedGroup(min: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}, max: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}, options: GCodeViewerOptions): THREE.Group;
|
|
10
|
+
export declare function disposeMachineBedGroup(group: THREE.Object3D): void;
|
|
@@ -3,18 +3,21 @@ import type { GCodeViewerOptions, GridUnits } from "../types";
|
|
|
3
3
|
import { disposeSpriteGroup } from "../render/textSprite";
|
|
4
4
|
export declare function createUnitGrid(args: {
|
|
5
5
|
units: GridUnits;
|
|
6
|
-
|
|
6
|
+
sizeXMm: number;
|
|
7
|
+
sizeYMm: number;
|
|
7
8
|
theme: GCodeViewerOptions["render"]["theme"];
|
|
8
9
|
}): THREE.Group;
|
|
9
10
|
export declare function disposeLineSegmentsGroup(group: THREE.Object3D): void;
|
|
10
11
|
export declare function createAxes(args: {
|
|
11
|
-
|
|
12
|
+
sizeXWorld: number;
|
|
13
|
+
sizeYWorld: number;
|
|
12
14
|
depthWorld: number;
|
|
13
15
|
theme: GCodeViewerOptions["render"]["theme"];
|
|
14
16
|
}): THREE.Group;
|
|
15
17
|
export declare function disposeAxesGroup(group: THREE.Object3D): void;
|
|
16
18
|
export declare function createGridLabels(args: {
|
|
17
|
-
|
|
19
|
+
sizeXMm: number;
|
|
20
|
+
sizeYMm: number;
|
|
18
21
|
units: GridUnits;
|
|
19
22
|
theme: GCodeViewerOptions["render"]["theme"];
|
|
20
23
|
}): THREE.Group;
|
|
@@ -10,6 +10,7 @@ export type GCodeViewerTheme = {
|
|
|
10
10
|
laser?: string;
|
|
11
11
|
processed?: string;
|
|
12
12
|
boundingBox: string;
|
|
13
|
+
machineBed: string;
|
|
13
14
|
grid: {
|
|
14
15
|
major: string;
|
|
15
16
|
minor: string;
|
|
@@ -55,7 +56,8 @@ export type GCodeViewerOptions = {
|
|
|
55
56
|
mode: "hide" | "grey";
|
|
56
57
|
};
|
|
57
58
|
grid: {
|
|
58
|
-
|
|
59
|
+
sizeX: number;
|
|
60
|
+
sizeY: number;
|
|
59
61
|
axisDepth: number;
|
|
60
62
|
labels: boolean;
|
|
61
63
|
};
|
|
@@ -63,6 +65,17 @@ export type GCodeViewerOptions = {
|
|
|
63
65
|
visible: boolean;
|
|
64
66
|
labels: boolean;
|
|
65
67
|
};
|
|
68
|
+
machineBed: {
|
|
69
|
+
visible: boolean;
|
|
70
|
+
min: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
} | null;
|
|
74
|
+
max: {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
} | null;
|
|
78
|
+
};
|
|
66
79
|
geometry: {
|
|
67
80
|
arcSegments: number;
|
|
68
81
|
batching: {
|
|
@@ -140,6 +153,14 @@ export type GCodeViewerHandle = {
|
|
|
140
153
|
durationMs?: number;
|
|
141
154
|
distance?: number;
|
|
142
155
|
}): void;
|
|
156
|
+
setRotateEnabled(enabled: boolean): void;
|
|
157
|
+
screenToWorld(clientX: number, clientY: number, options?: {
|
|
158
|
+
planeZ?: number;
|
|
159
|
+
}): {
|
|
160
|
+
x: number;
|
|
161
|
+
y: number;
|
|
162
|
+
z: number;
|
|
163
|
+
} | null;
|
|
143
164
|
setBitPosition(position: GCodeViewerBitPosition, options?: {
|
|
144
165
|
immediate?: boolean;
|
|
145
166
|
}): void;
|
package/dist/viewer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GCodeSVGRenderer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GCodeSVGRenderer-eKBgdYHt.cjs"),a={dark:{background:"#111827",opacity:.9,rapidOpacity:.3,colors:{rapid:"#0ef6ae",cutting:"#3e85c7",laser:"#a855f7",processed:"#6b7280",boundingBox:"#77a9d7",machineBed:"#f5a623",grid:{major:"#77a9d7",minor:"#3e6e9e"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},light:{background:"#e5e7eb",opacity:.9,rapidOpacity:.3,colors:{rapid:"#295d8d",cutting:"#111827",laser:"#FF0000",processed:"#9ca3af",boundingBox:"#5191cc",machineBed:"#b45309",grid:{major:"#295d8d",minor:"#5191cc"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},"flexoki-dark":{background:"#100f0f",opacity:.9,rapidOpacity:.3,colors:{rapid:"#DA702C",cutting:"#3AA99F",laser:"#8B7EC8",processed:"#6f6e69",boundingBox:"#da702c",machineBed:"#ffcc66",grid:{major:"#a89984",minor:"#6f6e69"},axes:{x:"#d14d41",y:"#879a39",z:"#4385be"}}},"tokyo-night":{background:"#1a1b26",opacity:.9,rapidOpacity:.3,colors:{rapid:"#ff9e64",cutting:"#7dcfff",laser:"#bb9af7",processed:"#565f89",boundingBox:"#73daca",machineBed:"#e0af68",grid:{major:"#7aa2f7",minor:"#414868"},axes:{x:"#f7768e",y:"#9ece6a",z:"#7aa2f7"}}},"gruvbox-light":{background:"#fbf1c7",opacity:.9,rapidOpacity:.3,colors:{rapid:"#d65d0e",cutting:"#3c3836",laser:"#b16286",processed:"#928374",boundingBox:"#076678",machineBed:"#d79921",grid:{major:"#7c6f64",minor:"#a89984"},axes:{x:"#cc241d",y:"#98971a",z:"#458588"}}},"ayu-dark":{background:"#0b0e14",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FFA659",cutting:"#73D0FF",laser:"#DFBFFF",processed:"#6E7C8F",boundingBox:"#95E6CB",machineBed:"#FFD173",grid:{major:"#77a9d7",minor:"#3e6590"},axes:{x:"#F28779",y:"#D5FF80",z:"#5CCFE6"}}},"ayu-light":{background:"#fafafa",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FA8D3E",cutting:"#22A4E6",laser:"#A37ACC",processed:"#ADAEB1",boundingBox:"#5C6773",machineBed:"#F2AE49",grid:{major:"#5c6773",minor:"#9aacba"},axes:{x:"#F07171",y:"#86B300",z:"#55B4D4"}}}};exports.GCodeSVGRenderer=e.GCodeSVGRenderer;exports.GCodeViewer=e.GCodeViewer;exports.ViewCube=e.ViewCube;exports.defaultGCodeViewerOptions=e.defaultGCodeViewerOptions;exports.defaultGCodeViewerTheme=e.defaultGCodeViewerTheme;exports.gCodeViewerThemePresets=a;
|
package/dist/viewer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as
|
|
1
|
+
import { G as o, a as r, V as i, d as c, b as n } from "./GCodeSVGRenderer-DZeQSwum.js";
|
|
2
2
|
const a = {
|
|
3
3
|
dark: {
|
|
4
4
|
background: "#111827",
|
|
@@ -10,6 +10,7 @@ const a = {
|
|
|
10
10
|
laser: "#a855f7",
|
|
11
11
|
processed: "#6b7280",
|
|
12
12
|
boundingBox: "#77a9d7",
|
|
13
|
+
machineBed: "#f5a623",
|
|
13
14
|
grid: { major: "#77a9d7", minor: "#3e6e9e" },
|
|
14
15
|
axes: { x: "#df3b3b", y: "#06b881", z: "#295d8d" }
|
|
15
16
|
}
|
|
@@ -24,6 +25,7 @@ const a = {
|
|
|
24
25
|
laser: "#FF0000",
|
|
25
26
|
processed: "#9ca3af",
|
|
26
27
|
boundingBox: "#5191cc",
|
|
28
|
+
machineBed: "#b45309",
|
|
27
29
|
grid: { major: "#295d8d", minor: "#5191cc" },
|
|
28
30
|
axes: { x: "#df3b3b", y: "#06b881", z: "#295d8d" }
|
|
29
31
|
}
|
|
@@ -38,6 +40,7 @@ const a = {
|
|
|
38
40
|
laser: "#8B7EC8",
|
|
39
41
|
processed: "#6f6e69",
|
|
40
42
|
boundingBox: "#da702c",
|
|
43
|
+
machineBed: "#ffcc66",
|
|
41
44
|
grid: { major: "#a89984", minor: "#6f6e69" },
|
|
42
45
|
axes: { x: "#d14d41", y: "#879a39", z: "#4385be" }
|
|
43
46
|
}
|
|
@@ -52,6 +55,7 @@ const a = {
|
|
|
52
55
|
laser: "#bb9af7",
|
|
53
56
|
processed: "#565f89",
|
|
54
57
|
boundingBox: "#73daca",
|
|
58
|
+
machineBed: "#e0af68",
|
|
55
59
|
grid: { major: "#7aa2f7", minor: "#414868" },
|
|
56
60
|
axes: { x: "#f7768e", y: "#9ece6a", z: "#7aa2f7" }
|
|
57
61
|
}
|
|
@@ -66,6 +70,7 @@ const a = {
|
|
|
66
70
|
laser: "#b16286",
|
|
67
71
|
processed: "#928374",
|
|
68
72
|
boundingBox: "#076678",
|
|
73
|
+
machineBed: "#d79921",
|
|
69
74
|
grid: { major: "#7c6f64", minor: "#a89984" },
|
|
70
75
|
axes: { x: "#cc241d", y: "#98971a", z: "#458588" }
|
|
71
76
|
}
|
|
@@ -80,6 +85,7 @@ const a = {
|
|
|
80
85
|
laser: "#DFBFFF",
|
|
81
86
|
processed: "#6E7C8F",
|
|
82
87
|
boundingBox: "#95E6CB",
|
|
88
|
+
machineBed: "#FFD173",
|
|
83
89
|
grid: { major: "#77a9d7", minor: "#3e6590" },
|
|
84
90
|
axes: { x: "#F28779", y: "#D5FF80", z: "#5CCFE6" }
|
|
85
91
|
}
|
|
@@ -94,16 +100,17 @@ const a = {
|
|
|
94
100
|
laser: "#A37ACC",
|
|
95
101
|
processed: "#ADAEB1",
|
|
96
102
|
boundingBox: "#5C6773",
|
|
103
|
+
machineBed: "#F2AE49",
|
|
97
104
|
grid: { major: "#5c6773", minor: "#9aacba" },
|
|
98
105
|
axes: { x: "#F07171", y: "#86B300", z: "#55B4D4" }
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
};
|
|
102
109
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
o as GCodeSVGRenderer,
|
|
111
|
+
r as GCodeViewer,
|
|
105
112
|
i as ViewCube,
|
|
106
113
|
c as defaultGCodeViewerOptions,
|
|
107
|
-
|
|
114
|
+
n as defaultGCodeViewerTheme,
|
|
108
115
|
a as gCodeViewerThemePresets
|
|
109
116
|
};
|