From 8c573b3a5036cb3a7ef8958a24f8f6cc905e184d Mon Sep 17 00:00:00 2001 From: hobbes6-2 Date: Wed, 17 Jun 2026 21:19:14 +0530 Subject: [PATCH 1/3] One possible implementation of image smoothing as a setting. This is global, meaning it adjusts smoothing of ALL images, but inefficient. Other possible approaches are to index through asset library (same outcome) and to add two settings buttons in inspector: enable/disable and apply to all. My opinion is that we should add both options (inspector and global). --- engine/src/ToolSettings.js | 6 +++++- engine/src/view/View.Frame.js | 10 ++++++++++ .../SettingsModal/EditorSettings/EditorSettings.jsx | 7 +++++++ src/Editor/Modals/SettingsModal/SettingsModal.jsx | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/engine/src/ToolSettings.js b/engine/src/ToolSettings.js index 597344ca0..dd5b04b43 100644 --- a/engine/src/ToolSettings.js +++ b/engine/src/ToolSettings.js @@ -103,7 +103,11 @@ Wick.ToolSettings = class { type: 'color', name: 'forwardOnionSkinTint', default: new Wick.Color('rgba(0, 0, 255, .5)'), - },{ + }, { + type: "boolean", + name: "imageSmoothing", + default: true + }, { type: "choice", name: 'brushMode', default: 'none', diff --git a/engine/src/view/View.Frame.js b/engine/src/view/View.Frame.js index bb714415a..a21bcf4d7 100644 --- a/engine/src/view/View.Frame.js +++ b/engine/src/view/View.Frame.js @@ -52,6 +52,7 @@ Wick.View.Frame = class extends Wick.View { * Update the view based on the model */ render() { + this.adjustImageSmoothing() this._renderObjects(); } @@ -83,6 +84,15 @@ Wick.View.Frame = class extends Wick.View { this.objectsLayer.addChildren(children); } + adjustImageSmoothing(){ + let bool = this.model.project.toolSettings.getSetting('imageSmoothing'); + this.model.paths.forEach(path => { + if (path.pathType === 'image') { + path.view.item.smoothing = bool; + } + }) + } + _applyDrawableChanges() { this.model.drawable.filter(path => { diff --git a/src/Editor/Modals/SettingsModal/EditorSettings/EditorSettings.jsx b/src/Editor/Modals/SettingsModal/EditorSettings/EditorSettings.jsx index 69054707f..de44091b6 100644 --- a/src/Editor/Modals/SettingsModal/EditorSettings/EditorSettings.jsx +++ b/src/Editor/Modals/SettingsModal/EditorSettings/EditorSettings.jsx @@ -43,6 +43,13 @@ class EditorSettings extends Component { return (
+ + {this.props.setToolSetting('imageSmoothing', bool.target.checked)}} + /> Style: From 1162e09841e9e98e4a2535bce065b1508dafbc75 Mon Sep 17 00:00:00 2001 From: hobbes6-2 Date: Thu, 18 Jun 2026 15:34:13 +0530 Subject: [PATCH 2/3] Different implementation for the global implementation of the smooothing on/off operating. --- engine/src/ToolSettings.js | 9 +++++++++ engine/src/base/Project.js | 1 + engine/src/view/View.Frame.js | 10 ---------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/engine/src/ToolSettings.js b/engine/src/ToolSettings.js index dd5b04b43..91a13c6ef 100644 --- a/engine/src/ToolSettings.js +++ b/engine/src/ToolSettings.js @@ -122,6 +122,8 @@ Wick.ToolSettings = class { this._settings = {}; this._onSettingsChangedCallback = () => {}; + this.project = null + this.resetAllSettings(); this.loadSettingsFromLocalstorage(); } @@ -195,6 +197,13 @@ Wick.ToolSettings = class { } else { localforage.setItem(this.getStorageKey(name), value); } + if (setting.name === "imageSmoothing"){ + this.project.getAssets("Image").forEach(asset => { + asset.getInstances().forEach(img => { + img.view.item.smoothing = setting.value + }) + }) + } } /** diff --git a/engine/src/base/Project.js b/engine/src/base/Project.js index f3c0e3085..1d3925c4f 100644 --- a/engine/src/base/Project.js +++ b/engine/src/base/Project.js @@ -106,6 +106,7 @@ Wick.Project = class extends Wick.Base { this.activeTool = 'cursor'; this._toolSettings = new Wick.ToolSettings(); + this._toolSettings.project = this this._toolSettings.onSettingsChanged((name, value) => { if (name === 'fillColor') { this.selection.fillColor = value.rgba; diff --git a/engine/src/view/View.Frame.js b/engine/src/view/View.Frame.js index a21bcf4d7..bb714415a 100644 --- a/engine/src/view/View.Frame.js +++ b/engine/src/view/View.Frame.js @@ -52,7 +52,6 @@ Wick.View.Frame = class extends Wick.View { * Update the view based on the model */ render() { - this.adjustImageSmoothing() this._renderObjects(); } @@ -84,15 +83,6 @@ Wick.View.Frame = class extends Wick.View { this.objectsLayer.addChildren(children); } - adjustImageSmoothing(){ - let bool = this.model.project.toolSettings.getSetting('imageSmoothing'); - this.model.paths.forEach(path => { - if (path.pathType === 'image') { - path.view.item.smoothing = bool; - } - }) - } - _applyDrawableChanges() { this.model.drawable.filter(path => { From 9fc33bb2ceab16d59646045b85b78891563b6e12 Mon Sep 17 00:00:00 2001 From: hobbes6-2 Date: Mon, 29 Jun 2026 17:05:51 +0530 Subject: [PATCH 3/3] removed asset library thingy and added per-render smoothing reset --- engine/src/ToolSettings.js | 7 ------- engine/src/view/View.Path.js | 4 ++++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/engine/src/ToolSettings.js b/engine/src/ToolSettings.js index 91a13c6ef..4b6c5d73e 100644 --- a/engine/src/ToolSettings.js +++ b/engine/src/ToolSettings.js @@ -197,13 +197,6 @@ Wick.ToolSettings = class { } else { localforage.setItem(this.getStorageKey(name), value); } - if (setting.name === "imageSmoothing"){ - this.project.getAssets("Image").forEach(asset => { - asset.getInstances().forEach(img => { - img.view.item.smoothing = setting.value - }) - }) - } } /** diff --git a/engine/src/view/View.Path.js b/engine/src/view/View.Path.js index 3709a4659..177f16d79 100644 --- a/engine/src/view/View.Path.js +++ b/engine/src/view/View.Path.js @@ -49,6 +49,10 @@ Wick.View.Path = class extends Wick.View { this.importJSON(this.model.json); + if(this.model.pathType == 'image') { + this.item.smoothing = this.model.project.toolSettings.getSetting('imageSmoothing') + }; + // Apply onion skin style if Needed // (This is done here in the Path code because we actually change the style of the path // if the current onion skin mode is set to "outlines" or "tint")