(queue, parent)
| 123 | }; |
| 124 | |
| 125 | export 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; |
| 142 | export const continueDrawingQueue = (context, queue) => { |
no test coverage detected