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

Function getPresetFromCurrentState

source/preset.js:326–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324});
325
326export function getPresetFromCurrentState() {
327 const { colours } = global;
328 const preset = {
329 world: { hex: global.world.colour.hex, corners: global.world.corners },
330 colours: {},
331 };
332 for (const colourName in colours) {
333 const colour = colours[colourName];
334 preset.colours[colourName] = [];
335 for (const screen of colour.screens) {
336 preset.colours[colourName].push({
337 hex: screen.colour.hex,
338 corners: screen.corners,
339 });
340 }
341 }
342 return preset;
343}
344
345window.PRESET = PRESET;

Callers 1

main.jsFile · 0.90

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected