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.
JavaScript 3d3d-assets3d-modelingagent-skillsagent-toolsai-agentsasset-pipelinecligame-assetsglbgltfmcpmcp-servermodel-context-protocolprocedural-generationprocedural-modelingtext-to-3dthreejstypescript
// 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);}
}