Port navigate and weather

This commit is contained in:
James Babcock committed 2026-09-18 23:46:27 -07:00
1 parent 2b3e068a23
commit 9e18745e53
33 files changed
+630 -60

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { GrayImage } from '../graphics/image'
import { toData, fromData } from './kotlin-data'
declare const FaceclawGraphics: any
/** Native image decoding and grayscale conversion, safe on a rendering worker. */
export function decodeImageBytes(bytes: ArrayBuffer, width: number, height: number): GrayImage | null {
const data = FaceclawGraphics.decodeImageWidthHeight(toData(new Uint8Array(bytes)), width, height)
if (!data) return null
const image = new GrayImage(width, height, 0)
image.pixels.set(fromData(data))
return image
}