1681-engine / index / PrepainterOptions
Interface: PrepainterOptions<T> ​
Defined in: src/assets/Prepainter.ts:22
Type Parameters ​
| Type Parameter |
|---|
T |
Properties ​
canvas? ​
ts
optional canvas?: (painted) => HTMLCanvasElement | null;Defined in: src/assets/Prepainter.ts:31
Turns painted pixels into a canvas (default a DOM canvas; tests hand in a stand-in).
Parameters ​
| Parameter | Type |
|---|---|
painted | PaintedPixels |
Returns ​
HTMLCanvasElement | null
id ​
ts
id: (item) => string;Defined in: src/assets/Prepainter.ts:25
The item's id, unique among items.
Parameters ​
| Parameter | Type |
|---|---|
item | T |
Returns ​
string
key? ​
ts
optional key?: (id) => string;Defined in: src/assets/Prepainter.ts:27
The texture key an id's painting is kept under (default the id itself).
Parameters ​
| Parameter | Type |
|---|---|
id | string |
Returns ​
string
onPainted? ​
ts
optional onPainted?: (id) => void;Defined in: src/assets/Prepainter.ts:33
Told when a painting landed in the registry.
Parameters ​
| Parameter | Type |
|---|---|
id | string |
Returns ​
void
painter ​
ts
painter: Painter<T> | null;Defined in: src/assets/Prepainter.ts:29
Null where nothing can be painted ahead: then everything is painted on arrival, as without a prepainter.
textures ​
ts
textures: PrepainterTextures;Defined in: src/assets/Prepainter.ts:23