MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / createPreset

Function createPreset

source/preset.js:46–52  ·  view source on GitHub ↗
({ key, world, colours = {}, update = () => {} } = {})

Source from the content-addressed store, hash-verified

44};
45
46const createPreset = ({ key, world, colours = {}, update = () => {} } = {}) => {
47 const preset = { world, colours, update };
48 if (key !== undefined) {
49 onkeydown(key, () => loadPreset(global, preset));
50 }
51 return preset;
52};
53
54//=========//
55// PRESETS //

Callers 1

preset.jsFile · 0.85

Calls 2

onkeydownFunction · 0.90
loadPresetFunction · 0.85

Tested by

no test coverage detected