heightNormals beta
Function of @v12-engine/client/ground
ts
export declare function heightNormals(pixels: Uint8Array, count: number, size: number, out?: Uint8Array, keep?: (layer: number) => boolean): Uint8Array;The normals of pictures by their heights (their alpha, as the ground blends by: withHeight, PatternDef.height), as a normal map of each (RGBA, size across, count of them one after another as the ground's array has them): x along the picture's width, y down its rows and z out of it in red, green and blue (0..255 for -1..1, as normal maps are), alpha 255. Its slopes wrap round the edges, as the picture repeats. Into out where given (a layer's own map is kept where keep says)