@sienci/gviewer 0.1.3 → 0.1.4
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/GCodeSVGRenderer-CUIpGM_S.cjs +1 -0
- package/dist/{GCodeSVGRenderer-CfCN3kNu.js → GCodeSVGRenderer-DBuIVjIT.js} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/viewer.cjs +1 -1
- package/dist/viewer.js +9 -9
- package/package.json +1 -1
- package/dist/GCodeSVGRenderer-mg1clEmp.cjs +0 -1
|
@@ -536,7 +536,7 @@ function KQ(P) {
|
|
|
536
536
|
c(w, -B, w, B, s === 0 ? T : t);
|
|
537
537
|
}
|
|
538
538
|
const z = new E.Group();
|
|
539
|
-
return t.length > 0 && z.add(TQ(t, P.theme.colors.grid.minor, 0.
|
|
539
|
+
return t.length > 0 && z.add(TQ(t, P.theme.colors.grid.minor, 0.25)), T.length > 0 && z.add(TQ(T, P.theme.colors.grid.major, 0.4)), z;
|
|
540
540
|
}
|
|
541
541
|
function TQ(P, Q, B) {
|
|
542
542
|
const A = new E.BufferGeometry();
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),V=require("./GCodeSVGRenderer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),V=require("./GCodeSVGRenderer-CUIpGM_S.cjs");function F(l){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const s in l)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(l,s);Object.defineProperty(u,s,i.get?i:{enumerable:!0,get:()=>l[s]})}}return u.default=l,Object.freeze(u)}const o=F(w),C=o.forwardRef(function(u,s){const{id:i,options:a,callbacks:d,className:m,style:f}=u,c=o.useRef(null),t=o.useRef(null);return o.useEffect(()=>{const e=c.current;if(!e)return;const p=new V.GCodeViewer({id:i,container:e,options:a,callbacks:d});return t.current=p,()=>{t.current=null,p.dispose()}},[i]),o.useEffect(()=>{var e;(e=t.current)==null||e.setOptions(a??{})},[a]),o.useEffect(()=>{var e;(e=t.current)==null||e.setCallbacks(d??{})},[d]),o.useImperativeHandle(s,()=>{const e=()=>{const r=t.current;if(!r)throw new Error("GCodeViewer is not ready.");return r};return{get id(){return i},setCallbacks(r){e().setCallbacks(r)},snapCameraToView(r,n){e().snapCameraToView(r,n)},setBitPosition(r,n){e().setBitPosition(r,n)},setBitVisible(r){e().setBitVisible(r)},setToolpathRotationA(r){e().setToolpathRotationA(r)},hideUntilLine(r,n){e().hideUntilLine(r,n)},seekToLine(r,n){e().seekToLine(r,n)},showAll(){e().showAll()},resetColors(){e().resetColors()},loadFromUrl(r,n){return e().loadFromUrl(r,n)},loadFromFile(r){return e().loadFromFile(r)},loadFromText(r){return e().loadFromText(r)},loadFromLines(r){return e().loadFromLines(r)},loadFromWorkerData(r){return e().loadFromWorkerData(r)},unload(){e().unload()},setOptions(r){e().setOptions(r)},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:c,className:m,style:f})}),G=o.forwardRef(function(u,s){const{id:i,options:a,className:d,style:m}=u,f=o.useRef(null),c=o.useRef(null);return o.useEffect(()=>{const t=f.current;if(!t)return;const e=new V.GCodeSVGRenderer(t,a);return c.current=e,()=>{c.current=null,e.dispose()}},[]),o.useEffect(()=>{var t;a&&((t=c.current)==null||t.setOptions(a))},[a]),o.useImperativeHandle(s,()=>{const t=()=>{const e=c.current;if(!e)throw new Error("GCodeSVGRenderer is not ready.");return e};return{loadFromLines:e=>t().loadFromLines(e),loadFromFile:e=>t().loadFromFile(e),loadFromText:e=>t().loadFromText(e),loadFromWorkerData:e=>t().loadFromWorkerData(e),clear:()=>t().clear(),resetView:()=>t().resetView(),setOptions:e=>t().setOptions(e),setProjectionMode:e=>t().setProjectionMode(e),getSVGElement:()=>t().getSVGElement(),dispose:()=>t().dispose()}},[]),o.createElement("div",{ref:f,className:d,style:{width:"100%",height:"100%",...m}})});exports.GCodeSVGVisualizer=G;exports.GCodeVisualizer=C;
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import { a as F, G as w } from "./GCodeSVGRenderer-
|
|
2
|
+
import { a as F, G as w } from "./GCodeSVGRenderer-DBuIVjIT.js";
|
|
3
3
|
const C = o.forwardRef(
|
|
4
4
|
function(u, c) {
|
|
5
5
|
const { id: a, options: n, callbacks: l, className: f, style: d } = u, i = o.useRef(null), t = o.useRef(null);
|
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-CUIpGM_S.cjs"),a={dark:{background:"#111827",opacity:.9,rapidOpacity:.3,colors:{rapid:"#0ef6ae",cutting:"#3e85c7",laser:"#a855f7",processed:"#6b7280",boundingBox:"#77a9d7",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",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",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",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",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",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",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 e, a as d, V as i, d as c, b as s } from "./GCodeSVGRenderer-DBuIVjIT.js";
|
|
2
2
|
const a = {
|
|
3
3
|
dark: {
|
|
4
4
|
background: "#111827",
|
|
@@ -10,7 +10,7 @@ const a = {
|
|
|
10
10
|
laser: "#a855f7",
|
|
11
11
|
processed: "#6b7280",
|
|
12
12
|
boundingBox: "#77a9d7",
|
|
13
|
-
grid: { major: "#
|
|
13
|
+
grid: { major: "#77a9d7", minor: "#3e6e9e" },
|
|
14
14
|
axes: { x: "#df3b3b", y: "#06b881", z: "#295d8d" }
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -24,7 +24,7 @@ const a = {
|
|
|
24
24
|
laser: "#FF0000",
|
|
25
25
|
processed: "#9ca3af",
|
|
26
26
|
boundingBox: "#5191cc",
|
|
27
|
-
grid: { major: "#
|
|
27
|
+
grid: { major: "#295d8d", minor: "#5191cc" },
|
|
28
28
|
axes: { x: "#df3b3b", y: "#06b881", z: "#295d8d" }
|
|
29
29
|
}
|
|
30
30
|
},
|
|
@@ -38,7 +38,7 @@ const a = {
|
|
|
38
38
|
laser: "#8B7EC8",
|
|
39
39
|
processed: "#6f6e69",
|
|
40
40
|
boundingBox: "#da702c",
|
|
41
|
-
grid: { major: "#
|
|
41
|
+
grid: { major: "#a89984", minor: "#6f6e69" },
|
|
42
42
|
axes: { x: "#d14d41", y: "#879a39", z: "#4385be" }
|
|
43
43
|
}
|
|
44
44
|
},
|
|
@@ -52,7 +52,7 @@ const a = {
|
|
|
52
52
|
laser: "#bb9af7",
|
|
53
53
|
processed: "#565f89",
|
|
54
54
|
boundingBox: "#73daca",
|
|
55
|
-
grid: { major: "#
|
|
55
|
+
grid: { major: "#7aa2f7", minor: "#414868" },
|
|
56
56
|
axes: { x: "#f7768e", y: "#9ece6a", z: "#7aa2f7" }
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -66,7 +66,7 @@ const a = {
|
|
|
66
66
|
laser: "#b16286",
|
|
67
67
|
processed: "#928374",
|
|
68
68
|
boundingBox: "#076678",
|
|
69
|
-
grid: { major: "#
|
|
69
|
+
grid: { major: "#7c6f64", minor: "#a89984" },
|
|
70
70
|
axes: { x: "#cc241d", y: "#98971a", z: "#458588" }
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -80,7 +80,7 @@ const a = {
|
|
|
80
80
|
laser: "#DFBFFF",
|
|
81
81
|
processed: "#6E7C8F",
|
|
82
82
|
boundingBox: "#95E6CB",
|
|
83
|
-
grid: { major: "#
|
|
83
|
+
grid: { major: "#77a9d7", minor: "#3e6590" },
|
|
84
84
|
axes: { x: "#F28779", y: "#D5FF80", z: "#5CCFE6" }
|
|
85
85
|
}
|
|
86
86
|
},
|
|
@@ -94,13 +94,13 @@ const a = {
|
|
|
94
94
|
laser: "#A37ACC",
|
|
95
95
|
processed: "#ADAEB1",
|
|
96
96
|
boundingBox: "#5C6773",
|
|
97
|
-
grid: { major: "#
|
|
97
|
+
grid: { major: "#5c6773", minor: "#9aacba" },
|
|
98
98
|
axes: { x: "#F07171", y: "#86B300", z: "#55B4D4" }
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
e as GCodeSVGRenderer,
|
|
104
104
|
d as GCodeViewer,
|
|
105
105
|
i as ViewCube,
|
|
106
106
|
c as defaultGCodeViewerOptions,
|