gb-image-decoder
Advanced tools
+32
-40
@@ -62,2 +62,3 @@ 'use strict'; | ||
| const BW_PALETTE = [16777215, 11184810, 5592405, 0]; | ||
| const BW_PALETTE_HEX = ["#ffffff", "#aaaaaa", "#555555", "#000000"]; | ||
| const BLACK_LINE = [ | ||
@@ -173,9 +174,7 @@ BLACK, | ||
| handleExportFrame, | ||
| lockFrame, | ||
| invertPalette, | ||
| colorData | ||
| colorData, | ||
| frameColorData | ||
| }) => { | ||
| const palette = lockFrame && // Must be actually locked | ||
| handleExportFrame !== ExportFrameMode.FRAMEMODE_CROP && tileIndexIsPartOfFrame(tileIndex, imageStartLine, handleExportFrame) ? BW_PALETTE : colorData; | ||
| const value = invertPalette ? palette[3 - pixels[index]] : palette[pixels[index]]; | ||
| const palette = tileIndexIsPartOfFrame(tileIndex, imageStartLine, handleExportFrame) ? frameColorData : colorData; | ||
| const value = palette[pixels[index]]; | ||
| return { | ||
@@ -202,6 +201,7 @@ // eslint-disable-next-line no-bitwise | ||
| __publicField$1(this, "colors"); | ||
| __publicField$1(this, "frameColors"); | ||
| __publicField$1(this, "rawImageData"); | ||
| __publicField$1(this, "lockFrame"); | ||
| __publicField$1(this, "invertPalette"); | ||
| __publicField$1(this, "colorData"); | ||
| __publicField$1(this, "frameColorData"); | ||
| __publicField$1(this, "tilesPerLine"); | ||
@@ -212,15 +212,15 @@ __publicField$1(this, "imageStartLine"); | ||
| this.colors = []; | ||
| this.frameColors = []; | ||
| this.rawImageData = null; | ||
| this.lockFrame = false; | ||
| this.invertPalette = false; | ||
| this.imageStartLine = 2; | ||
| this.colorData = [...BW_PALETTE]; | ||
| this.frameColorData = [...BW_PALETTE]; | ||
| this.tilesPerLine = options?.tilesPerLine || TILES_PER_LINE; | ||
| this.imageStartLine = 2; | ||
| } | ||
| update({ | ||
| canvas = null, | ||
| tiles = [], | ||
| palette = [], | ||
| lockFrame = false, | ||
| invertPalette = false, | ||
| canvas, | ||
| tiles, | ||
| palette, | ||
| framePalette, | ||
| imageStartLine = 2 | ||
@@ -230,5 +230,4 @@ }) { | ||
| const canvasChanged = canvas ? this.setCanvas(canvas) : false; | ||
| const paletteChanged = palette ? this.setPalette(palette, invertPalette) : false; | ||
| const lockFrameChanged = this.setLockFrame(lockFrame); | ||
| if (startLineChanged || canvasChanged || paletteChanged || lockFrameChanged || !this.tiles.length) { | ||
| const palettesChanged = this.setPalettes(palette, framePalette); | ||
| if (startLineChanged || canvasChanged || palettesChanged || !this.tiles.length) { | ||
| this.tiles = []; | ||
@@ -350,20 +349,16 @@ } | ||
| } | ||
| setPalette(palette, invertPalette) { | ||
| if (this.colors[0] === palette[0] && this.colors[1] === palette[1] && this.colors[2] === palette[2] && this.colors[3] === palette[3] && this.invertPalette === invertPalette) { | ||
| setPalettes(palette, framePalette) { | ||
| if (this.colors[0] === palette[0] && this.colors[1] === palette[1] && this.colors[2] === palette[2] && this.colors[3] === palette[3] && this.frameColors[0] === framePalette[0] && this.frameColors[1] === framePalette[1] && this.frameColors[2] === framePalette[2] && this.frameColors[3] === framePalette[3]) { | ||
| return false; | ||
| } | ||
| this.colors = palette; | ||
| this.invertPalette = invertPalette; | ||
| this.frameColors = framePalette; | ||
| this.colors.forEach((color, index) => { | ||
| this.colorData[index] = color.length !== 7 ? BW_PALETTE[index] : parseInt(color.substring(1), 16); | ||
| }); | ||
| this.frameColors.forEach((color, index) => { | ||
| this.frameColorData[index] = color.length !== 7 ? BW_PALETTE[index] : parseInt(color.substring(1), 16); | ||
| }); | ||
| return true; | ||
| } | ||
| setLockFrame(lockFrame) { | ||
| if (lockFrame !== this.lockFrame) { | ||
| this.lockFrame = lockFrame; | ||
| return true; | ||
| } | ||
| return false; | ||
| } | ||
| setTiles(tiles) { | ||
@@ -413,5 +408,4 @@ const changedTiles = tiles.reduce((acc, newTile, index) => { | ||
| handleExportFrame: ExportFrameMode.FRAMEMODE_KEEP, | ||
| invertPalette: this.invertPalette, | ||
| lockFrame: this.lockFrame, | ||
| colorData: this.colorData | ||
| colorData: this.colorData, | ||
| frameColorData: this.frameColorData | ||
| }); | ||
@@ -444,5 +438,4 @@ this.rawImageData[rawIndex] = color.r; | ||
| handleExportFrame, | ||
| lockFrame: this.lockFrame, | ||
| invertPalette: this.invertPalette, | ||
| colorData: this.colorData | ||
| colorData: this.colorData, | ||
| frameColorData: this.frameColorData | ||
| }); | ||
@@ -482,7 +475,6 @@ canvasContext.fillStyle = `rgb(${color.r}, ${color.g}, ${color.b})`; | ||
| decoder.update({ | ||
| framePalette: [], | ||
| canvas, | ||
| tiles: [], | ||
| palette: [], | ||
| lockFrame: false, | ||
| invertPalette: false | ||
| palette: [] | ||
| }); | ||
@@ -514,4 +506,4 @@ return { | ||
| update({ | ||
| canvas = null, | ||
| tiles = {}, | ||
| canvas, | ||
| tiles, | ||
| palette, | ||
@@ -585,6 +577,5 @@ lockFrame = false | ||
| channel.decoder.update({ | ||
| invertPalette: false, | ||
| canvas: channel.canvas, | ||
| tiles: channel.tiles, | ||
| lockFrame: this.lockFrame, | ||
| framePalette: this.lockFrame ? BW_PALETTE_HEX : palette, | ||
| palette | ||
@@ -651,2 +642,3 @@ }); | ||
| exports.BW_PALETTE = BW_PALETTE; | ||
| exports.BW_PALETTE_HEX = BW_PALETTE_HEX; | ||
| exports.BlendMode = BlendMode; | ||
@@ -653,0 +645,0 @@ exports.Decoder = Decoder; |
+22
-21
@@ -67,2 +67,15 @@ declare enum BlendMode { | ||
| } | ||
| interface DecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| framePalette: string[]; | ||
| imageStartLine?: number; | ||
| } | ||
| interface RGBNDecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| } | ||
@@ -73,17 +86,11 @@ declare class Decoder { | ||
| private colors; | ||
| private frameColors; | ||
| private rawImageData; | ||
| private lockFrame; | ||
| private invertPalette; | ||
| private colorData; | ||
| private frameColorData; | ||
| private tilesPerLine; | ||
| private imageStartLine; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, invertPalette, imageStartLine, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| lockFrame?: boolean; | ||
| invertPalette?: boolean; | ||
| imageStartLine?: number; | ||
| }): void; | ||
| update({ canvas, tiles, palette, framePalette, imageStartLine, }: DecoderUpdateParams): void; | ||
| private setImageStartLine; | ||
@@ -95,4 +102,3 @@ private updateCanvas; | ||
| private setCanvas; | ||
| private setPalette; | ||
| private setLockFrame; | ||
| private setPalettes; | ||
| private setTiles; | ||
@@ -112,8 +118,3 @@ private renderTile; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| }): void; | ||
| update({ canvas, tiles, palette, lockFrame, }: RGBNDecoderUpdateParams): void; | ||
| private setPalette; | ||
@@ -131,3 +132,3 @@ private setCanvas; | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, lockFrame, invertPalette, colorData, }: { | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, colorData, frameColorData, }: { | ||
| pixels: IndexedTilePixels; | ||
@@ -138,5 +139,4 @@ index: number; | ||
| handleExportFrame: ExportFrameMode; | ||
| lockFrame: boolean; | ||
| invertPalette: boolean; | ||
| colorData: BWPalette; | ||
| frameColorData: BWPalette; | ||
| }) => RGBValue; | ||
@@ -150,3 +150,4 @@ | ||
| declare const BW_PALETTE: number[]; | ||
| declare const BW_PALETTE_HEX: string[]; | ||
| export { type BWPalette, BW_PALETTE, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; | ||
| export { type BWPalette, BW_PALETTE, BW_PALETTE_HEX, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, type DecoderOptions, type DecoderUpdateParams, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNDecoderUpdateParams, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; |
+22
-21
@@ -67,2 +67,15 @@ declare enum BlendMode { | ||
| } | ||
| interface DecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| framePalette: string[]; | ||
| imageStartLine?: number; | ||
| } | ||
| interface RGBNDecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| } | ||
@@ -73,17 +86,11 @@ declare class Decoder { | ||
| private colors; | ||
| private frameColors; | ||
| private rawImageData; | ||
| private lockFrame; | ||
| private invertPalette; | ||
| private colorData; | ||
| private frameColorData; | ||
| private tilesPerLine; | ||
| private imageStartLine; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, invertPalette, imageStartLine, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| lockFrame?: boolean; | ||
| invertPalette?: boolean; | ||
| imageStartLine?: number; | ||
| }): void; | ||
| update({ canvas, tiles, palette, framePalette, imageStartLine, }: DecoderUpdateParams): void; | ||
| private setImageStartLine; | ||
@@ -95,4 +102,3 @@ private updateCanvas; | ||
| private setCanvas; | ||
| private setPalette; | ||
| private setLockFrame; | ||
| private setPalettes; | ||
| private setTiles; | ||
@@ -112,8 +118,3 @@ private renderTile; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| }): void; | ||
| update({ canvas, tiles, palette, lockFrame, }: RGBNDecoderUpdateParams): void; | ||
| private setPalette; | ||
@@ -131,3 +132,3 @@ private setCanvas; | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, lockFrame, invertPalette, colorData, }: { | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, colorData, frameColorData, }: { | ||
| pixels: IndexedTilePixels; | ||
@@ -138,5 +139,4 @@ index: number; | ||
| handleExportFrame: ExportFrameMode; | ||
| lockFrame: boolean; | ||
| invertPalette: boolean; | ||
| colorData: BWPalette; | ||
| frameColorData: BWPalette; | ||
| }) => RGBValue; | ||
@@ -150,3 +150,4 @@ | ||
| declare const BW_PALETTE: number[]; | ||
| declare const BW_PALETTE_HEX: string[]; | ||
| export { type BWPalette, BW_PALETTE, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; | ||
| export { type BWPalette, BW_PALETTE, BW_PALETTE_HEX, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, type DecoderOptions, type DecoderUpdateParams, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNDecoderUpdateParams, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; |
+22
-21
@@ -67,2 +67,15 @@ declare enum BlendMode { | ||
| } | ||
| interface DecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| framePalette: string[]; | ||
| imageStartLine?: number; | ||
| } | ||
| interface RGBNDecoderUpdateParams { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| } | ||
@@ -73,17 +86,11 @@ declare class Decoder { | ||
| private colors; | ||
| private frameColors; | ||
| private rawImageData; | ||
| private lockFrame; | ||
| private invertPalette; | ||
| private colorData; | ||
| private frameColorData; | ||
| private tilesPerLine; | ||
| private imageStartLine; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, invertPalette, imageStartLine, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: string[]; | ||
| palette: string[]; | ||
| lockFrame?: boolean; | ||
| invertPalette?: boolean; | ||
| imageStartLine?: number; | ||
| }): void; | ||
| update({ canvas, tiles, palette, framePalette, imageStartLine, }: DecoderUpdateParams): void; | ||
| private setImageStartLine; | ||
@@ -95,4 +102,3 @@ private updateCanvas; | ||
| private setCanvas; | ||
| private setPalette; | ||
| private setLockFrame; | ||
| private setPalettes; | ||
| private setTiles; | ||
@@ -112,8 +118,3 @@ private renderTile; | ||
| constructor(options?: DecoderOptions); | ||
| update({ canvas, tiles, palette, lockFrame, }: { | ||
| canvas: HTMLCanvasElement | null; | ||
| tiles: RGBNTiles; | ||
| palette: RGBNPalette; | ||
| lockFrame?: boolean; | ||
| }): void; | ||
| update({ canvas, tiles, palette, lockFrame, }: RGBNDecoderUpdateParams): void; | ||
| private setPalette; | ||
@@ -131,3 +132,3 @@ private setCanvas; | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, lockFrame, invertPalette, colorData, }: { | ||
| declare const getRGBValue: ({ pixels, index, tileIndex, imageStartLine, handleExportFrame, colorData, frameColorData, }: { | ||
| pixels: IndexedTilePixels; | ||
@@ -138,5 +139,4 @@ index: number; | ||
| handleExportFrame: ExportFrameMode; | ||
| lockFrame: boolean; | ||
| invertPalette: boolean; | ||
| colorData: BWPalette; | ||
| frameColorData: BWPalette; | ||
| }) => RGBValue; | ||
@@ -150,3 +150,4 @@ | ||
| declare const BW_PALETTE: number[]; | ||
| declare const BW_PALETTE_HEX: string[]; | ||
| export { type BWPalette, BW_PALETTE, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; | ||
| export { type BWPalette, BW_PALETTE, BW_PALETTE_HEX, BlendMode, type ChangedTile, type Channel, type Channels, Decoder, type DecoderOptions, type DecoderUpdateParams, ExportFrameMode, type IndexedTilePixels, RGBNDecoder, type RGBNDecoderUpdateParams, type RGBNPalette, type RGBNTiles, type RGBValue, SKIP_LINE, type ScaledCanvasSize, type SourceCanvases, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; |
+32
-41
@@ -60,2 +60,3 @@ var BlendMode = /* @__PURE__ */ ((BlendMode2) => { | ||
| const BW_PALETTE = [16777215, 11184810, 5592405, 0]; | ||
| const BW_PALETTE_HEX = ["#ffffff", "#aaaaaa", "#555555", "#000000"]; | ||
| const BLACK_LINE = [ | ||
@@ -171,9 +172,7 @@ BLACK, | ||
| handleExportFrame, | ||
| lockFrame, | ||
| invertPalette, | ||
| colorData | ||
| colorData, | ||
| frameColorData | ||
| }) => { | ||
| const palette = lockFrame && // Must be actually locked | ||
| handleExportFrame !== ExportFrameMode.FRAMEMODE_CROP && tileIndexIsPartOfFrame(tileIndex, imageStartLine, handleExportFrame) ? BW_PALETTE : colorData; | ||
| const value = invertPalette ? palette[3 - pixels[index]] : palette[pixels[index]]; | ||
| const palette = tileIndexIsPartOfFrame(tileIndex, imageStartLine, handleExportFrame) ? frameColorData : colorData; | ||
| const value = palette[pixels[index]]; | ||
| return { | ||
@@ -200,6 +199,7 @@ // eslint-disable-next-line no-bitwise | ||
| __publicField$1(this, "colors"); | ||
| __publicField$1(this, "frameColors"); | ||
| __publicField$1(this, "rawImageData"); | ||
| __publicField$1(this, "lockFrame"); | ||
| __publicField$1(this, "invertPalette"); | ||
| __publicField$1(this, "colorData"); | ||
| __publicField$1(this, "frameColorData"); | ||
| __publicField$1(this, "tilesPerLine"); | ||
@@ -210,15 +210,15 @@ __publicField$1(this, "imageStartLine"); | ||
| this.colors = []; | ||
| this.frameColors = []; | ||
| this.rawImageData = null; | ||
| this.lockFrame = false; | ||
| this.invertPalette = false; | ||
| this.imageStartLine = 2; | ||
| this.colorData = [...BW_PALETTE]; | ||
| this.frameColorData = [...BW_PALETTE]; | ||
| this.tilesPerLine = options?.tilesPerLine || TILES_PER_LINE; | ||
| this.imageStartLine = 2; | ||
| } | ||
| update({ | ||
| canvas = null, | ||
| tiles = [], | ||
| palette = [], | ||
| lockFrame = false, | ||
| invertPalette = false, | ||
| canvas, | ||
| tiles, | ||
| palette, | ||
| framePalette, | ||
| imageStartLine = 2 | ||
@@ -228,5 +228,4 @@ }) { | ||
| const canvasChanged = canvas ? this.setCanvas(canvas) : false; | ||
| const paletteChanged = palette ? this.setPalette(palette, invertPalette) : false; | ||
| const lockFrameChanged = this.setLockFrame(lockFrame); | ||
| if (startLineChanged || canvasChanged || paletteChanged || lockFrameChanged || !this.tiles.length) { | ||
| const palettesChanged = this.setPalettes(palette, framePalette); | ||
| if (startLineChanged || canvasChanged || palettesChanged || !this.tiles.length) { | ||
| this.tiles = []; | ||
@@ -348,20 +347,16 @@ } | ||
| } | ||
| setPalette(palette, invertPalette) { | ||
| if (this.colors[0] === palette[0] && this.colors[1] === palette[1] && this.colors[2] === palette[2] && this.colors[3] === palette[3] && this.invertPalette === invertPalette) { | ||
| setPalettes(palette, framePalette) { | ||
| if (this.colors[0] === palette[0] && this.colors[1] === palette[1] && this.colors[2] === palette[2] && this.colors[3] === palette[3] && this.frameColors[0] === framePalette[0] && this.frameColors[1] === framePalette[1] && this.frameColors[2] === framePalette[2] && this.frameColors[3] === framePalette[3]) { | ||
| return false; | ||
| } | ||
| this.colors = palette; | ||
| this.invertPalette = invertPalette; | ||
| this.frameColors = framePalette; | ||
| this.colors.forEach((color, index) => { | ||
| this.colorData[index] = color.length !== 7 ? BW_PALETTE[index] : parseInt(color.substring(1), 16); | ||
| }); | ||
| this.frameColors.forEach((color, index) => { | ||
| this.frameColorData[index] = color.length !== 7 ? BW_PALETTE[index] : parseInt(color.substring(1), 16); | ||
| }); | ||
| return true; | ||
| } | ||
| setLockFrame(lockFrame) { | ||
| if (lockFrame !== this.lockFrame) { | ||
| this.lockFrame = lockFrame; | ||
| return true; | ||
| } | ||
| return false; | ||
| } | ||
| setTiles(tiles) { | ||
@@ -411,5 +406,4 @@ const changedTiles = tiles.reduce((acc, newTile, index) => { | ||
| handleExportFrame: ExportFrameMode.FRAMEMODE_KEEP, | ||
| invertPalette: this.invertPalette, | ||
| lockFrame: this.lockFrame, | ||
| colorData: this.colorData | ||
| colorData: this.colorData, | ||
| frameColorData: this.frameColorData | ||
| }); | ||
@@ -442,5 +436,4 @@ this.rawImageData[rawIndex] = color.r; | ||
| handleExportFrame, | ||
| lockFrame: this.lockFrame, | ||
| invertPalette: this.invertPalette, | ||
| colorData: this.colorData | ||
| colorData: this.colorData, | ||
| frameColorData: this.frameColorData | ||
| }); | ||
@@ -480,7 +473,6 @@ canvasContext.fillStyle = `rgb(${color.r}, ${color.g}, ${color.b})`; | ||
| decoder.update({ | ||
| framePalette: [], | ||
| canvas, | ||
| tiles: [], | ||
| palette: [], | ||
| lockFrame: false, | ||
| invertPalette: false | ||
| palette: [] | ||
| }); | ||
@@ -512,4 +504,4 @@ return { | ||
| update({ | ||
| canvas = null, | ||
| tiles = {}, | ||
| canvas, | ||
| tiles, | ||
| palette, | ||
@@ -583,6 +575,5 @@ lockFrame = false | ||
| channel.decoder.update({ | ||
| invertPalette: false, | ||
| canvas: channel.canvas, | ||
| tiles: channel.tiles, | ||
| lockFrame: this.lockFrame, | ||
| framePalette: this.lockFrame ? BW_PALETTE_HEX : palette, | ||
| palette | ||
@@ -648,2 +639,2 @@ }); | ||
| export { BW_PALETTE, BlendMode, Decoder, ExportFrameMode, RGBNDecoder, SKIP_LINE, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; | ||
| export { BW_PALETTE, BW_PALETTE_HEX, BlendMode, Decoder, ExportFrameMode, RGBNDecoder, SKIP_LINE, blendModeNewName, decodeTile, getRGBValue, maxTiles, tileIndexIsPartOfFrame }; |
+1
-1
| { | ||
| "name": "gb-image-decoder", | ||
| "version": "1.1.0", | ||
| "version": "1.2.0", | ||
| "description": "Decoder classes for GameBoy-encoded images", | ||
@@ -5,0 +5,0 @@ "repository": "", |
+1
-1
@@ -42,4 +42,4 @@ # GameBoy-Tile format Image Decoders | ||
| palette: monoPalette, | ||
| framePalette: monoPalette, | ||
| lockFrame: false, | ||
| invertPalette: false, | ||
| }); | ||
@@ -46,0 +46,0 @@ ``` |
60653
0.37%1387
-1%