Skip to content

1681-engine / pixel / chevronPixels

Function: chevronPixels() ​

ts
function chevronPixels(angle, size): object;

Defined in: src/pixel/aimPixels.ts:107

A chevron (›) pointing along angle, its arms size px out from the line either side, round (0, 0): the bright stroke and the dark pixels that rim it. A row of these, evenly spaced, is how an aim line is drawn: each one is crisp at any angle, and with no continuous edge between them there is no staircase to see — a solid line of world pixels at, say, 20° is one, and read as broken.

Parameters ​

ParameterType
anglenumber
sizenumber

Returns ​

object

lit ​

ts
lit: PixelPoint[];

rim ​

ts
rim: PixelPoint[];

Released under the MIT License.