@babylonjs/mcp-servers 9.15.0 → 9.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gui-mcp-server.js +1 -1
- package/dist/gui-mcp-server.js.map +1 -1
- package/dist/nge-mcp-server.js +1 -1
- package/dist/nge-mcp-server.js.map +1 -1
- package/dist/nme-mcp-server.js +1 -1
- package/dist/nme-mcp-server.js.map +1 -1
- package/dist/npe-mcp-server.js +1 -1
- package/dist/npe-mcp-server.js.map +1 -1
- package/dist/nrge-mcp-server.js +1 -1
- package/dist/nrge-mcp-server.js.map +1 -1
- package/package.json +2 -2
package/dist/nme-mcp-server.js
CHANGED
|
@@ -97,7 +97,7 @@ data: ${JSON.stringify({reason:r})}
|
|
|
97
97
|
Inputs:`);for(const u of n.inputs){const l=u.targetBlockId!==void 0?` \u2190 connected to [${u.targetBlockId}].${u.targetConnectionName}`:" (unconnected)";a.push(` \u2022 ${u.name}${l}`)}a.push(`
|
|
98
98
|
Outputs:`);for(const u of n.outputs){const l=[];for(const p of o.blocks)for(const m of p.inputs)m.targetBlockId===r&&m.targetConnectionName===u.name&&l.push(`[${p.id}] ${p.name}.${m.name}`);const d=l.length>0?` \u2192 ${l.join(", ")}`:" (unconnected)";a.push(` \u2022 ${u.name}${d}`)}const s=new Set(["customType","id","name","target","inputs","outputs"]),c=Object.entries(n).filter(([u])=>!s.has(u));if(c.length>0){a.push(`
|
|
99
99
|
Properties:`);for(const[u,l]of c)a.push(` ${u}: ${JSON.stringify(l)}`)}return a.join(`
|
|
100
|
-
`)}exportJSON(t){const r=this._materials.get(t);if(r){for(const o of r.blocks){o.customType==="BABYLON.InputBlock"&&(this._normaliseInputBlockValue(o),this._ensureDefaultValue(o));const n=o.customType.replace("BABYLON.",""),i=xr[n];if(i?.defaultSerializedProperties)for(const[s,c]of Object.entries(i.defaultSerializedProperties))o[s]===void 0&&(o[s]=c);const a=ru[n];if(a)for(const[s,c]of Object.entries(a))typeof o[s]=="string"&&(o[s]=c[o[s]]??o[s])}for(const o of r.blocks)if(o.customType==="BABYLON.RemapBlock"){if(!Array.isArray(o.sourceRange)){const n=o.sourceMin??-1,i=o.sourceMax??1;o.sourceRange=[n,i]}if(!Array.isArray(o.targetRange)){const n=o.targetMin??0,i=o.targetMax??1;o.targetRange=[n,i]}delete o.sourceMin,delete o.sourceMax,delete o.targetMin,delete o.targetMax}for(const o of r.blocks)for(const n of["texture","reflectionTexture"])if(typeof o[n]=="string"){const i=o[n];o[n]={name:i,url:i,uOffset:0,vOffset:0,uScale:1,vScale:1,uAng:0,vAng:0,wAng:0,invertY:!0,samplingMode:3,noMipmap:!1,coordinatesMode:0,coordinatesIndex:0,hasAlpha:!1,level:1}}return this._layoutGraph(r),JSON.stringify(r,null,2)}}static COL_WIDTH=340;static ROW_HEIGHT=180;_layoutGraph(t){const r=t.blocks;if(r.length===0)return;const o=new Map;for(const g of r)o.set(g.id,g);const n=new Map,i=new Map;for(const g of r)n.set(g.id,new Set),i.set(g.id,new Set);for(const g of r)for(const v of g.inputs)v.targetBlockId!==void 0&&(n.get(g.id).add(v.targetBlockId),i.get(v.targetBlockId)?.add(g.id));const a=new Map,s=[];for(const g of r){const v=g.customType.replace("BABYLON.","");(v==="VertexOutputBlock"||v==="FragmentOutputBlock")&&(a.set(g.id,0),s.push(g.id))}s.length===0&&r.length>0&&(a.set(r[r.length-1].id,0),s.push(r[r.length-1].id));let c=0;for(;c<s.length;){const g=s[c++],v=a.get(g);for(const y of n.get(g)??[]){const b=a.get(y);(b===void 0||v+1>b)&&(a.set(y,v+1),s.push(y))}}const u=Math.max(0,...a.values());for(const g of r)a.has(g.id)||a.set(g.id,u+1);const l=Math.max(0,...a.values()),d=new Map;for(const[g,v]of a)d.set(g,l-v);const p=new Map;for(const g of r){const v=d.get(g.id);p.has(v)||p.set(v,[]),p.get(v).push(g.id)}const m=[...p.keys()].sort((g,v)=>v-g),f=new Map;for(const g of m){const v=p.get(g);if(g===m[0])v.forEach((y,b)=>f.set(y,b));else{const y=new Map;for(const b of v){const I=i.get(b),x=[];for(const B of I){const L=f.get(B);L!==void 0&&x.push(L)}x.length>0?y.set(b,x.reduce((B,L)=>B+L,0)/x.length):y.set(b,9999)}v.sort((b,I)=>y.get(b)-y.get(I)),v.forEach((b,I)=>f.set(b,I))}}const _=[];for(const g of r){const v=d.get(g.id),y=f.get(g.id);_.push({blockId:g.id,x:v*_i.COL_WIDTH,y:y*_i.ROW_HEIGHT})}t.editorData?t.editorData.locations=_:t.editorData={locations:_}}importJSON(t,r){try{const o=CT(r);this._materials.set(t,o);const n=o.blocks.reduce((i,a)=>Math.max(i,a.id),0);return this._nextId.set(t,n+1),this._nextX.set(t,o.blocks.length*280),"OK"}catch(o){return o.message}}setBlockProperties(t,r,o){const n=this._materials.get(t);if(!n)return`Material "${t}" not found.`;const i=n.blocks.find(s=>s.id===r);if(!i)return`Block ${r} not found.`;const a=i.customType.replace("BABYLON.","");for(const[s,c]of Object.entries(o))if(a==="InputBlock"&&s==="type"&&typeof c=="string")i.type=je[c]??c;else if(a==="InputBlock"&&s==="systemValue"&&typeof c=="string")i.systemValue=Cv[c]??c,i.mode=0;else if(a==="InputBlock"&&s==="animationType"&&typeof c=="string")i.animationType=Rv[c]??c;else if(a==="InputBlock"&&s==="mode"&&typeof c=="string"){const u={Uniform:0,Attribute:1,Varying:2,Undefined:3};i.mode=u[c]??c}else if(typeof c=="string"&&ru[a]?.[s]){const u=ru[a][s];i[s]=u[c]??c}else i[s]=c;if(a==="InputBlock"){if(i.attributeName!==void 0){const s=Mv(i.attributeName);if(i.attributeName=s.name,s.warning)return s.warning}i.attributeName!==void 0&&(i.mode===3||i.mode===0)&&(i.mode=1),this._normaliseInputBlockValue(i),this._ensureDefaultValue(i)}return"OK"}validateMaterial(t){const r=this._materials.get(t);if(!r)return[`Material "${t}" not found.`];const o=[],n=r.blocks.some(a=>a.customType==="BABYLON.VertexOutputBlock"),i=r.blocks.some(a=>a.customType==="BABYLON.FragmentOutputBlock");r.mode===nu.Material&&(n||o.push("ERROR: Missing VertexOutputBlock \u2014 every material needs one."),i||o.push("ERROR: Missing FragmentOutputBlock \u2014 every material needs one."));for(const a of r.blocks){const s=a.customType.replace("BABYLON.",""),c=Object.values(Pn).find(u=>u.className===s);if(c)for(const u of a.inputs){const l=c.inputs.find(d=>d.name===u.name);if(u.targetBlockId===void 0&&l&&!l.isOptional){if(c.defaultSerializedProperties&&Object.keys(c.defaultSerializedProperties).length>0)continue;o.push(`WARNING: Block [${a.id}] "${a.name}" has required input "${u.name}" that is not connected.`)}}}for(const a of r.outputNodes)r.blocks.find(s=>s.id===a)||o.push(`ERROR: Output node references block ${a} which does not exist.`);for(const a of r.blocks)for(const s of a.inputs)if(s.targetBlockId!==void 0){const c=r.blocks.find(u=>u.id===s.targetBlockId);c?c.outputs.find(u=>u.name===s.targetConnectionName)||o.push(`WARNING: Block [${a.id}] "${a.name}" input "${s.name}" references output "${s.targetConnectionName}" which doesn't exist on block [${c.id}].`):o.push(`ERROR: Block [${a.id}] "${a.name}" input "${s.name}" references non-existent block ${s.targetBlockId}.`)}for(const a of r.blocks){if(a.customType!=="BABYLON.InputBlock")continue;a.type===void 0&&o.push(`ERROR: InputBlock [${a.id}] "${a.name}" has no 'type' property. Set type to: Float, Int, Vector2, Vector3, Vector4, Color3, Color4, or Matrix.`);const s=a.value!==void 0,c=a.systemValue!==void 0,u=a.attributeName!==void 0;!s&&!c&&!u&&o.push(`WARNING: InputBlock [${a.id}] "${a.name}" has no value, systemValue, or attributeName \u2014 it provides no data.`)}for(const a of r.blocks){if(a.customType==="BABYLON.VertexOutputBlock"||a.customType==="BABYLON.FragmentOutputBlock"||a.customType==="BABYLON.InputBlock")continue;const s=a.inputs.some(u=>u.targetBlockId!==void 0),c=r.blocks.some(u=>u.inputs.some(l=>l.targetBlockId===a.id));!s&&!c&&o.push(`WARNING: Block [${a.id}] "${a.name}" (${a.customType.replace("BABYLON.","")}) has no connections \u2014 it is an orphan and does nothing.`)}return o.length===0&&o.push("No issues found \u2014 graph looks valid."),o}}const tP="https://cdn.babylonjs.com",nP={havok:"havok/HavokPhysics_umd.js",ammo:"ammo/ammo.js",recast:"recast.js"},su="https://snippet.babylonjs.com";async function rP(e,t=su){let r=e.replace(/#/g,"/");r.includes("/")||(r+="/0");const o=`${t}/${r}`,n=await fetch(o);if(!n.ok)throw new Error(`Failed to fetch snippet "${e}": ${n.status} ${n.statusText}`);return await n.json()}const oP=[["nodeMaterial","nodeMaterial"],["nodeGeometry","nodeGeometry"],["nodeRenderGraph","nodeRenderGraph"],["nodeParticle","nodeParticle"],["gui","gui"],["encodedGui","gui"],["animations","animation"],["animation","animation"],["particleSystem","particleSystem"],["spriteManager","spriteManager"],["shaderMaterial","shaderMaterial"]];function iP(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r.buffer}function Bv(e){const t=new Uint8Array(iP(e));return new TextDecoder("utf-8").decode(t)}function aP(e){if(e.files&&typeof e.files=="object"&&e.v!==void 0||typeof e.code=="string")return"playground";for(const[t,r]of oP)if(t in e)return r;return"unknown"}function sP(e,t,r,o){let n;switch(t){case"gui":{typeof e.encodedGui=="string"?n=JSON.parse(Bv(e.encodedGui)):n=typeof e.gui=="string"?JSON.parse(e.gui):e.gui;break}case"animation":{typeof e.animations=="string"?n=JSON.parse(e.animations):e.animations!==void 0?n=e.animations:typeof e.animation=="string"?n=JSON.parse(e.animation):n=e.animation;break}default:{const a=e[t];n=typeof a=="string"?JSON.parse(a):a;break}}return{snippetId:r,type:t,metadata:o,data:n,load:i=>i?i(n):n}}let cu=null;async function cP(){return await import("monaco-editor/esm/vs/language/typescript/lib/typescriptServices")}async function uP(){return cu||(cu=cP().then(e=>e.typescript)),await cu}async function lP(e,t){const r=await uP();return r.transpileModule(e,{compilerOptions:{target:r.ScriptTarget.ESNext,module:r.ModuleKind.ESNext,jsx:t.endsWith(".tsx")?r.JsxEmit.ReactJSX:void 0,esModuleInterop:!1,allowJs:!0,sourceMap:!1,
|
|
100
|
+
`)}exportJSON(t){const r=this._materials.get(t);if(r){for(const o of r.blocks){o.customType==="BABYLON.InputBlock"&&(this._normaliseInputBlockValue(o),this._ensureDefaultValue(o));const n=o.customType.replace("BABYLON.",""),i=xr[n];if(i?.defaultSerializedProperties)for(const[s,c]of Object.entries(i.defaultSerializedProperties))o[s]===void 0&&(o[s]=c);const a=ru[n];if(a)for(const[s,c]of Object.entries(a))typeof o[s]=="string"&&(o[s]=c[o[s]]??o[s])}for(const o of r.blocks)if(o.customType==="BABYLON.RemapBlock"){if(!Array.isArray(o.sourceRange)){const n=o.sourceMin??-1,i=o.sourceMax??1;o.sourceRange=[n,i]}if(!Array.isArray(o.targetRange)){const n=o.targetMin??0,i=o.targetMax??1;o.targetRange=[n,i]}delete o.sourceMin,delete o.sourceMax,delete o.targetMin,delete o.targetMax}for(const o of r.blocks)for(const n of["texture","reflectionTexture"])if(typeof o[n]=="string"){const i=o[n];o[n]={name:i,url:i,uOffset:0,vOffset:0,uScale:1,vScale:1,uAng:0,vAng:0,wAng:0,invertY:!0,samplingMode:3,noMipmap:!1,coordinatesMode:0,coordinatesIndex:0,hasAlpha:!1,level:1}}return this._layoutGraph(r),JSON.stringify(r,null,2)}}static COL_WIDTH=340;static ROW_HEIGHT=180;_layoutGraph(t){const r=t.blocks;if(r.length===0)return;const o=new Map;for(const g of r)o.set(g.id,g);const n=new Map,i=new Map;for(const g of r)n.set(g.id,new Set),i.set(g.id,new Set);for(const g of r)for(const v of g.inputs)v.targetBlockId!==void 0&&(n.get(g.id).add(v.targetBlockId),i.get(v.targetBlockId)?.add(g.id));const a=new Map,s=[];for(const g of r){const v=g.customType.replace("BABYLON.","");(v==="VertexOutputBlock"||v==="FragmentOutputBlock")&&(a.set(g.id,0),s.push(g.id))}s.length===0&&r.length>0&&(a.set(r[r.length-1].id,0),s.push(r[r.length-1].id));let c=0;for(;c<s.length;){const g=s[c++],v=a.get(g);for(const y of n.get(g)??[]){const b=a.get(y);(b===void 0||v+1>b)&&(a.set(y,v+1),s.push(y))}}const u=Math.max(0,...a.values());for(const g of r)a.has(g.id)||a.set(g.id,u+1);const l=Math.max(0,...a.values()),d=new Map;for(const[g,v]of a)d.set(g,l-v);const p=new Map;for(const g of r){const v=d.get(g.id);p.has(v)||p.set(v,[]),p.get(v).push(g.id)}const m=[...p.keys()].sort((g,v)=>v-g),f=new Map;for(const g of m){const v=p.get(g);if(g===m[0])v.forEach((y,b)=>f.set(y,b));else{const y=new Map;for(const b of v){const I=i.get(b),x=[];for(const B of I){const L=f.get(B);L!==void 0&&x.push(L)}x.length>0?y.set(b,x.reduce((B,L)=>B+L,0)/x.length):y.set(b,9999)}v.sort((b,I)=>y.get(b)-y.get(I)),v.forEach((b,I)=>f.set(b,I))}}const _=[];for(const g of r){const v=d.get(g.id),y=f.get(g.id);_.push({blockId:g.id,x:v*_i.COL_WIDTH,y:y*_i.ROW_HEIGHT})}t.editorData?t.editorData.locations=_:t.editorData={locations:_}}importJSON(t,r){try{const o=CT(r);this._materials.set(t,o);const n=o.blocks.reduce((i,a)=>Math.max(i,a.id),0);return this._nextId.set(t,n+1),this._nextX.set(t,o.blocks.length*280),"OK"}catch(o){return o.message}}setBlockProperties(t,r,o){const n=this._materials.get(t);if(!n)return`Material "${t}" not found.`;const i=n.blocks.find(s=>s.id===r);if(!i)return`Block ${r} not found.`;const a=i.customType.replace("BABYLON.","");for(const[s,c]of Object.entries(o))if(a==="InputBlock"&&s==="type"&&typeof c=="string")i.type=je[c]??c;else if(a==="InputBlock"&&s==="systemValue"&&typeof c=="string")i.systemValue=Cv[c]??c,i.mode=0;else if(a==="InputBlock"&&s==="animationType"&&typeof c=="string")i.animationType=Rv[c]??c;else if(a==="InputBlock"&&s==="mode"&&typeof c=="string"){const u={Uniform:0,Attribute:1,Varying:2,Undefined:3};i.mode=u[c]??c}else if(typeof c=="string"&&ru[a]?.[s]){const u=ru[a][s];i[s]=u[c]??c}else i[s]=c;if(a==="InputBlock"){if(i.attributeName!==void 0){const s=Mv(i.attributeName);if(i.attributeName=s.name,s.warning)return s.warning}i.attributeName!==void 0&&(i.mode===3||i.mode===0)&&(i.mode=1),this._normaliseInputBlockValue(i),this._ensureDefaultValue(i)}return"OK"}validateMaterial(t){const r=this._materials.get(t);if(!r)return[`Material "${t}" not found.`];const o=[],n=r.blocks.some(a=>a.customType==="BABYLON.VertexOutputBlock"),i=r.blocks.some(a=>a.customType==="BABYLON.FragmentOutputBlock");r.mode===nu.Material&&(n||o.push("ERROR: Missing VertexOutputBlock \u2014 every material needs one."),i||o.push("ERROR: Missing FragmentOutputBlock \u2014 every material needs one."));for(const a of r.blocks){const s=a.customType.replace("BABYLON.",""),c=Object.values(Pn).find(u=>u.className===s);if(c)for(const u of a.inputs){const l=c.inputs.find(d=>d.name===u.name);if(u.targetBlockId===void 0&&l&&!l.isOptional){if(c.defaultSerializedProperties&&Object.keys(c.defaultSerializedProperties).length>0)continue;o.push(`WARNING: Block [${a.id}] "${a.name}" has required input "${u.name}" that is not connected.`)}}}for(const a of r.outputNodes)r.blocks.find(s=>s.id===a)||o.push(`ERROR: Output node references block ${a} which does not exist.`);for(const a of r.blocks)for(const s of a.inputs)if(s.targetBlockId!==void 0){const c=r.blocks.find(u=>u.id===s.targetBlockId);c?c.outputs.find(u=>u.name===s.targetConnectionName)||o.push(`WARNING: Block [${a.id}] "${a.name}" input "${s.name}" references output "${s.targetConnectionName}" which doesn't exist on block [${c.id}].`):o.push(`ERROR: Block [${a.id}] "${a.name}" input "${s.name}" references non-existent block ${s.targetBlockId}.`)}for(const a of r.blocks){if(a.customType!=="BABYLON.InputBlock")continue;a.type===void 0&&o.push(`ERROR: InputBlock [${a.id}] "${a.name}" has no 'type' property. Set type to: Float, Int, Vector2, Vector3, Vector4, Color3, Color4, or Matrix.`);const s=a.value!==void 0,c=a.systemValue!==void 0,u=a.attributeName!==void 0;!s&&!c&&!u&&o.push(`WARNING: InputBlock [${a.id}] "${a.name}" has no value, systemValue, or attributeName \u2014 it provides no data.`)}for(const a of r.blocks){if(a.customType==="BABYLON.VertexOutputBlock"||a.customType==="BABYLON.FragmentOutputBlock"||a.customType==="BABYLON.InputBlock")continue;const s=a.inputs.some(u=>u.targetBlockId!==void 0),c=r.blocks.some(u=>u.inputs.some(l=>l.targetBlockId===a.id));!s&&!c&&o.push(`WARNING: Block [${a.id}] "${a.name}" (${a.customType.replace("BABYLON.","")}) has no connections \u2014 it is an orphan and does nothing.`)}return o.length===0&&o.push("No issues found \u2014 graph looks valid."),o}}const tP="https://cdn.babylonjs.com",nP={havok:"havok/HavokPhysics_umd.js",ammo:"ammo/ammo.js",recast:"recast.js"},su="https://snippet.babylonjs.com";async function rP(e,t=su){let r=e.replace(/#/g,"/");r.includes("/")||(r+="/0");const o=`${t}/${r}`,n=await fetch(o);if(!n.ok)throw new Error(`Failed to fetch snippet "${e}": ${n.status} ${n.statusText}`);return await n.json()}const oP=[["nodeMaterial","nodeMaterial"],["nodeGeometry","nodeGeometry"],["nodeRenderGraph","nodeRenderGraph"],["nodeParticle","nodeParticle"],["gui","gui"],["encodedGui","gui"],["animations","animation"],["animation","animation"],["particleSystem","particleSystem"],["spriteManager","spriteManager"],["shaderMaterial","shaderMaterial"]];function iP(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r.buffer}function Bv(e){const t=new Uint8Array(iP(e));return new TextDecoder("utf-8").decode(t)}function aP(e){if(e.files&&typeof e.files=="object"&&e.v!==void 0||typeof e.code=="string")return"playground";for(const[t,r]of oP)if(t in e)return r;return"unknown"}function sP(e,t,r,o){let n;switch(t){case"gui":{typeof e.encodedGui=="string"?n=JSON.parse(Bv(e.encodedGui)):n=typeof e.gui=="string"?JSON.parse(e.gui):e.gui;break}case"animation":{typeof e.animations=="string"?n=JSON.parse(e.animations):e.animations!==void 0?n=e.animations:typeof e.animation=="string"?n=JSON.parse(e.animation):n=e.animation;break}default:{const a=e[t];n=typeof a=="string"?JSON.parse(a):a;break}}return{snippetId:r,type:t,metadata:o,data:n,load:i=>i?i(n):n}}let cu=null;async function cP(){return await import("monaco-editor/esm/vs/language/typescript/lib/typescriptServices")}async function uP(){return cu||(cu=cP().then(e=>e.typescript)),await cu}async function lP(e,t){const r=await uP();return r.transpileModule(e,{compilerOptions:{target:r.ScriptTarget.ESNext,module:r.ModuleKind.ESNext,jsx:t.endsWith(".tsx")?r.JsxEmit.ReactJSX:void 0,esModuleInterop:!1,allowJs:!0,sourceMap:!1,isolatedModules:!0,strict:!1,allowUmdGlobalAccess:!0},fileName:t}).outputText}async function dP(e,t){const r={},o=[];for(const[n,i]of Object.entries(e))if(/\.tsx?$/i.test(n)){const a=n.replace(/\.tsx?$/i,".js");o.push((async()=>{r[a]=await Promise.resolve(t(i,n))})())}else r[n]=i;return await Promise.all(o),r}const Zv=["delayCreateScene","delayLoadScene","createScene","CreateScene","createscene"];function mP(e){if(e.includes("class Playground"))return"TS";if(Zv.some(o=>e.includes(o))||!e)return"JS";const t=[/\binterface\s+[A-Za-z_]\w*/m,/\benum\s+[A-Za-z_]\w*/m,/\btype\s+[A-Za-z_]\w*\s*=/m,/\bimplements\s+[A-Za-z_]/m,/\breadonly\b/m,/\bpublic\b|\bprivate\b|\bprotected\b/m,/\babstract\s+class\b/m,/\bas\s+const\b/m,/\bimport\s+type\s+/m],r=/[:]\s*[A-Za-z_$][\w$.<>,\s?\\[\]|&]*\b(?![:=])/m.test(e);return t.some(o=>o.test(e))||r?"TS":"JS"}function pP(e,t){let r=e;if(t==="JS"){const n=r.search(/(?:var|let|const|function)\s+(?:createScene|delayCreateScene|delayLoadScene|createEngine|CreateScene)\b/),i=n>0?r.slice(0,n):"";i&&(r=i.replace(/^[^\S\n]*(?:var|let|const)\s+canvas\s*=\s*document\.getElementById\s*\([^)]*\)\s*;?[^\S\n]*$/gm,"// [snippet-loader] canvas provided by host").replace(/^[^\S\n]*(?:var|let|const)\s+engine\s*=\s*new\s+BABYLON\.\w*Engine\b[^;]*;?[^\S\n]*$/gm,"// [snippet-loader] engine provided by host")+r.slice(n))}const o=t==="TS"?"Playground":Zv.find(n=>r.includes(n))??"createScene";return r+=`
|
|
101
101
|
export default ${o}
|
|
102
102
|
`,t==="JS"&&/\bfunction\s+createEngine\b|\bvar\s+createEngine\s*=|\bconst\s+createEngine\s*=|\blet\s+createEngine\s*=/.test(r)&&(r+=`
|
|
103
103
|
export { createEngine }
|