diff --git a/src/components/tw-settings-modal/settings-modal.jsx b/src/components/tw-settings-modal/settings-modal.jsx index a5d671fb4..135eb8c48 100644 --- a/src/components/tw-settings-modal/settings-modal.jsx +++ b/src/components/tw-settings-modal/settings-modal.jsx @@ -146,17 +146,56 @@ const Interpolation = props => ( ); +const InfiniteClones = props => ( + + +
+

+ +

+
+
+); + +const RemoveFencing = props => ( + + +
+

+ +

+
+
+); + const RemoveLimits = props => (

@@ -279,6 +318,14 @@ const SettingsModalComponent = props => ( value={props.interpolation} onChange={props.onInterpolationChange} /> + + ({ vm: state.scratchGui.vm, highQualityPen: state.scratchGui.tw.highQualityPen, interpolation: state.scratchGui.tw.interpolation, - removeLimits: !state.scratchGui.vm.hasLimits(), + infiniteClones: state.scratchGui.tw.runtimeOptions.maxClones === Infinity, + removeFencing: !state.scratchGui.tw.runtimeOptions.fencing, + removeLimits: !state.scratchGui.tw.runtimeOptions.effectLimits, warpTimer: state.scratchGui.tw.compilerOptions.warpTimer, disableCompiler: !state.scratchGui.tw.compilerOptions.enabled }); diff --git a/src/lib/tw-state-manager-hoc.jsx b/src/lib/tw-state-manager-hoc.jsx index 8e84aa9ac..8ca87ba16 100644 --- a/src/lib/tw-state-manager-hoc.jsx +++ b/src/lib/tw-state-manager-hoc.jsx @@ -470,11 +470,22 @@ const TWStateManager = function (WrappedComponent) { // Leave ?stuck as-is when in editor } - if (this.props.vm.hasLimits()) { + if (runtimeOptions.maxClones === 300) { + searchParams.delete('clones'); + } else { + searchParams.set('clones', runtimeOptions.maxClones); + } + + if (runtimeOptions.fencing) { + searchParams.delete('offscreen'); + } else { + searchParams.set('offscreen', ''); + } + + if (runtimeOptions.effectLimits) { searchParams.delete('limitless'); } else { searchParams.set('limitless', ''); - searchParams.delete('clones'); } let newSearch = searchParams.toString(); diff --git a/src/reducers/tw.js b/src/reducers/tw.js index a6d344eab..d5f71a768 100644 --- a/src/reducers/tw.js +++ b/src/reducers/tw.js @@ -26,7 +26,9 @@ export const initialState = { warpTimer: false }, runtimeOptions: { - maxClones: 300 + maxClones: 300, + effectLimits: true, + fencing: true }, isWindowFullScreen: false, dimensions: [0, 0],