Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
// These values count pixels or cells; subpixel precision is useful for other geometry.
export function isIntegerField(path: string): boolean {
if (/^(?:cloth\.\d+\.(?:columns|rows|cohesion)|mesh\.clothCell)$/.test(path)) return true;
return /^(?:image\.(?:width|height)|accessories\.\d+\.box\.\d+|mesh\.(?:baseCell|handCell|tasselCell|eyeBallCell|eyeCell|spriteCell|fine\.(?:x0|x1|y0|y1|cell)))$/.test(path);
}
export function editorNumber(path: string, value: number): number {
return isIntegerField(path) ? Math.round(value) : value;
}