Presets and A/B
- Presets snapshot every value under a folder (or the whole GUI). Save one from a folder's menu, the main menu, or the + chip; tap a chip to apply it (animated), long-press or right-click it to rename, update, delete, blend with another (drag the strip that appears) or compare with it. The chip that matches the current values is outlined. Applying is one undo step; presets are saved with your values and inside exported files.
- What a preset holds: the values that are saved. A control or folder marked
persist: falseis left out, so give run state such as a paused togglepersist: false: applying a look then never pauses the app, and a reload doesn't either. - A/B: hold the A/B button (or the <kbd>`</kbd> key) to see state A, let go to come back. A is the code defaults until you Mark current values as A (menu or palette), or pick a preset's Compare with this. Nothing you see while holding is saved or recorded in history.
const fluid = gui.folder('Fluid');
fluid.presets.save('calm');
await fluid.presets.apply('stormy', { duration: 0.6, ease: 'inOut' });
fluid.presets.blend('calm', 'stormy', 0.3);
fluid.presets.list(); fluid.presets.rename('calm', 'still'); fluid.presets.delete('still');
gui.compare.mark(); gui.compare.hold(); gui.compare.release(); gui.compare.toggle();
gui.compare.markPreset('Fluid', 'stormy'); // compare with a preset
gui.compare.clear(); // back to comparing with the code defaults
createGUI({ compareKey: 'b' }) holds a different key for A/B (null for none).