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
import {asSceneError} from './core';
import type {SceneDefinition,SceneDataPreparationContext} from './types';
function checkAbort(signal:AbortSignal):void{if(signal.aborted)throw signal.reason??new DOMException('Scene preparation aborted','AbortError');}
/** Internal bridge: no new page callbacks, error codes or asynchronous readiness dependency. */
export function prepareSceneData(prepare:NonNullable<SceneDefinition['prepareData']>,data:ReadonlyMap<string,ArrayBuffer>,context:SceneDataPreparationContext):void{
checkAbort(context.signal);
try{prepare(data,context);}catch(error){throw asSceneError(error);}
checkAbort(context.signal);
}