minitel-mosaic
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -45,3 +45,3 @@ "use strict"; | ||
const chr = (0, sg_to_ascii_1.sgToAscii)(pixelsAsSg); | ||
const richChar = new richchar_1.RichChar(chr, { charset: chr === '\x32' ? 0 : 1, fg: lookupMap[fg.join()], bg: lookupMap[bg.join()] }); | ||
const richChar = new richchar_1.RichChar(chr, { charset: 1, fg: lookupMap[fg.join()], bg: lookupMap[bg.join()] }); | ||
currLine.mergeX(new richchargrid_1.RichCharGrid([[richChar]]), 'end'); | ||
@@ -48,0 +48,0 @@ weAt += 1; |
{ | ||
"name": "minitel-mosaic", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "A mosaic adaptor for immjs's minitel npm ecoystem", | ||
@@ -26,5 +26,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"minitel-standalone": "^1.8.2", | ||
"minitel-standalone": "^1.9.1", | ||
"sharp": "^0.33.4" | ||
} | ||
} |
@@ -19,2 +19,5 @@ import { MinitelObject } from "minitel-standalone/dist/abstract/minitelobject"; | ||
defaultAttributes: ImageAttributes = Image.defaultAttributes; | ||
getDimensions(attributes: ImageAttributes, inheritMe: Partial<ImageAttributes>) { | ||
return { width: attributes.imageData?.[0].length || -1, height: attributes.imageData?.length || -1 }; | ||
} | ||
render(attributes: ImageAttributes, inheritMe: Partial<MinitelObjectAttributes>) { | ||
@@ -57,3 +60,3 @@ const img = attributes.imageData; | ||
const chr = sgToAscii(pixelsAsSg); | ||
const richChar = new RichChar(chr, { charset: chr === '\x32' ? 0 : 1, fg: lookupMap[fg.join()], bg: lookupMap[bg.join()] }); | ||
const richChar = new RichChar(chr, { charset: 1, fg: lookupMap[fg.join()], bg: lookupMap[bg.join()] }); | ||
currLine.mergeX(new RichCharGrid([[richChar]]), 'end'); | ||
@@ -60,0 +63,0 @@ weAt += 1; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39014
35
612
Updatedminitel-standalone@^1.9.1