(r: number, g: number, b: number, a: number): number
represents a function that takes 4 or less arguments as each pixel's color (0 to 255), and spits out a float id for the provided color
this pixel color identification is used by fromJAtlasImage and fromJAtlasImageData
in general, any id equal to 0 or less (negative) is considered background, and thus omitted
while, ids greater than 0 are registered in entries
the static methods mentioned above fallback to a default pixel identification function when none is provided:
constdefault_id_numbering_func: IDNumberingFunc = (r, g, b, a) =>a === 0 ? 0 : (255 - a) / 100 + b * (2 ** 0) + g * (2 ** 8) + r * (2 ** 16)
represents a function that takes 4 or less arguments as each pixel's color (0 to 255), and spits out a
floatid for the provided colorthis pixel color identification is used by fromJAtlasImage and fromJAtlasImageData
in general, any id equal to
0or less (negative) is considered background, and thus omittedwhile, ids greater than
0are registered in entriesthe static methods mentioned above fallback to a default pixel identification function when none is provided: