@pooder/kit 5.3.0 → 5.3.1
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/.test-dist/src/CanvasService.js +249 -249
- package/.test-dist/src/ViewportSystem.js +75 -75
- package/.test-dist/src/background.js +203 -203
- package/.test-dist/src/bridgeSelection.js +20 -20
- package/.test-dist/src/constraints.js +237 -237
- package/.test-dist/src/dieline.js +818 -818
- package/.test-dist/src/edgeScale.js +12 -12
- package/.test-dist/src/feature.js +826 -826
- package/.test-dist/src/featureComplete.js +32 -32
- package/.test-dist/src/film.js +167 -167
- package/.test-dist/src/geometry.js +506 -506
- package/.test-dist/src/image.js +1250 -1250
- package/.test-dist/src/maskOps.js +270 -270
- package/.test-dist/src/mirror.js +104 -104
- package/.test-dist/src/renderSpec.js +2 -2
- package/.test-dist/src/ruler.js +343 -343
- package/.test-dist/src/sceneLayout.js +99 -99
- package/.test-dist/src/sceneLayoutModel.js +196 -196
- package/.test-dist/src/sceneView.js +40 -40
- package/.test-dist/src/sceneVisibility.js +42 -42
- package/.test-dist/src/size.js +332 -332
- package/.test-dist/src/tracer.js +544 -544
- package/.test-dist/src/white-ink.js +829 -829
- package/.test-dist/src/wrappedOffsets.js +33 -33
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +108 -20
- package/dist/index.mjs +108 -20
- package/package.json +1 -1
- package/src/coordinate.ts +106 -106
- package/src/extensions/background.ts +230 -230
- package/src/extensions/bridgeSelection.ts +17 -17
- package/src/extensions/constraints.ts +322 -322
- package/src/extensions/dieline.ts +46 -0
- package/src/extensions/edgeScale.ts +19 -19
- package/src/extensions/feature.ts +1021 -1021
- package/src/extensions/featureComplete.ts +46 -46
- package/src/extensions/film.ts +194 -194
- package/src/extensions/geometry.ts +752 -719
- package/src/extensions/image.ts +1926 -1924
- package/src/extensions/index.ts +11 -11
- package/src/extensions/maskOps.ts +283 -283
- package/src/extensions/mirror.ts +128 -128
- package/src/extensions/ruler.ts +451 -451
- package/src/extensions/sceneLayout.ts +140 -140
- package/src/extensions/sceneLayoutModel.ts +352 -342
- package/src/extensions/sceneVisibility.ts +71 -71
- package/src/extensions/size.ts +389 -389
- package/src/extensions/tracer.ts +58 -19
- package/src/extensions/white-ink.ts +1400 -1400
- package/src/extensions/wrappedOffsets.ts +33 -33
- package/src/index.ts +2 -2
- package/src/services/CanvasService.ts +300 -300
- package/src/services/ViewportSystem.ts +95 -95
- package/src/services/index.ts +3 -3
- package/src/services/renderSpec.ts +18 -18
- package/src/units.ts +27 -27
- package/tests/run.ts +118 -118
- package/tsconfig.test.json +15 -15
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SceneViewService = void 0;
|
|
4
|
-
class SceneViewService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.id = "pooder.kit.sceneView";
|
|
7
|
-
this.metadata = {
|
|
8
|
-
name: "SceneViewService",
|
|
9
|
-
};
|
|
10
|
-
this.onToolActivated = (e) => {
|
|
11
|
-
this.activeToolId = e.id;
|
|
12
|
-
this.apply();
|
|
13
|
-
};
|
|
14
|
-
this.onObjectAdded = () => {
|
|
15
|
-
this.apply();
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
activate(context) {
|
|
19
|
-
this.canvasService = context.services.get("CanvasService");
|
|
20
|
-
context.eventBus.on("tool:activated", this.onToolActivated);
|
|
21
|
-
context.eventBus.on("object:added", this.onObjectAdded);
|
|
22
|
-
}
|
|
23
|
-
deactivate(context) {
|
|
24
|
-
context.eventBus.off("tool:activated", this.onToolActivated);
|
|
25
|
-
context.eventBus.off("object:added", this.onObjectAdded);
|
|
26
|
-
this.activeToolId = undefined;
|
|
27
|
-
this.canvasService = undefined;
|
|
28
|
-
}
|
|
29
|
-
apply() {
|
|
30
|
-
if (!this.canvasService || !this.activeToolId)
|
|
31
|
-
return;
|
|
32
|
-
const dielineLayer = this.canvasService.getLayer("dieline-overlay");
|
|
33
|
-
if (dielineLayer) {
|
|
34
|
-
const visible = this.activeToolId !== "pooder.kit.image";
|
|
35
|
-
dielineLayer.set({ visible });
|
|
36
|
-
}
|
|
37
|
-
this.canvasService.requestRenderAll();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.SceneViewService = SceneViewService;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SceneViewService = void 0;
|
|
4
|
+
class SceneViewService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.id = "pooder.kit.sceneView";
|
|
7
|
+
this.metadata = {
|
|
8
|
+
name: "SceneViewService",
|
|
9
|
+
};
|
|
10
|
+
this.onToolActivated = (e) => {
|
|
11
|
+
this.activeToolId = e.id;
|
|
12
|
+
this.apply();
|
|
13
|
+
};
|
|
14
|
+
this.onObjectAdded = () => {
|
|
15
|
+
this.apply();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
activate(context) {
|
|
19
|
+
this.canvasService = context.services.get("CanvasService");
|
|
20
|
+
context.eventBus.on("tool:activated", this.onToolActivated);
|
|
21
|
+
context.eventBus.on("object:added", this.onObjectAdded);
|
|
22
|
+
}
|
|
23
|
+
deactivate(context) {
|
|
24
|
+
context.eventBus.off("tool:activated", this.onToolActivated);
|
|
25
|
+
context.eventBus.off("object:added", this.onObjectAdded);
|
|
26
|
+
this.activeToolId = undefined;
|
|
27
|
+
this.canvasService = undefined;
|
|
28
|
+
}
|
|
29
|
+
apply() {
|
|
30
|
+
if (!this.canvasService || !this.activeToolId)
|
|
31
|
+
return;
|
|
32
|
+
const dielineLayer = this.canvasService.getLayer("dieline-overlay");
|
|
33
|
+
if (dielineLayer) {
|
|
34
|
+
const visible = this.activeToolId !== "pooder.kit.image";
|
|
35
|
+
dielineLayer.set({ visible });
|
|
36
|
+
}
|
|
37
|
+
this.canvasService.requestRenderAll();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.SceneViewService = SceneViewService;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SceneVisibilityService = void 0;
|
|
4
|
-
class SceneVisibilityService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.id = "pooder.kit.sceneVisibility";
|
|
7
|
-
this.metadata = {
|
|
8
|
-
name: "SceneVisibilityService",
|
|
9
|
-
};
|
|
10
|
-
this.activeToolId = null;
|
|
11
|
-
this.onToolActivated = (e) => {
|
|
12
|
-
this.activeToolId = e.id;
|
|
13
|
-
this.apply();
|
|
14
|
-
};
|
|
15
|
-
this.onObjectAdded = () => {
|
|
16
|
-
this.apply();
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
activate(context) {
|
|
20
|
-
this.canvasService = context.services.get("CanvasService");
|
|
21
|
-
context.eventBus.on("tool:activated", this.onToolActivated);
|
|
22
|
-
context.eventBus.on("object:added", this.onObjectAdded);
|
|
23
|
-
}
|
|
24
|
-
deactivate(context) {
|
|
25
|
-
context.eventBus.off("tool:activated", this.onToolActivated);
|
|
26
|
-
context.eventBus.off("object:added", this.onObjectAdded);
|
|
27
|
-
this.activeToolId = null;
|
|
28
|
-
this.canvasService = undefined;
|
|
29
|
-
}
|
|
30
|
-
apply() {
|
|
31
|
-
if (!this.canvasService)
|
|
32
|
-
return;
|
|
33
|
-
const dielineLayer = this.canvasService.getLayer("dieline-overlay");
|
|
34
|
-
if (dielineLayer) {
|
|
35
|
-
const visible = this.activeToolId !== "pooder.kit.image" &&
|
|
36
|
-
this.activeToolId !== "pooder.kit.white-ink";
|
|
37
|
-
dielineLayer.set({ visible });
|
|
38
|
-
}
|
|
39
|
-
this.canvasService.requestRenderAll();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.SceneVisibilityService = SceneVisibilityService;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SceneVisibilityService = void 0;
|
|
4
|
+
class SceneVisibilityService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.id = "pooder.kit.sceneVisibility";
|
|
7
|
+
this.metadata = {
|
|
8
|
+
name: "SceneVisibilityService",
|
|
9
|
+
};
|
|
10
|
+
this.activeToolId = null;
|
|
11
|
+
this.onToolActivated = (e) => {
|
|
12
|
+
this.activeToolId = e.id;
|
|
13
|
+
this.apply();
|
|
14
|
+
};
|
|
15
|
+
this.onObjectAdded = () => {
|
|
16
|
+
this.apply();
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
activate(context) {
|
|
20
|
+
this.canvasService = context.services.get("CanvasService");
|
|
21
|
+
context.eventBus.on("tool:activated", this.onToolActivated);
|
|
22
|
+
context.eventBus.on("object:added", this.onObjectAdded);
|
|
23
|
+
}
|
|
24
|
+
deactivate(context) {
|
|
25
|
+
context.eventBus.off("tool:activated", this.onToolActivated);
|
|
26
|
+
context.eventBus.off("object:added", this.onObjectAdded);
|
|
27
|
+
this.activeToolId = null;
|
|
28
|
+
this.canvasService = undefined;
|
|
29
|
+
}
|
|
30
|
+
apply() {
|
|
31
|
+
if (!this.canvasService)
|
|
32
|
+
return;
|
|
33
|
+
const dielineLayer = this.canvasService.getLayer("dieline-overlay");
|
|
34
|
+
if (dielineLayer) {
|
|
35
|
+
const visible = this.activeToolId !== "pooder.kit.image" &&
|
|
36
|
+
this.activeToolId !== "pooder.kit.white-ink";
|
|
37
|
+
dielineLayer.set({ visible });
|
|
38
|
+
}
|
|
39
|
+
this.canvasService.requestRenderAll();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.SceneVisibilityService = SceneVisibilityService;
|