Skip to content

1681-engine / pixel / pixelPaint / pixelOn

Function: pixelOn() ​

ts
function pixelOn(
   g, 
   x, 
   y, 
   angle
): FlightPixel;

Defined in: src/pixel/pixelParticles.ts:69

A painter for a projectile drawn the size it really hits at: pixels are given along its heading and across it (positive across is to the right of the heading), rotated onto the world grid at (x, y). Make one per frame painted.

Parameters ​

ParameterType
gGraphics
xnumber
ynumber
anglenumber

Returns ​

FlightPixel

Released under the MIT License.