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

Function addChildrenToQueue

source/draw.js:125–139  ·  view source on GitHub ↗
(queue, parent)

Source from the content-addressed store, hash-verified

123};
124
125export const addChildrenToQueue = (queue, parent) => {
126 let i = 1;
127 const { colour, corners } = parent;
128 for (let c = colour.screens.length - 1; c >= 0; c--) {
129 const child = colour.screens[c];
130 const relativeCorners = getRelativePositions(child.corners, corners);
131 const screen = makeScreen(child.colour, relativeCorners);
132 const depth = parent.depth + 1;
133 if (depth < 1000) {
134 queue.push({ ...screen, depth: parent.depth + 1, parent });
135 }
136 i++;
137 }
138 return i;
139};
140
141// export const DRAW_COUNT = 2_000;
142export const continueDrawingQueue = (context, queue) => {

Callers 1

continueDrawingQueueFunction · 0.85

Calls 3

getRelativePositionsFunction · 0.90
makeScreenFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected