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 { mountAssetViewer } from '../src/components/AssetViewerRuntime';
/**
* Browser side of `verify-viewer-draws.mjs`: the site's own viewer runtime on one model, with its query string
* choosing the backend and the saved cameras, so the counts come from what a visitor's page runs.
*/
const query = new URLSearchParams(location.search);
const failures: string[] = [];
(window as unknown as { kilnViewerFailures: string[] }).kilnViewerFailures = failures;
mountAssetViewer(document.getElementById('viewer') as HTMLElement, {
name: 'model',
modelUrl: '/model.glb',
onError: (error) => failures.push(error.message),
forceWebGL: query.get('backend') === 'webgl2',
views: JSON.parse(query.get('views') ?? '[]'),
});