stroke around quogs
This commit is contained in:
parent
0a59aa66f6
commit
2d7ebe8c1e
6 changed files with 54 additions and 46 deletions
|
@ -37,8 +37,8 @@ function loadImageData(url: string, buf?: Buffer): Promise<ImageData> {
|
|||
else return loadDataFresh(url);
|
||||
}
|
||||
|
||||
const WIDTH = 1000;
|
||||
const HEIGHT = 673;
|
||||
const WIDTH = 1040;
|
||||
const HEIGHT = 713;
|
||||
|
||||
function makeBuffer(width = WIDTH, height = HEIGHT): Buffer {
|
||||
return new OffscreenCanvas(width, height).getContext('2d')!;
|
||||
|
@ -49,13 +49,13 @@ function makeBufferIfLocks(width?: number, height?: number): Buffer | undefined
|
|||
else return undefined;
|
||||
}
|
||||
|
||||
export type Layer = 'static' | 'eyeshine' | Color.Layer;
|
||||
export type Layer = 'stroke' | 'static' | 'eyeshine' | Color.Layer;
|
||||
|
||||
// in compositing order
|
||||
export const allLayers: Layer[] =
|
||||
['static', 'outer', 'spines', 'stripes', 'cuffs', 'fins1', 'fins2', 'fins3',
|
||||
'belly1', 'belly2', 'masks', 'claws', 'vitiligo1', 'vitiligo2', 'vitiligo3',
|
||||
'vitiligo4', 'eyes', 'eyeshine', 'lines'];
|
||||
['stroke', 'static', 'outer', 'spines', 'stripes', 'cuffs', 'fins1', 'fins2',
|
||||
'fins3', 'belly1', 'belly2', 'masks', 'claws', 'vitiligo1', 'vitiligo2',
|
||||
'vitiligo3', 'vitiligo4', 'eyes', 'eyeshine', 'lines'];
|
||||
|
||||
function makeLayerInfo<A>(f: (l: Layer) => A): Record<Layer, A> {
|
||||
return Object.fromEntries(allLayers.map(l => [l, f(l)])) as Record<Layer, A>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue