graphics-debug 0.0.75 → 0.0.76
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/chunk-7KPSBUOD.js +34 -0
- package/dist/chunk-7KPSBUOD.js.map +1 -0
- package/dist/cli/cli.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/react.js +1 -1
- package/dist/lib/setStepOfAllObjects.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XIPXIFXO.js +0 -31
- package/dist/chunk-XIPXIFXO.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// lib/setStepOfAllObjects.ts
|
|
2
|
+
function setStepOfAllObjects(graphics, step) {
|
|
3
|
+
if (graphics.points) {
|
|
4
|
+
for (const p of graphics.points) {
|
|
5
|
+
p.step = step;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
if (graphics.lines) {
|
|
9
|
+
for (const line of graphics.lines) {
|
|
10
|
+
line.step = step;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (graphics.rects) {
|
|
14
|
+
for (const rect of graphics.rects) {
|
|
15
|
+
rect.step = step;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (graphics.circles) {
|
|
19
|
+
for (const circle of graphics.circles) {
|
|
20
|
+
circle.step = step;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (graphics.texts) {
|
|
24
|
+
for (const text of graphics.texts) {
|
|
25
|
+
text.step = step;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return graphics;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
setStepOfAllObjects
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-7KPSBUOD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../lib/setStepOfAllObjects.ts"],"sourcesContent":["import type { GraphicsObject } from \"./types\"\n\nexport function setStepOfAllObjects(\n graphics: GraphicsObject,\n step: number,\n): GraphicsObject {\n if (graphics.points) {\n for (const p of graphics.points) {\n p.step = step\n }\n }\n if (graphics.lines) {\n for (const line of graphics.lines) {\n line.step = step\n }\n }\n if (graphics.rects) {\n for (const rect of graphics.rects) {\n rect.step = step\n }\n }\n if (graphics.circles) {\n for (const circle of graphics.circles) {\n circle.step = step\n }\n }\n if (graphics.texts) {\n for (const text of graphics.texts) {\n text.step = step\n }\n }\n return graphics\n}\n"],"mappings":";AAEO,SAAS,oBACd,UACA,MACgB;AAChB,MAAI,SAAS,QAAQ;AACnB,eAAW,KAAK,SAAS,QAAQ;AAC/B,QAAE,OAAO;AAAA,IACX;AAAA,EACF;AACA,MAAI,SAAS,OAAO;AAClB,eAAW,QAAQ,SAAS,OAAO;AACjC,WAAK,OAAO;AAAA,IACd;AAAA,EACF;AACA,MAAI,SAAS,OAAO;AAClB,eAAW,QAAQ,SAAS,OAAO;AACjC,WAAK,OAAO;AAAA,IACd;AAAA,EACF;AACA,MAAI,SAAS,SAAS;AACpB,eAAW,UAAU,SAAS,SAAS;AACrC,aAAO,OAAO;AAAA,IAChB;AAAA,EACF;AACA,MAAI,SAAS,OAAO;AAClB,eAAW,QAAQ,SAAS,OAAO;AACjC,WAAK,OAAO;AAAA,IACd;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/cli/cli.js
CHANGED
package/dist/lib/index.js
CHANGED
package/dist/lib/react.js
CHANGED
package/package.json
CHANGED
package/dist/chunk-XIPXIFXO.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// lib/setStepOfAllObjects.ts
|
|
2
|
-
function setStepOfAllObjects(graphics, step) {
|
|
3
|
-
return {
|
|
4
|
-
...graphics,
|
|
5
|
-
points: graphics.points?.map((p) => ({
|
|
6
|
-
...p,
|
|
7
|
-
step
|
|
8
|
-
})),
|
|
9
|
-
lines: graphics.lines?.map((line) => ({
|
|
10
|
-
...line,
|
|
11
|
-
step
|
|
12
|
-
})),
|
|
13
|
-
rects: graphics.rects?.map((rect) => ({
|
|
14
|
-
...rect,
|
|
15
|
-
step
|
|
16
|
-
})),
|
|
17
|
-
circles: graphics.circles?.map((circle) => ({
|
|
18
|
-
...circle,
|
|
19
|
-
step
|
|
20
|
-
})),
|
|
21
|
-
texts: graphics.texts?.map((text) => ({
|
|
22
|
-
...text,
|
|
23
|
-
step
|
|
24
|
-
}))
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
setStepOfAllObjects
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=chunk-XIPXIFXO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../lib/setStepOfAllObjects.ts"],"sourcesContent":["import type { GraphicsObject } from \"./types\"\n\nexport function setStepOfAllObjects(\n graphics: GraphicsObject,\n step: number,\n): GraphicsObject {\n return {\n ...graphics,\n points: graphics.points?.map((p) => ({\n ...p,\n step,\n })),\n lines: graphics.lines?.map((line) => ({\n ...line,\n step,\n })),\n rects: graphics.rects?.map((rect) => ({\n ...rect,\n step,\n })),\n circles: graphics.circles?.map((circle) => ({\n ...circle,\n step,\n })),\n texts: graphics.texts?.map((text) => ({\n ...text,\n step,\n })),\n }\n}\n"],"mappings":";AAEO,SAAS,oBACd,UACA,MACgB;AAChB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,SAAS,QAAQ,IAAI,CAAC,OAAO;AAAA,MACnC,GAAG;AAAA,MACH;AAAA,IACF,EAAE;AAAA,IACF,OAAO,SAAS,OAAO,IAAI,CAAC,UAAU;AAAA,MACpC,GAAG;AAAA,MACH;AAAA,IACF,EAAE;AAAA,IACF,OAAO,SAAS,OAAO,IAAI,CAAC,UAAU;AAAA,MACpC,GAAG;AAAA,MACH;AAAA,IACF,EAAE;AAAA,IACF,SAAS,SAAS,SAAS,IAAI,CAAC,YAAY;AAAA,MAC1C,GAAG;AAAA,MACH;AAAA,IACF,EAAE;AAAA,IACF,OAAO,SAAS,OAAO,IAAI,CAAC,UAAU;AAAA,MACpC,GAAG;AAAA,MACH;AAAA,IACF,EAAE;AAAA,EACJ;AACF;","names":[]}
|