Skip to content

heightsFromPixels beta ​

Function of @v12-engine/engine

ts
export declare function heightsFromPixels(pixels: ArrayLike<number>, imageWidth: number, imageHeight: number, map: Pick<GameMap, 'width' | 'depth'>, low: number, high: number): Float32Array;

Heights from the pixels of a picture (RGBA, as a canvas gives them): dark is low, light is high, the picture stretched over the corners of the map's ground. A heightmap made elsewhere, read into a map