gb-image-decoder 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -367,10 +367,11 @@ class Decoder {
|
|
|
367
367
|
}
|
|
368
368
|
renderTile(tileIndex, rawLine) {
|
|
369
369
|
if (rawLine === SKIP_LINE) {
|
|
370
|
-
|
|
370
|
+
this.paintTile(null, tileIndex);
|
|
371
|
+
} else {
|
|
372
|
+
const tile = decodeTile(rawLine);
|
|
373
|
+
this.paintTile(tile, tileIndex);
|
|
371
374
|
}
|
|
372
|
-
const tile = decodeTile(rawLine);
|
|
373
|
-
this.paintTile(tile, tileIndex);
|
|
374
375
|
}
|
|
375
376
|
// This paints the tile with a specified offset and pixel width
|
|
376
377
|
paintTile(pixels, index) {
|
package/dist/index.d.cts
CHANGED
|
@@ -102,7 +102,7 @@ declare class RGBNDecoder {
|
|
|
102
102
|
private lockFrame;
|
|
103
103
|
private channels;
|
|
104
104
|
private tilesPerLine;
|
|
105
|
-
constructor(options
|
|
105
|
+
constructor(options?: DecoderOptions);
|
|
106
106
|
update({ canvas, tiles, palette, lockFrame, }: {
|
|
107
107
|
canvas: HTMLCanvasElement | null;
|
|
108
108
|
tiles: RGBNTiles;
|
package/dist/index.d.mts
CHANGED
|
@@ -102,7 +102,7 @@ declare class RGBNDecoder {
|
|
|
102
102
|
private lockFrame;
|
|
103
103
|
private channels;
|
|
104
104
|
private tilesPerLine;
|
|
105
|
-
constructor(options
|
|
105
|
+
constructor(options?: DecoderOptions);
|
|
106
106
|
update({ canvas, tiles, palette, lockFrame, }: {
|
|
107
107
|
canvas: HTMLCanvasElement | null;
|
|
108
108
|
tiles: RGBNTiles;
|
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ declare class RGBNDecoder {
|
|
|
102
102
|
private lockFrame;
|
|
103
103
|
private channels;
|
|
104
104
|
private tilesPerLine;
|
|
105
|
-
constructor(options
|
|
105
|
+
constructor(options?: DecoderOptions);
|
|
106
106
|
update({ canvas, tiles, palette, lockFrame, }: {
|
|
107
107
|
canvas: HTMLCanvasElement | null;
|
|
108
108
|
tiles: RGBNTiles;
|
package/dist/index.mjs
CHANGED
|
@@ -365,10 +365,11 @@ class Decoder {
|
|
|
365
365
|
}
|
|
366
366
|
renderTile(tileIndex, rawLine) {
|
|
367
367
|
if (rawLine === SKIP_LINE) {
|
|
368
|
-
|
|
368
|
+
this.paintTile(null, tileIndex);
|
|
369
|
+
} else {
|
|
370
|
+
const tile = decodeTile(rawLine);
|
|
371
|
+
this.paintTile(tile, tileIndex);
|
|
369
372
|
}
|
|
370
|
-
const tile = decodeTile(rawLine);
|
|
371
|
-
this.paintTile(tile, tileIndex);
|
|
372
373
|
}
|
|
373
374
|
// This paints the tile with a specified offset and pixel width
|
|
374
375
|
paintTile(pixels, index) {
|