1681-engine / pixel / PackedPixels
Class: PackedPixels ​
Defined in: src/pixel/spritePixels.ts:14
A frame's opaque pixels packed in typed arrays (12 bytes a pixel instead of an object each). Iterating hands out one reused SpritePixel, so read it in the loop and keep nothing of it; at(i) reads one into a given object.
Implements ​
Iterable<SpritePixel>
Constructors ​
Constructor ​
ts
new PackedPixels(
dx,
dy,
color,
length
): PackedPixels;Defined in: src/pixel/spritePixels.ts:15
Parameters ​
| Parameter | Type |
|---|---|
dx | Float32Array |
dy | Float32Array |
color | Uint32Array |
length | number |
Returns ​
PackedPixels
Properties ​
color ​
ts
readonly color: Uint32Array;Defined in: src/pixel/spritePixels.ts:18
dx ​
ts
readonly dx: Float32Array;Defined in: src/pixel/spritePixels.ts:16
dy ​
ts
readonly dy: Float32Array;Defined in: src/pixel/spritePixels.ts:17
length ​
ts
readonly length: number;Defined in: src/pixel/spritePixels.ts:19
Methods ​
[iterator]() ​
ts
iterator: Iterator<SpritePixel>;Defined in: src/pixel/spritePixels.ts:22
Returns ​
Iterator<SpritePixel>
Implementation of ​
ts
Iterable.[iterator]