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
/** Admit a parsed resource immediately before committing it to the visible stage. */
export function acceptLoadedResource<T>(
resource: T,
isCurrent: () => boolean,
release: (resource: T) => void,
): T | undefined {
if (isCurrent()) return resource;
release(resource);
return undefined;
}