add user preference for device decals. remove hover pop option

This commit is contained in:
Stewart Allen 2020-11-29 00:10:41 -05:00
commit 48ae4de6e0
5 changed files with 40 additions and 26 deletions

View file

@ -1,25 +1,25 @@
# Kiri:Moto todo and notes
## 2.4 roadmap
* cnc
* tracing (chamfer, engrave)
* auto feature detection (slicing)
* fdm
* continuous printing (z belt systems)
* laser
* drag knife support
* all
* circular fit/layout when no-layout to prevent collisions
* `cnc`
* - tracing (chamfer, engrave)
* - auto feature detection (slicing)
* - show 1x, 2x, 4x speed in animation
* `laser`
* - drag knife support
* `all`
* - circular fit/layout when no-layout to prevent collisions
## 2.5 roadmap
# cnc
# lathe?
# complex process order
# double-sided assistance
# fdm
# redo automatic supports using faces instead of deltas
# bind process to z ranges or boxed regions
# non-planar actual
# `cnc`
# - lathe, A-axis
# - complex process order
# - split gcode output
# - double-sided assistance
# `fdm`
# - redo automatic supports using faces instead of deltas
# - bind process to z ranges or boxed regions
# - non-planar actual
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
@ -53,6 +53,7 @@
* `F` first layer support speed should be same as shell speed
* `F` apply finish speed to exposed top and underside flat areas
* `F` expand internal supporting flats / solids before projection
* `F` continuous printing (z belt systems)
* `P` implement infill clipping in wasm
* `P` solid fill the tops of supports for down facing flats
* `P` sparse infill should follow polys between intersect points
@ -67,6 +68,7 @@
* `B` climb vs conventional not fully consistent after refactor
* `B` outside cutting direction in roughing mode inverted
* `B` top clearing operations should use linear, not offset, passes
* `F` exports separate files for each operation
* `F` animation should clear the mesh in areas where the cuts go through the stock?
* `F` switch z top offset to an z anchor (top/bottom) + offset
* `F` use 3 registration holes to prevent rotation accidents (midline offset one axis)

View file

@ -603,7 +603,8 @@
view: null,
dark: false,
expert: true,
hoverPop: false,
decals: true,
// hoverPop: false,
zoomSpeed: 1.0,
lineType: "path",
autoSave: true,

View file

@ -46,7 +46,9 @@
platform = API.platform,
selection = API.selection;
let deviceURL = null,
let currentDevice = null,
deviceURL = null,
deviceTexture = null,
deviceImage = null,
deviceLock = false,
selectedTool = null,
@ -129,7 +131,8 @@
let control = settings().controller;
let isDark = control.dark;
control.expert = UI.expert.checked;
control.hoverPop = UI.hoverPop.checked;
control.decals = UI.decals.checked;
// control.hoverPop = UI.hoverPop.checked;
control.showOrigin = UI.showOrigin.checked;
control.showRulers = UI.showRulers.checked;
control.autoLayout = UI.autoLayout.checked;
@ -144,15 +147,19 @@
control.decimate = UI.decimate.checked;
SPACE.view.setZoom(control.reverseZoom, control.zoomSpeed);
platform.layout();
// platform.update_stock();
API.conf.save();
API.mode.set_expert(control.expert);
API.platform.update_size();
API.catalog.setOptions({
maxpass: control.decimate ? 10 : 0
});
UC.setHoverPop(control.hoverPop);
UC.setHoverPop(false);
updateFPS();
if (control.decals) {
loadDeviceTexture(currentDevice, deviceTexture);
} else {
clearDeviceTexture();
}
API.event.emit('boolean.update');
}
@ -725,7 +732,7 @@
platform.update_size();
current.filter[mode] = devicename;
current.cdev[mode] = dev;
current.cdev[mode] = currentDevice = dev;
if (dproc) {
// restore last process associated with this device
@ -775,7 +782,8 @@
function loadDeviceTexture(dev, texture) {
clearDeviceTexture();
if (!texture) {
deviceTexture = texture;
if (!(texture && API.conf.get().controller.decals)) {
return;
}
let { width, height } = texture.image;
@ -1270,7 +1278,7 @@
tracker = $('tracker'),
controller = settings().controller;
UC.setHoverPop(controller.hoverPop);
// UC.setHoverPop(controller.hoverPop);
WIN.addEventListener("resize", () => {
API.event.emit('resize');
@ -1470,9 +1478,10 @@
], {modes:GCODE, class:"ext-buttons f-row"}),
lprefs: UC.newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
hoverPop: UC.newBoolean(LANG.op_hopo_s, booleanSave, {title:LANG.op_hopo_l}),
// hoverPop: UC.newBoolean(LANG.op_hopo_s, booleanSave, {title:LANG.op_hopo_l}),
dark: UC.newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}),
reverseZoom: UC.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
decals: UC.newBoolean(LANG.op_decl_s, booleanSave, {title:LANG.op_decl_s}),
expert: UC.newBoolean(LANG.op_xprt_s, booleanSave, {title:LANG.op_xprt_l}),
lprefs: UC.newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 KiB

After

Width:  |  Height:  |  Size: 530 KiB

Before After
Before After

View file

@ -119,6 +119,8 @@ kiri.lang['en-us'] = {
op_disp: "display",
op_xprt_s: "expert",
op_xprt_l: "show more settings options",
op_decl_s: "decals",
op_decl_l: "show device decals and logos",
op_hopo_s: "hover pop",
op_hopo_l: "enable menu hover\nto activate",
op_dark_s: "dark mode",