clipping: Fix wrong AO handling
This commit is contained in:
@@ -56,16 +56,16 @@ export default class extends Controller {
|
|||||||
btn.classList.remove('border', 'border-2', 'border-warning');
|
btn.classList.remove('border', 'border-2', 'border-warning');
|
||||||
});
|
});
|
||||||
|
|
||||||
// AO should be turned off if clipping is enabled
|
|
||||||
toggleAmbientOcclusion(!this.enabledValue);
|
|
||||||
|
|
||||||
if (this.enabledValue) {
|
if (this.enabledValue) {
|
||||||
|
// AO should be turned off if clipping is enabled
|
||||||
|
toggleAmbientOcclusion(false);
|
||||||
trigger.className += ' border border-2 border-white';
|
trigger.className += ' border border-2 border-white';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.enabledValue) {
|
if (!this.enabledValue) {
|
||||||
resetClipping();
|
resetClipping();
|
||||||
trigger.className = trigger.className.replace(/ border.*$/g, '');
|
trigger.className = trigger.className.replace(/ border.*$/g, '');
|
||||||
|
toggleAmbientOcclusion(AppState.ambientOcclusion);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppState.clipping.enabled = this.enabledValue;
|
AppState.clipping.enabled = this.enabledValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user