File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /** Rendering is aborted if the queue size exceeds this. */
12export const MAX_QUEUE_SIZE = 1e6
2- // const MIN_PATTERN_SIZE = 0.0005 // ignore patterns where either side is smaller than this
3- export const MIN_PATTERN_SIZE_PX = 1 // ignore patterns where either side is smaller than this// -- constants
3+
4+ /** Ignore patterns where either side is smaller than this. */
5+ export const MIN_PATTERN_SIZE_PX = 1
6+
7+ /** Number of colors to use. */
48const COLOR_SIZE = 50
9+
10+ /** Colors to use. Depths past `COLOR_SIZE` use the last color in the array. */
511export const COLORS = Array ( COLOR_SIZE )
612 . fill ( undefined )
713 . map ( ( _ , i ) => {
@@ -13,8 +19,18 @@ export const COLORS = Array(COLOR_SIZE)
1319
1420 return `hsl(${ hue } ${ saturation } % ${ lightness } %)`
1521 } )
22+
23+ /** Always render to at least this depth in the initial frame. */
1624export const MIN_DEPTH = 3
25+
26+ /** Never render past this depth. `Infinity` means no limit. */
1727export const MAX_DEPTH = Infinity
18- export const MAX_PREVIEW_DRAW_CALLS = 5e3 // number of shapes to draw per preview frame
19- export const MAX_DRAW_TIME_MS = 15 // how long to draw a frame in ms
28+
29+ /** Maximum number of draw calls per preview frame. */
30+ export const MAX_PREVIEW_DRAW_CALLS = 5e3
31+
32+ /** Maximum time to draw a frame in ms. */
33+ export const MAX_DRAW_TIME_MS = 15
34+
35+ /** Whether to enable debug logging. */
2036export const DEBUG = true as boolean
You can’t perform that action at this time.
0 commit comments