summaryrefslogtreecommitdiff
path: root/electron/src/renderer/assets/js/simulator.js
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2022-02-28 16:24:51 +0100
committerGitHub <noreply@github.com>2022-02-28 16:24:51 +0100
commitbd43e007753c1e5baf1f8b191944378beb68c6ec (patch)
treedf622596578e923dcdc52c78ac3ec93ff74b77b2 /electron/src/renderer/assets/js/simulator.js
parent5f815a832b06f47df6517f6866b787ffc1ce36bd (diff)
Cutwork segmentation (#1582)
* add cutwork segmentation extension * simulator: option to not render jump stitches
Diffstat (limited to 'electron/src/renderer/assets/js/simulator.js')
-rw-r--r--electron/src/renderer/assets/js/simulator.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/electron/src/renderer/assets/js/simulator.js b/electron/src/renderer/assets/js/simulator.js
index 21859d80..fa963bbe 100644
--- a/electron/src/renderer/assets/js/simulator.js
+++ b/electron/src/renderer/assets/js/simulator.js
@@ -49,6 +49,7 @@ export default {
showColorChanges: false,
showStops: false,
showNeedlePenetrationPoints: false,
+ renderJumps: true,
showRealisticPreview: false,
showCursor: true
}
@@ -70,6 +71,10 @@ export default {
}
})
},
+ renderJumps() {
+ this.renderedStitch = 1
+ this.renderFrame()
+ },
showRealisticPreview() {
let animating = this.animating
this.stop()
@@ -291,6 +296,14 @@ export default {
renderFrame() {
while (this.renderedStitch < this.currentStitch) {
this.renderedStitch += 1
+ if (!this.renderJumps && this.stitches[this.renderedStitch].jump){
+ if (this.showRealisticPreview) {
+ this.realisticPaths[this.renderedStitch].hide();
+ } else {
+ this.stitchPaths[this.renderedStitch].hide();
+ }
+ continue;
+ }
if (this.showRealisticPreview) {
this.realisticPaths[this.renderedStitch].show()
} else {