add global slicePre similar to sliceAll (which should be renamed slicePost)

add shared cam operational state so index+stock can run once for all instances
This commit is contained in:
Stewart Allen 2026-01-03 11:42:37 -05:00
commit 87e4a32092
6 changed files with 70 additions and 13 deletions

View file

@ -137,6 +137,10 @@ function prepareSlices(callback, scale = 1, offset = 0) {
client.rotate(settings);
}
function sliceSetup() {
client.slicePre(settings, sliceNext);
}
function sliceNext() {
if (toSlice.length) {
// while more widgets to slice
@ -309,8 +313,9 @@ function prepareSlices(callback, scale = 1, offset = 0) {
space.refresh();
}
// kick off slicing chain
sliceNext();
// do any global setup / state management
// then kick off slicing chain
sliceSetup();
}
/**