cap ease down speed by engage setting

This commit is contained in:
Stewart Allen 2026-01-12 13:51:05 -05:00
commit 84f4dcbcde
4 changed files with 7 additions and 4 deletions

View file

@ -163,6 +163,7 @@ export const api = {
alerts(clr) { alerts.update(clr) },
bind(t,m,o) { return EVENT.bind(t,m,o) },
emit(t,m,o) { return EVENT.publish(t,m,o) },
emitDefer(t,m,d) { setTimeout(() => EVENT.publish(t,m), d ?? 100) },
import() { api.ui.load.click() },
listeners(topic) { return EVENT.targets(topic) },
on(t,l) { EVENT.on(t,l); return api.event },

View file

@ -87,9 +87,6 @@ function checkSeed(then) {
return false;
}
// upon restore, seed presets
api.event.emit('preset', api.conf.dbo());
// api.event.on("set.threaded", bool => setThreaded(bool));
export function onBooleanClick(el) {

View file

@ -143,6 +143,9 @@ export async function init_sync() {
history.replaceState({}, '', wlp.substring(0,kio + 6));
}
// upon restore, seed presets
api.event.emitDefer('preset', api.conf.get());
// lift curtain
$('curtain').style.display = 'none';
}

View file

@ -826,7 +826,9 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
// calculate ease down for poly path output
if (startPoint.z > point0.z) {
let easeFeed = plungeRate + ((feedRate - plungeRate) * easeThrottle);
let easeMax = feedRate * camFullEngage;
let easeLerp = plungeRate + ((feedRate - plungeRate) * easeThrottle);
let easeFeed = Math.min(easeLerp, easeMax);
let zat = startPoint.z;
let len = points.length;
let lp, lz = Infinity;