Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

508 B
Raw Blame
// Consumer owns phase selection and sampling. Only a stopped startup loop may
// call this; the draw owns its offscreen target and awaited GPU completion.
export async function warmProductionPhase({sample,time,restoreTime,draw}){
 if(typeof sample!=='function'||typeof draw!=='function'||![time,restoreTime].every(t=>Number.isFinite(t)&&t>=0))throw Error('Invalid production phase warmup');
 try{sample(time);return {...await draw(),phaseTime:time,restoredTime:restoreTime};}finally{sample(restoreTime);}
}