mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
18 lines
811 B
TypeScript
18 lines
811 B
TypeScript
import { toData } from './kotlin-data'
|
|
declare const FaceclawKitIosTextureAtlas: any
|
|
const atlas = FaceclawKitIosTextureAtlas.new()
|
|
|
|
export function textureAtlasAvailable(): boolean { return true }
|
|
export function textureFontId(key: string): number { return atlas.fontIdKey(key) }
|
|
export function registerTextureGlyphs(buffer: ArrayBuffer, aa: boolean): void {
|
|
const data = toData(new Uint8Array(buffer))
|
|
if (aa) atlas.registerAaGlyphsData(data)
|
|
else atlas.registerGlyphsData(data)
|
|
}
|
|
export function registerFirmwareGlyphs(buffer: ArrayBuffer): void {
|
|
atlas.registerFirmwareGlyphsData(toData(new Uint8Array(buffer)))
|
|
}
|
|
export function textureImageId(key: string, width: number, height: number, pixels: Uint8Array): number {
|
|
return atlas.imageIdKeyWidthHeightData(key, width, height, toData(pixels))
|
|
}
|