brilliantsole 0.0.36 → 0.0.37
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/build/brilliantsole.cjs +0 -213
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.js.map +1 -1
- package/build/brilliantsole.ls.js +0 -244
- package/build/brilliantsole.ls.js.map +1 -1
- package/build/brilliantsole.min.js.map +1 -1
- package/build/brilliantsole.module.js.map +1 -1
- package/build/brilliantsole.module.min.js.map +1 -1
- package/build/brilliantsole.node.module.d.ts +1 -31
- package/build/brilliantsole.node.module.js +1 -205
- package/build/brilliantsole.node.module.js.map +1 -1
- package/build/dts/BS.d.ts +2 -0
- package/build/index.node.d.ts +1 -31
- package/package.json +9 -10
- package/src/BS.ts +2 -0
|
@@ -1800,36 +1800,6 @@ declare function simplifyCurves(curves: DisplayBezierCurve[], epsilon?: number):
|
|
|
1800
1800
|
declare function simplifyPoints(points: Vector2[], tolerance?: number): Vector2[];
|
|
1801
1801
|
declare function simplifyPointsAsCubicCurveControlPoints(points: Vector2[], error?: number): Vector2[];
|
|
1802
1802
|
|
|
1803
|
-
declare function quantizeImage(image: HTMLImageElement, width: number, height: number, numberOfColors: number, colors?: string[], canvas?: HTMLCanvasElement): Promise<{
|
|
1804
|
-
blob: Blob;
|
|
1805
|
-
colors: string[];
|
|
1806
|
-
colorIndices: number[];
|
|
1807
|
-
}>;
|
|
1808
|
-
declare function resizeImage(image: CanvasImageSource, width: number, height: number, canvas?: HTMLCanvasElement): HTMLCanvasElement;
|
|
1809
|
-
declare function resizeAndQuantizeImage(image: CanvasImageSource, width: number, height: number, numberOfColors: number, colors?: string[], canvas?: HTMLCanvasElement): Promise<{
|
|
1810
|
-
blob: Blob;
|
|
1811
|
-
colors: string[];
|
|
1812
|
-
colorIndices: number[];
|
|
1813
|
-
}>;
|
|
1814
|
-
declare function canvasToBitmaps(canvas: HTMLCanvasElement, numberOfColors: number, mtu: number): Promise<{
|
|
1815
|
-
bitmapRows: DisplayBitmap[][];
|
|
1816
|
-
colors: string[];
|
|
1817
|
-
}>;
|
|
1818
|
-
declare function imageToBitmaps(image: HTMLImageElement, width: number, height: number, numberOfColors: number, mtu: number): Promise<{
|
|
1819
|
-
bitmapRows: DisplayBitmap[][];
|
|
1820
|
-
colors: string[];
|
|
1821
|
-
}>;
|
|
1822
|
-
declare function canvasToSprite(canvas: HTMLCanvasElement, spriteName: string, numberOfColors: number, paletteName: string, overridePalette: boolean, spriteSheet: DisplaySpriteSheet, paletteOffset?: number): Promise<{
|
|
1823
|
-
sprite: DisplaySprite;
|
|
1824
|
-
blob: Blob;
|
|
1825
|
-
}>;
|
|
1826
|
-
declare function imageToSprite(image: HTMLImageElement, spriteName: string, width: number, height: number, numberOfColors: number, paletteName: string, overridePalette: boolean, spriteSheet: DisplaySpriteSheet, paletteOffset?: number): Promise<{
|
|
1827
|
-
sprite: DisplaySprite;
|
|
1828
|
-
blob: Blob;
|
|
1829
|
-
}>;
|
|
1830
|
-
declare function canvasToSpriteSheet(canvas: HTMLCanvasElement, spriteSheetName: string, numberOfColors: number, paletteName: string, maxFileLength?: number): Promise<DisplaySpriteSheet>;
|
|
1831
|
-
declare function imageToSpriteSheet(image: HTMLImageElement, spriteSheetName: string, width: number, height: number, numberOfColors: number, paletteName: string, maxFileLength?: number): Promise<DisplaySpriteSheet>;
|
|
1832
|
-
|
|
1833
1803
|
declare function hexToRGB(hex: string): DisplayColorRGB;
|
|
1834
1804
|
declare function rgbToHex({ r, g, b }: DisplayColorRGB): string;
|
|
1835
1805
|
|
|
@@ -2063,5 +2033,5 @@ declare const ThrottleUtils: {
|
|
|
2063
2033
|
debounce: typeof debounce;
|
|
2064
2034
|
};
|
|
2065
2035
|
|
|
2066
|
-
export { CameraCommands, CameraConfigurationTypes, ContinuousSensorTypes, DefaultNumberOfDisplayColors, DefaultNumberOfPressureSensors, Device, _default as DeviceManager, DevicePair, DevicePairTypes, DeviceTypes, DisplayAlignments, DisplayBezierCurveTypes, DisplayBrightnesses, DisplayContextCommandTypes, DisplayDirections, DisplayPixelDepths, DisplaySegmentCaps, DisplaySpriteContextCommandTypes, environment_d as Environment, EventUtils, FileTransferDirections, FileTypes, MaxNameLength, MaxNumberOfVibrationWaveformEffectSegments, MaxNumberOfVibrationWaveformSegments, MaxSensorRate, MaxSpriteSheetNameLength, MaxVibrationWaveformEffectSegmentDelay, MaxVibrationWaveformEffectSegmentLoopCount, MaxVibrationWaveformEffectSequenceLoopCount, MaxVibrationWaveformSegmentDuration, MaxWifiPasswordLength, MaxWifiSSIDLength, MicrophoneCommands, MicrophoneConfigurationTypes, MicrophoneConfigurationValues, MinNameLength, MinSpriteSheetNameLength, MinWifiPasswordLength, MinWifiSSIDLength, RangeHelper, scanner as Scanner, SensorRateStep, SensorTypes, Sides, TfliteSensorTypes, TfliteTasks, ThrottleUtils, Timer, UDPServer, VibrationLocations, VibrationTypes, VibrationWaveformEffects, WebSocketServer,
|
|
2036
|
+
export { CameraCommands, CameraConfigurationTypes, ContinuousSensorTypes, DefaultNumberOfDisplayColors, DefaultNumberOfPressureSensors, Device, _default as DeviceManager, DevicePair, DevicePairTypes, DeviceTypes, DisplayAlignments, DisplayBezierCurveTypes, DisplayBrightnesses, DisplayContextCommandTypes, DisplayDirections, DisplayPixelDepths, DisplaySegmentCaps, DisplaySpriteContextCommandTypes, environment_d as Environment, EventUtils, FileTransferDirections, FileTypes, MaxNameLength, MaxNumberOfVibrationWaveformEffectSegments, MaxNumberOfVibrationWaveformSegments, MaxSensorRate, MaxSpriteSheetNameLength, MaxVibrationWaveformEffectSegmentDelay, MaxVibrationWaveformEffectSegmentLoopCount, MaxVibrationWaveformEffectSequenceLoopCount, MaxVibrationWaveformSegmentDuration, MaxWifiPasswordLength, MaxWifiSSIDLength, MicrophoneCommands, MicrophoneConfigurationTypes, MicrophoneConfigurationValues, MinNameLength, MinSpriteSheetNameLength, MinWifiPasswordLength, MinWifiSSIDLength, RangeHelper, scanner as Scanner, SensorRateStep, SensorTypes, Sides, TfliteSensorTypes, TfliteTasks, ThrottleUtils, Timer, UDPServer, VibrationLocations, VibrationTypes, VibrationWaveformEffects, WebSocketServer, displayCurveTypeToNumberOfControlPoints, englishRegex, fontToSpriteSheet, getFontMaxHeight, getFontMetrics, getFontUnicodeRange, getMaxSpriteSheetSize, hexToRGB, intersectWireframes, isWireframePolygon, maxDisplayScale, mergeWireframes, parseFont, pixelDepthToNumberOfColors, rgbToHex, setAllConsoleLevelFlags, setConsoleLevelFlagsForType, simplifyCurves, simplifyPoints, simplifyPointsAsCubicCurveControlPoints, stringToSprites, wait };
|
|
2067
2037
|
export type { BoundDeviceEventListeners, BoundDeviceManagerEventListeners, BoundDevicePairEventListeners, CameraCommand, CameraConfiguration, CameraConfigurationType, CenterOfPressure, ContinuousSensorType, DeviceEvent, DeviceEventListenerMap, DeviceEventMap, DeviceInformation, DeviceManagerEvent, DeviceManagerEventListenerMap, DeviceManagerEventMap, DevicePairEvent, DevicePairEventListenerMap, DevicePairEventMap, DevicePairType, DeviceType, DiscoveredDevice, DisplayAlignment, DisplayBezierCurveType, DisplayBitmap, DisplayBitmapColorPair, DisplayBrightness, DisplayColorRGB, DisplayContextCommand, DisplayContextCommandType, DisplayDirection, DisplaySegmentCap, DisplaySize, DisplaySprite, DisplaySpriteColorPair, DisplaySpriteContextCommandType, DisplaySpriteLine, DisplaySpriteLines, DisplaySpritePaletteSwap, DisplaySpriteSheet, DisplaySpriteSheetPalette, DisplaySpriteSubLine, DisplayWireframe, DisplayWireframeEdge, Euler, FileTransferDirection, FileType, FontToSpriteSheetOptions, MicrophoneCommand, MicrophoneConfiguration, MicrophoneConfigurationType, PressureData, Quaternion, Range, SensorConfiguration, SensorType, Side, TfliteFileConfiguration, TfliteSensorType, TfliteTask, Vector2, Vector3, VibrationConfiguration, VibrationLocation, VibrationType, VibrationWaveformEffect };
|
|
@@ -5587,9 +5587,6 @@ function removeSubstrings(string, substrings) {
|
|
|
5587
5587
|
|
|
5588
5588
|
const _console$r = createConsole("DisplaySpriteSheetUtils", { log: false });
|
|
5589
5589
|
const spriteHeaderLength = 3 * 2;
|
|
5590
|
-
function calculateSpriteSheetHeaderLength(numberOfSprites) {
|
|
5591
|
-
return 2 + numberOfSprites * 2 + numberOfSprites * spriteHeaderLength;
|
|
5592
|
-
}
|
|
5593
5590
|
function getCurvesPoints(curves) {
|
|
5594
5591
|
const curvePoints = [];
|
|
5595
5592
|
curves.forEach((curve, index) => {
|
|
@@ -6369,15 +6366,6 @@ function resizeImage(image, width, height, canvas) {
|
|
|
6369
6366
|
ctx.drawImage(image, 0, 0, width, height);
|
|
6370
6367
|
return canvas;
|
|
6371
6368
|
}
|
|
6372
|
-
function cropCanvas(canvas, x, y, width, height, targetCanvas) {
|
|
6373
|
-
targetCanvas = targetCanvas || document.createElement("canvas");
|
|
6374
|
-
const ctx = targetCanvas.getContext("2d", { willReadFrequently: true });
|
|
6375
|
-
targetCanvas.width = width;
|
|
6376
|
-
targetCanvas.height = height;
|
|
6377
|
-
ctx.imageSmoothingEnabled = false;
|
|
6378
|
-
ctx.drawImage(canvas, x, y, width, height, 0, 0, width, height);
|
|
6379
|
-
return targetCanvas;
|
|
6380
|
-
}
|
|
6381
6369
|
function removeAlphaFromCanvas(canvas) {
|
|
6382
6370
|
const ctx = canvas.getContext("2d", { willReadFrequently: true });
|
|
6383
6371
|
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
@@ -6416,77 +6404,6 @@ async function imageToBitmap(image, width, height, colors, bitmapColorIndices, n
|
|
|
6416
6404
|
};
|
|
6417
6405
|
return { blob, bitmap };
|
|
6418
6406
|
}
|
|
6419
|
-
const drawSpriteBitmapCommandHeaderLength = 1 + 2 + 2 + 2 + 2 + 1 + 2;
|
|
6420
|
-
async function canvasToBitmaps(canvas, numberOfColors, mtu) {
|
|
6421
|
-
const { blob, colors, colorIndices } = await quantizeCanvas(canvas, numberOfColors);
|
|
6422
|
-
const bitmapRows = [];
|
|
6423
|
-
const { width, height } = canvas;
|
|
6424
|
-
const numberOfPixels = width * height;
|
|
6425
|
-
const pixelDepth = DisplayPixelDepths.find((pixelDepth) => pixelDepthToNumberOfColors(pixelDepth) >= numberOfColors);
|
|
6426
|
-
_console$q.assertWithError(pixelDepth, `no pixelDepth found that covers ${numberOfColors} colors`);
|
|
6427
|
-
const pixelsPerByte = pixelDepthToPixelsPerByte(pixelDepth);
|
|
6428
|
-
const numberOfBytes = Math.ceil(numberOfPixels / pixelsPerByte);
|
|
6429
|
-
_console$q.log({
|
|
6430
|
-
width,
|
|
6431
|
-
height,
|
|
6432
|
-
numberOfPixels,
|
|
6433
|
-
pixelDepth,
|
|
6434
|
-
pixelsPerByte,
|
|
6435
|
-
numberOfBytes,
|
|
6436
|
-
mtu,
|
|
6437
|
-
});
|
|
6438
|
-
const maxPixelDataLength = mtu - (drawSpriteBitmapCommandHeaderLength + 5);
|
|
6439
|
-
const maxPixels = Math.floor(maxPixelDataLength / pixelsPerByte);
|
|
6440
|
-
const maxBitmapWidth = Math.min(maxPixels, width);
|
|
6441
|
-
let maxBitmapHeight = 1;
|
|
6442
|
-
if (maxBitmapWidth == width) {
|
|
6443
|
-
const bitmapRowPixelDataLength = Math.ceil(width / pixelsPerByte);
|
|
6444
|
-
maxBitmapHeight = Math.floor(maxPixelDataLength / bitmapRowPixelDataLength);
|
|
6445
|
-
}
|
|
6446
|
-
_console$q.log({
|
|
6447
|
-
maxPixelDataLength,
|
|
6448
|
-
maxPixels,
|
|
6449
|
-
maxBitmapHeight,
|
|
6450
|
-
maxBitmapWidth,
|
|
6451
|
-
});
|
|
6452
|
-
if (maxBitmapHeight >= height) {
|
|
6453
|
-
_console$q.log("image is small enough for a single bitmap");
|
|
6454
|
-
const bitmap = {
|
|
6455
|
-
numberOfColors,
|
|
6456
|
-
pixels: colorIndices,
|
|
6457
|
-
width,
|
|
6458
|
-
height,
|
|
6459
|
-
};
|
|
6460
|
-
bitmapRows.push([bitmap]);
|
|
6461
|
-
}
|
|
6462
|
-
else {
|
|
6463
|
-
let offsetX = 0;
|
|
6464
|
-
let offsetY = 0;
|
|
6465
|
-
const bitmapCanvas = document.createElement("canvas");
|
|
6466
|
-
const bitmapColorIndices = new Array(numberOfColors)
|
|
6467
|
-
.fill(0)
|
|
6468
|
-
.map((_, i) => i);
|
|
6469
|
-
while (offsetY < height) {
|
|
6470
|
-
const bitmapHeight = Math.min(maxBitmapHeight, height - offsetY);
|
|
6471
|
-
offsetX = 0;
|
|
6472
|
-
const bitmapRow = [];
|
|
6473
|
-
bitmapRows.push(bitmapRow);
|
|
6474
|
-
while (offsetX < width) {
|
|
6475
|
-
const bitmapWidth = Math.min(maxBitmapWidth, width - offsetX);
|
|
6476
|
-
cropCanvas(canvas, offsetX, offsetY, bitmapWidth, bitmapHeight, bitmapCanvas);
|
|
6477
|
-
const { bitmap } = await imageToBitmap(bitmapCanvas, bitmapWidth, bitmapHeight, colors, bitmapColorIndices, numberOfColors);
|
|
6478
|
-
bitmapRow.push(bitmap);
|
|
6479
|
-
offsetX += bitmapWidth;
|
|
6480
|
-
}
|
|
6481
|
-
offsetY += bitmapHeight;
|
|
6482
|
-
}
|
|
6483
|
-
}
|
|
6484
|
-
return { bitmapRows, colors };
|
|
6485
|
-
}
|
|
6486
|
-
async function imageToBitmaps(image, width, height, numberOfColors, mtu) {
|
|
6487
|
-
const canvas = resizeImage(image, width, height);
|
|
6488
|
-
return canvasToBitmaps(canvas, numberOfColors, mtu);
|
|
6489
|
-
}
|
|
6490
6407
|
function getBitmapNumberOfBytes(bitmap) {
|
|
6491
6408
|
const pixelDepth = numberOfColorsToPixelDepth(bitmap.numberOfColors);
|
|
6492
6409
|
const pixelsPerByte = pixelDepthToPixelsPerByte(pixelDepth);
|
|
@@ -6506,127 +6423,6 @@ function assertValidBitmapPixels(bitmap) {
|
|
|
6506
6423
|
_console$q.assertRangeWithError(`bitmap.pixels[${index}]`, pixel, 0, bitmap.numberOfColors - 1);
|
|
6507
6424
|
});
|
|
6508
6425
|
}
|
|
6509
|
-
async function canvasToSprite(canvas, spriteName, numberOfColors, paletteName, overridePalette, spriteSheet, paletteOffset = 0) {
|
|
6510
|
-
const { width, height } = canvas;
|
|
6511
|
-
let palette = spriteSheet.palettes?.find((palette) => palette.name == paletteName);
|
|
6512
|
-
if (!palette) {
|
|
6513
|
-
palette = {
|
|
6514
|
-
name: paletteName,
|
|
6515
|
-
numberOfColors,
|
|
6516
|
-
colors: new Array(numberOfColors).fill("#000000"),
|
|
6517
|
-
};
|
|
6518
|
-
spriteSheet.palettes = spriteSheet.palettes || [];
|
|
6519
|
-
spriteSheet.palettes?.push(palette);
|
|
6520
|
-
}
|
|
6521
|
-
_console$q.log("pallete", palette);
|
|
6522
|
-
const sprite = {
|
|
6523
|
-
name: spriteName,
|
|
6524
|
-
width,
|
|
6525
|
-
height,
|
|
6526
|
-
paletteSwaps: [],
|
|
6527
|
-
commands: [],
|
|
6528
|
-
};
|
|
6529
|
-
const results = await quantizeCanvas(canvas, numberOfColors, !overridePalette ? palette.colors : undefined);
|
|
6530
|
-
const blob = results.blob;
|
|
6531
|
-
const colorIndices = results.colorIndices;
|
|
6532
|
-
if (overridePalette) {
|
|
6533
|
-
results.colors.forEach((color, index) => {
|
|
6534
|
-
palette.colors[index + paletteOffset] = color;
|
|
6535
|
-
});
|
|
6536
|
-
}
|
|
6537
|
-
sprite.commands.push({
|
|
6538
|
-
type: "selectBitmapColors",
|
|
6539
|
-
bitmapColorPairs: new Array(numberOfColors).fill(0).map((_, index) => ({
|
|
6540
|
-
bitmapColorIndex: index,
|
|
6541
|
-
colorIndex: index + paletteOffset,
|
|
6542
|
-
})),
|
|
6543
|
-
});
|
|
6544
|
-
const bitmap = {
|
|
6545
|
-
numberOfColors,
|
|
6546
|
-
pixels: colorIndices,
|
|
6547
|
-
width,
|
|
6548
|
-
height,
|
|
6549
|
-
};
|
|
6550
|
-
sprite.commands.push({ type: "drawBitmap", offsetX: 0, offsetY: 0, bitmap });
|
|
6551
|
-
const spriteIndex = spriteSheet.sprites.findIndex((sprite) => sprite.name == spriteName);
|
|
6552
|
-
if (spriteIndex == -1) {
|
|
6553
|
-
spriteSheet.sprites.push(sprite);
|
|
6554
|
-
}
|
|
6555
|
-
else {
|
|
6556
|
-
_console$q.log(`overwriting spriteIndex ${spriteIndex}`);
|
|
6557
|
-
spriteSheet.sprites[spriteIndex] = sprite;
|
|
6558
|
-
}
|
|
6559
|
-
return { sprite, blob };
|
|
6560
|
-
}
|
|
6561
|
-
async function imageToSprite(image, spriteName, width, height, numberOfColors, paletteName, overridePalette, spriteSheet, paletteOffset = 0) {
|
|
6562
|
-
const canvas = resizeImage(image, width, height);
|
|
6563
|
-
return canvasToSprite(canvas, spriteName, numberOfColors, paletteName, overridePalette, spriteSheet, paletteOffset);
|
|
6564
|
-
}
|
|
6565
|
-
const spriteSheetWithSingleBitmapCommandLength = calculateSpriteSheetHeaderLength(1) + drawSpriteBitmapCommandHeaderLength;
|
|
6566
|
-
function spriteSheetWithBitmapCommandAndSelectBitmapColorsLength(numberOfColors) {
|
|
6567
|
-
return (spriteSheetWithSingleBitmapCommandLength + (1 + 1 + numberOfColors * 2));
|
|
6568
|
-
}
|
|
6569
|
-
async function canvasToSpriteSheet(canvas, spriteSheetName, numberOfColors, paletteName, maxFileLength) {
|
|
6570
|
-
const spriteSheet = {
|
|
6571
|
-
name: spriteSheetName,
|
|
6572
|
-
palettes: [],
|
|
6573
|
-
paletteSwaps: [],
|
|
6574
|
-
sprites: [],
|
|
6575
|
-
};
|
|
6576
|
-
if (maxFileLength == undefined) {
|
|
6577
|
-
await canvasToSprite(canvas, "image", numberOfColors, paletteName, true, spriteSheet);
|
|
6578
|
-
}
|
|
6579
|
-
else {
|
|
6580
|
-
const { width, height } = canvas;
|
|
6581
|
-
const numberOfPixels = width * height;
|
|
6582
|
-
const pixelDepth = DisplayPixelDepths.find((pixelDepth) => pixelDepthToNumberOfColors(pixelDepth) >= numberOfColors);
|
|
6583
|
-
_console$q.assertWithError(pixelDepth, `no pixelDepth found that covers ${numberOfColors} colors`);
|
|
6584
|
-
const pixelsPerByte = pixelDepthToPixelsPerByte(pixelDepth);
|
|
6585
|
-
const numberOfBytes = Math.ceil(numberOfPixels / pixelsPerByte);
|
|
6586
|
-
_console$q.log({
|
|
6587
|
-
width,
|
|
6588
|
-
height,
|
|
6589
|
-
numberOfPixels,
|
|
6590
|
-
pixelDepth,
|
|
6591
|
-
pixelsPerByte,
|
|
6592
|
-
numberOfBytes,
|
|
6593
|
-
maxFileLength,
|
|
6594
|
-
});
|
|
6595
|
-
const maxPixelDataLength = maxFileLength -
|
|
6596
|
-
(spriteSheetWithBitmapCommandAndSelectBitmapColorsLength(numberOfColors) +
|
|
6597
|
-
5);
|
|
6598
|
-
const imageRowPixelDataLength = Math.ceil(width / pixelsPerByte);
|
|
6599
|
-
const maxSpriteHeight = Math.floor(maxPixelDataLength / imageRowPixelDataLength);
|
|
6600
|
-
if (maxSpriteHeight >= height) {
|
|
6601
|
-
_console$q.log("image is small enough for a single sprite");
|
|
6602
|
-
await canvasToSprite(canvas, "image", numberOfColors, paletteName, true, spriteSheet);
|
|
6603
|
-
}
|
|
6604
|
-
else {
|
|
6605
|
-
const { colors } = await quantizeCanvas(canvas, numberOfColors);
|
|
6606
|
-
spriteSheet.palettes?.push({ name: paletteName, numberOfColors, colors });
|
|
6607
|
-
let offsetY = 0;
|
|
6608
|
-
let imageIndex = 0;
|
|
6609
|
-
const spriteCanvas = document.createElement("canvas");
|
|
6610
|
-
while (offsetY < height) {
|
|
6611
|
-
const spriteHeight = Math.min(maxSpriteHeight, height - offsetY);
|
|
6612
|
-
cropCanvas(canvas, 0, offsetY, width, spriteHeight, spriteCanvas);
|
|
6613
|
-
offsetY += spriteHeight;
|
|
6614
|
-
_console$q.log(`cropping sprite ${imageIndex}`, {
|
|
6615
|
-
offsetY,
|
|
6616
|
-
width,
|
|
6617
|
-
spriteHeight,
|
|
6618
|
-
});
|
|
6619
|
-
await canvasToSprite(spriteCanvas, `image${imageIndex}`, numberOfColors, paletteName, false, spriteSheet);
|
|
6620
|
-
imageIndex++;
|
|
6621
|
-
}
|
|
6622
|
-
}
|
|
6623
|
-
}
|
|
6624
|
-
return spriteSheet;
|
|
6625
|
-
}
|
|
6626
|
-
async function imageToSpriteSheet(image, spriteSheetName, width, height, numberOfColors, paletteName, maxFileLength) {
|
|
6627
|
-
const canvas = resizeImage(image, width, height);
|
|
6628
|
-
return canvasToSpriteSheet(canvas, spriteSheetName, numberOfColors, paletteName, maxFileLength);
|
|
6629
|
-
}
|
|
6630
6426
|
|
|
6631
6427
|
const _console$p = createConsole("DisplayManagerInterface", { log: false });
|
|
6632
6428
|
async function runDisplayContextCommand(displayManager, command, sendImmediately) {
|
|
@@ -14592,5 +14388,5 @@ const ThrottleUtils = {
|
|
|
14592
14388
|
debounce,
|
|
14593
14389
|
};
|
|
14594
14390
|
|
|
14595
|
-
export { CameraCommands, CameraConfigurationTypes, ContinuousSensorTypes, DefaultNumberOfDisplayColors, DefaultNumberOfPressureSensors, Device, DeviceManager$1 as DeviceManager, DevicePair, DevicePairTypes, DeviceTypes, DisplayAlignments, DisplayBezierCurveTypes, DisplayBrightnesses, DisplayContextCommandTypes, DisplayDirections, DisplayPixelDepths, DisplaySegmentCaps, DisplaySpriteContextCommandTypes, environment as Environment, EventUtils, FileTransferDirections, FileTypes, MaxNameLength, MaxNumberOfVibrationWaveformEffectSegments, MaxNumberOfVibrationWaveformSegments, MaxSensorRate, MaxSpriteSheetNameLength, MaxVibrationWaveformEffectSegmentDelay, MaxVibrationWaveformEffectSegmentLoopCount, MaxVibrationWaveformEffectSequenceLoopCount, MaxVibrationWaveformSegmentDuration, MaxWifiPasswordLength, MaxWifiSSIDLength, MicrophoneCommands, MicrophoneConfigurationTypes, MicrophoneConfigurationValues, MinNameLength, MinSpriteSheetNameLength, MinWifiPasswordLength, MinWifiSSIDLength, RangeHelper, scanner$1 as Scanner, SensorRateStep, SensorTypes, Sides, TfliteSensorTypes, TfliteTasks, ThrottleUtils, Timer, UDPServer, VibrationLocations, VibrationTypes, VibrationWaveformEffects, WebSocketServer,
|
|
14391
|
+
export { CameraCommands, CameraConfigurationTypes, ContinuousSensorTypes, DefaultNumberOfDisplayColors, DefaultNumberOfPressureSensors, Device, DeviceManager$1 as DeviceManager, DevicePair, DevicePairTypes, DeviceTypes, DisplayAlignments, DisplayBezierCurveTypes, DisplayBrightnesses, DisplayContextCommandTypes, DisplayDirections, DisplayPixelDepths, DisplaySegmentCaps, DisplaySpriteContextCommandTypes, environment as Environment, EventUtils, FileTransferDirections, FileTypes, MaxNameLength, MaxNumberOfVibrationWaveformEffectSegments, MaxNumberOfVibrationWaveformSegments, MaxSensorRate, MaxSpriteSheetNameLength, MaxVibrationWaveformEffectSegmentDelay, MaxVibrationWaveformEffectSegmentLoopCount, MaxVibrationWaveformEffectSequenceLoopCount, MaxVibrationWaveformSegmentDuration, MaxWifiPasswordLength, MaxWifiSSIDLength, MicrophoneCommands, MicrophoneConfigurationTypes, MicrophoneConfigurationValues, MinNameLength, MinSpriteSheetNameLength, MinWifiPasswordLength, MinWifiSSIDLength, RangeHelper, scanner$1 as Scanner, SensorRateStep, SensorTypes, Sides, TfliteSensorTypes, TfliteTasks, ThrottleUtils, Timer, UDPServer, VibrationLocations, VibrationTypes, VibrationWaveformEffects, WebSocketServer, displayCurveTypeToNumberOfControlPoints, englishRegex, fontToSpriteSheet, getFontMaxHeight, getFontMetrics, getFontUnicodeRange, getMaxSpriteSheetSize, hexToRGB, intersectWireframes, isWireframePolygon, maxDisplayScale, mergeWireframes, parseFont, pixelDepthToNumberOfColors, rgbToHex, setAllConsoleLevelFlags, setConsoleLevelFlagsForType, simplifyCurves, simplifyPoints, simplifyPointsAsCubicCurveControlPoints, stringToSprites, wait };
|
|
14596
14392
|
//# sourceMappingURL=brilliantsole.node.module.js.map
|