Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion engine/src/ToolSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -118,6 +122,8 @@ Wick.ToolSettings = class {
this._settings = {};
this._onSettingsChangedCallback = () => {};

this.project = null
Comment thread
hobbsythe6th marked this conversation as resolved.
Outdated

this.resetAllSettings();
this.loadSettingsFromLocalstorage();
}
Expand Down Expand Up @@ -191,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
Comment thread
hobbsythe6th marked this conversation as resolved.
Outdated
})
})
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions engine/src/base/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Wick.Project = class extends Wick.Base {
this.activeTool = 'cursor';

this._toolSettings = new Wick.ToolSettings();
Comment thread
hobbsythe6th marked this conversation as resolved.
this._toolSettings.project = this
Comment thread
hobbsythe6th marked this conversation as resolved.
Outdated
this._toolSettings.onSettingsChanged((name, value) => {
if (name === 'fillColor') {
this.selection.fillColor = value.rgba;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ class EditorSettings extends Component {
return (
<div className="editor-settings-modal-body">
<div className="editor-settings-group">
<label htmlFor="image-smoothing" className="editor-settings-group-title">Image Smoothing</label>
<WickInput
type="checkbox"
id="image-smoothing"
checked={this.props.getToolSetting('imageSmoothing')}
onChange={(bool) => {this.props.setToolSetting('imageSmoothing', bool.target.checked)}}
/>
<label htmlFor="onion-skin-style" className="editor-settings-group-title">Onion Skinning</label>
Style:
<WickInput
Expand Down
1 change: 1 addition & 0 deletions src/Editor/Modals/SettingsModal/SettingsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class SettingsModal extends Component {
lastColorsUsed={this.props.lastColorsUsed}
getToolSetting={this.props.getToolSetting}
setToolSetting={this.props.setToolSetting}
project={this.props.project}
toggle={this.props.toggle}
getToolSettingRestrictions={this.props.getToolSettingRestrictions}/>
</TabbedInterface>
Expand Down