Skip to content

1681-engine / pixel / shadeBox

Function: shadeBox() ​

ts
function shadeBox(
   g, 
   x, 
   y, 
   w, 
   h, 
   f, 
   mask?
): void;

Defined in: src/pixel/propKit.ts:72

Moves every opaque pixel of a box one step into shadow (or, with f > 1, into light) along its own hue: the eave's shadow on a wall, the dark side of a chimney, a porch's shade. mask limits it to some pixels of the box.

Parameters ​

ParameterType
gPixelGrid
xnumber
ynumber
wnumber
hnumber
fnumber
mask?(x, y) => boolean

Returns ​

void

Released under the MIT License.