@galacean/cli 2.0.0-alpha.27 → 2.0.0-alpha.28
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/cli.bundle.cjs +51489 -14885
- package/dist/preview-client/_static/{Accordion-4afac60c.js → Accordion-6f002a96.js} +1 -1
- package/dist/preview-client/_static/{AmbientLightAsset-3825f3bf.js → AmbientLightAsset-57a59fc2.js} +2 -2
- package/dist/preview-client/_static/{AnimationClipAsset-660ecb36.js → AnimationClipAsset-0a1f63eb.js} +1 -1
- package/dist/preview-client/_static/{AnimatorControllerAsset-dcf11a9d.js → AnimatorControllerAsset-9192e596.js} +1 -1
- package/dist/preview-client/_static/{AnimatorStore-aa58d85c.js → AnimatorStore-484b10cf.js} +1 -1
- package/dist/preview-client/_static/{AssetViewer-8338dfe1.js → AssetViewer-9f395efb.js} +1 -1
- package/dist/preview-client/_static/{AudioAsset-6e607154.js → AudioAsset-0ea4ba7b.js} +1 -1
- package/dist/preview-client/_static/{AudioComponent-b70cc31e.js → AudioComponent-9bf5944c.js} +1 -1
- package/dist/preview-client/_static/{Callout-155c30df.js → Callout-45631a14.js} +1 -1
- package/dist/preview-client/_static/{CameraComponent-76bc9102.js → CameraComponent-039457d1.js} +1 -1
- package/dist/preview-client/_static/{Component-398551a0.js → Component-c3c0c167.js} +1 -1
- package/dist/preview-client/_static/{DirectLight-50653e81.js → DirectLight-7b1f4b9f.js} +1 -1
- package/dist/preview-client/_static/{FontAsset-dc385d41.js → FontAsset-10273d05.js} +2 -2
- package/dist/preview-client/_static/{FormItemArray-9ca61884.js → FormItemArray-9d4196d8.js} +2 -2
- package/dist/preview-client/_static/{GlTFAsset-d2ee4f95.js → GlTFAsset-917bf1ee.js} +5 -5
- package/dist/preview-client/_static/{IconPlus-b3ed4c04.js → IconPlus-2bfc60da.js} +1 -1
- package/dist/preview-client/_static/{IconPointFilled-3ba6d082.js → IconPointFilled-192e99c9.js} +1 -1
- package/dist/preview-client/_static/{LightBaseComponent-4cfc9f48.js → LightBaseComponent-948d3192.js} +1 -1
- package/dist/preview-client/_static/{LottieAnimationComponent-aeb555ea.js → LottieAnimationComponent-da226765.js} +1 -1
- package/dist/preview-client/_static/{MarkdownAsset-02477e7c.js → MarkdownAsset-602f93bf.js} +1 -1
- package/dist/preview-client/_static/MaterialAsset-aa93db51.js +1 -0
- package/dist/preview-client/_static/{MaterialInspector-3fb471d9.js → MaterialInspector-45e208c7.js} +1 -1
- package/dist/preview-client/_static/Menu-beacc39d.js +17 -0
- package/dist/preview-client/_static/MeshAsset-585f4b18.js +1 -0
- package/dist/preview-client/_static/{MeshRendererBaseComponent-cd8b743b.js → MeshRendererBaseComponent-0bc9f5b3.js} +1 -1
- package/dist/preview-client/_static/{MeshRendererComponent-17a7fc72.js → MeshRendererComponent-84208d23.js} +1 -1
- package/dist/preview-client/_static/{MeshThumbnail-8c20ee92.js → MeshThumbnail-9bbe01dc.js} +1 -1
- package/dist/preview-client/_static/ParticleRendererComponent-f3ac8d1b.js +26 -0
- package/dist/preview-client/_static/{PhysicsMaterialAsset-e0491877.js → PhysicsMaterialAsset-2dd013f8.js} +1 -1
- package/dist/preview-client/_static/{PhysicsStore-ab32886e.js → PhysicsStore-fcb01282.js} +1 -1
- package/dist/preview-client/_static/{PointLight-97975350.js → PointLight-d9ace100.js} +1 -1
- package/dist/preview-client/_static/{PostProcessComponent-9590ec29.js → PostProcessComponent-2b5255d9.js} +3 -3
- package/dist/preview-client/_static/PrefabAsset-8c923465.js +1 -0
- package/dist/preview-client/_static/{PrimitiveMesh-0492d482.js → PrimitiveMesh-fde624a6.js} +1 -1
- package/dist/preview-client/_static/{ReferencedMaterial-49a7cbcc.js → ReferencedMaterial-890492a2.js} +1 -1
- package/dist/preview-client/_static/{RenderTargetAsset-dc1f9494.js → RenderTargetAsset-bf38a725.js} +1 -1
- package/dist/preview-client/_static/SceneAsset-7a9dbdd8.js +1 -0
- package/dist/preview-client/_static/{ShaderAsset-f4eead79.js → ShaderAsset-2f2c1e95.js} +1 -1
- package/dist/preview-client/_static/{ShaderChunkAsset-4bea2733.js → ShaderChunkAsset-a3ff3959.js} +2 -2
- package/dist/preview-client/_static/{ShaderUIScriptAsset-3c731f3b.js → ShaderUIScriptAsset-d3a2d680.js} +2 -2
- package/dist/preview-client/_static/{SkinnedMeshRendererComponent-e0f9b133.js → SkinnedMeshRendererComponent-96740600.js} +1 -1
- package/dist/preview-client/_static/{SpineAnimationComponent-1e1655fd.js → SpineAnimationComponent-3d4eec48.js} +1 -1
- package/dist/preview-client/_static/{SpineSkeletonDataAsset-afb4afae.js → SpineSkeletonDataAsset-a8598103.js} +1 -1
- package/dist/preview-client/_static/{SpotLight-69f361c9.js → SpotLight-680a6e17.js} +1 -1
- package/dist/preview-client/_static/{SpriteBaseComponent-2c2454ea.js → SpriteBaseComponent-96a500d7.js} +1 -1
- package/dist/preview-client/_static/{SpriteMaskComponent-a7ebcc50.js → SpriteMaskComponent-58c35ea2.js} +1 -1
- package/dist/preview-client/_static/{SpriteRendererComponent-f7604c68.js → SpriteRendererComponent-5c89f7dd.js} +1 -1
- package/dist/preview-client/_static/{TextBaseComponent-cd7ad9f7.js → TextBaseComponent-248ea222.js} +3 -3
- package/dist/preview-client/_static/{TextRendererComponent-a5357d52.js → TextRendererComponent-78458825.js} +1 -1
- package/dist/preview-client/_static/{TextureAsset-ff089b5a.js → TextureAsset-bf69040b.js} +4 -4
- package/dist/preview-client/_static/Tooltip-0268ffac.js +1 -0
- package/dist/preview-client/_static/{TrailRendererComponent-cdefa368.js → TrailRendererComponent-838e0118.js} +1 -1
- package/dist/preview-client/_static/{TransformBaseComponent-d26ff236.js → TransformBaseComponent-c92aa259.js} +1 -1
- package/dist/preview-client/_static/{TransformComponent-4ec4b7b5.js → TransformComponent-d28b4035.js} +1 -1
- package/dist/preview-client/_static/{XRReferenceImageAsset-ff82ab30.js → XRReferenceImageAsset-16071f5c.js} +1 -1
- package/dist/preview-client/_static/{audio-0a013eb6.js → audio-1d573775.js} +1 -1
- package/dist/preview-client/_static/{createOnModelChange-89f572a6.js → createOnModelChange-38471bb6.js} +1 -1
- package/dist/preview-client/_static/{createReactComponent-baa41397.js → createReactComponent-3e49f864.js} +1 -1
- package/dist/preview-client/_static/index-0a57ae09.js +1 -0
- package/dist/preview-client/_static/{index-a0afef01.js → index-1d0ae2e4.js} +1 -1
- package/dist/preview-client/_static/{index-5e4dedda.js → index-1fa3ba70.js} +1 -1
- package/dist/preview-client/_static/index-2c567b8d.js +1 -0
- package/dist/preview-client/_static/{index-29916a80.js → index-2f54d4c9.js} +1 -1
- package/dist/preview-client/_static/{index-70967035.js → index-4084db44.js} +1 -1
- package/dist/preview-client/_static/index-5c27dafa.js +1 -0
- package/dist/preview-client/_static/{index-8784a43a.js → index-65c6af4a.js} +3 -3
- package/dist/preview-client/_static/{index-cd09e78a.js → index-68806c86.js} +1 -1
- package/dist/preview-client/_static/{index-c8ed2a45.js → index-8a22fe59.js} +1 -1
- package/dist/preview-client/_static/{index-d1484803.js → index-9e3daa94.js} +1 -1
- package/dist/preview-client/_static/index-bdda02cf.js +1 -0
- package/dist/preview-client/_static/index-c88f78ce.js +1 -0
- package/dist/preview-client/_static/{index-4845b67c.js → index-ce381b62.js} +3 -3
- package/dist/preview-client/_static/{index-b126bb6b.js → index-d497fb6d.js} +219 -180
- package/dist/preview-client/_static/index-e4fb05d8.js +1 -0
- package/dist/preview-client/_static/{ktx2-encoder-8498815e.js → ktx2-encoder-772f6c33.js} +1 -1
- package/dist/preview-client/_static/{module-83a57161.js → module-136992e3.js} +1 -1
- package/dist/preview-client/_static/{module-113ac03a.js → module-1470d524.js} +1 -1
- package/dist/preview-client/_static/{module-8efda49c.js → module-77c2ea8c.js} +1 -1
- package/dist/preview-client/_static/{postmen-3b48c572.js → postmen-0413c689.js} +1 -1
- package/dist/preview-client/_static/{shader-data-utils-c90e48b8.js → shader-data-utils-e38a959d.js} +1 -1
- package/dist/preview-client/index.html +1 -1
- package/package.json +1 -1
- package/dist/preview-client/_static/MaterialAsset-8f3b3302.js +0 -1
- package/dist/preview-client/_static/Menu-36c201c0.js +0 -17
- package/dist/preview-client/_static/MeshAsset-3ddf1ac6.js +0 -1
- package/dist/preview-client/_static/ParticleRendererComponent-1834a159.js +0 -26
- package/dist/preview-client/_static/PrefabAsset-2f94de73.js +0 -1
- package/dist/preview-client/_static/SceneAsset-c3bb667f.js +0 -1
- package/dist/preview-client/_static/Tooltip-1bcb87b5.js +0 -1
- package/dist/preview-client/_static/index-0086cabc.js +0 -1
- package/dist/preview-client/_static/index-253f9e13.js +0 -1
- package/dist/preview-client/_static/index-8234e4e2.js +0 -1
- package/dist/preview-client/_static/index-94594d06.js +0 -1
- package/dist/preview-client/_static/index-ad57c6c8.js +0 -1
- package/dist/preview-client/_static/index-f7fcda86.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Le=Object.defineProperty;var qe=(o,e,t)=>e in o?Le(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var C=(o,e,t)=>(qe(o,typeof e!="symbol"?e+"":e,t),t);import{d$ as Ue,e0 as be,e1 as Je,aJ as Ie,aK as Ge,av as O,bA as We,q as he,aN as Qe,aw as He,e2 as Xe,C as Ye,bE as Ze,e3 as Ee,e4 as et,e5 as W,e6 as tt,e7 as nt,e8 as st,bX as rt,e as J,e9 as ge,ea as ot,eb as it,ec as ct,ed as at,ee as dt,ef as ut,eg as ft,eh as lt,ei as ht,ej as pt,ek as mt,el as yt,em as we,en as St,bV as _e,eo as ne,ep as Pe,eq as bt,er as It,es as Et,et as gt,K as Ce,m as wt,aT as _t,x as Pt,aC as ke,n as Ct,dM as Rt,eu as $t}from"./index-b126bb6b.js";import{T as vt}from"./TaskQueue-05c94a4d.js";import{u as Re,I as Tt}from"./index-c8ed2a45.js";import"./postmen-3b48c572.js";import{A as At}from"./AssetViewer-8338dfe1.js";function xt(o,e,t){const n=[];function s(r){if(!(r==null||typeof r!="object")){if(Array.isArray(r)){for(const i of r)s(i);return}for(const i of Object.keys(r)){const c=r[i];if(e.includes(i)&&typeof c=="string"&&n.push(c),t){const a=t(i,c);a!==null&&n.push(a)}s(c)}}}return s(o),n}function T(o){return structuredClone(o)}function Q(o,e){const t=o.entities.findIndex(n=>n.id===e);if(t<0)throw new Error(`Prefab source entity "${e}" not found`);return t}function je(o,e){const t=o.components.findIndex(n=>n.id===e);if(t<0)throw new Error(`Prefab source component "${e}" not found`);return t}function oe(o,e,t){if(!t)return;const n=e==="scale"?[1,1,1]:[0,0,0],s=o[e]??n;o[e]=[t.x??s[0],t.y??s[1],t.z??s[2]]}function $e(o,e,t){const n=new Set(e),s=new Set;for(const r of t){if(s.has(r))throw new Error(`Prefab source ${o} id "${r}" is duplicated in the added source tree`);if(n.has(r))throw new Error(`Prefab source ${o} id "${r}" already exists`);s.add(r)}}function Ot(o){return o.entities.map(e=>e.id)}function ze(o){return o.components.map(e=>e.id)}function Mt(o){const e=new Set(o.entityIds),t=new Set(o.componentIds);return o.entities.map((n,s)=>{var c,a;const r=o.entityIds[s],i=structuredClone(n);return i.id=r,(c=i.children)!=null&&c.length&&(i.children=i.children.map(d=>{const u=typeof d=="number"?o.entityIds[d]:d;if(!e.has(u))throw new Error(`Prefab added source entity "${r}" child "${String(d)}" is outside added entity tree`);return u})),(a=i.components)!=null&&a.length&&(i.components=i.components.map(d=>{const u=typeof d=="number"?o.componentIds[d]:d;if(!t.has(u))throw new Error(`Prefab added source entity "${r}" component "${String(d)}" is outside added component list`);return u})),i})}function Ft(o){return o.components.map((e,t)=>({...structuredClone(e),id:o.componentIds[t]}))}function Dt(o,e){const t=new Map(o.entities.map(r=>[r.id,r])),n=new Set,s=r=>{if(n.has(r))return;n.add(r);const i=t.get(r);for(const c of(i==null?void 0:i.children)??[])s(c)};return s(e),n}function kt(o,e,t){var r,i,c;if(!t)return T(o);const n=T(o),s=n.entities[Q(n,e)];return t.name!==void 0&&(s.name=t.name),t.isActive!==void 0&&(t.isActive?delete s.isActive:s.isActive=!1),t.layer!==void 0&&(t.layer===0?delete s.layer:s.layer=t.layer),t.isLocked!==void 0&&(t.isLocked?s.isLocked=!0:delete s.isLocked),oe(s,"position",(r=t.transform)==null?void 0:r.position),oe(s,"rotation",(i=t.transform)==null?void 0:i.rotation),oe(s,"scale",(c=t.transform)==null?void 0:c.scale),n}function jt(o,e,t){if(!t||Object.keys(t).length===0)return T(o);const n=T(o),s=n.components[je(n,e)];return s.props=Ue(s.props??{},t),n}function zt(o,e){if(e.entities.length===0||e.entities.length!==e.entityIds.length)throw new Error("Prefab added entity tree must include matching entities and entityIds");if(e.components.length!==e.componentIds.length)throw new Error("Prefab added entity tree must include matching components and componentIds");$e("entity",Ot(o),e.entityIds),$e("component",ze(o),e.componentIds);const t=T(o),n=t.entities[Q(t,e.parentSourceEntityId)],s=Mt(e),r=Ft(e),i=e.entityIds[0];t.entities.push(...s),t.components.push(...r);const c=[...n.children??[]],a=Math.min(Math.max(e.index,0),c.length);return c.splice(a,0,i),n.children=c,t}function Bt(o,e){var l;const t=T(o),n=t.entities[Q(t,e.instanceSourceEntityId)];if(!n.instance)throw new Error(`Prefab source entity "${e.instanceSourceEntityId}" is not an instance entity`);const s=(l=n.instance).overrides??(l.overrides={}),r=[...s.addedEntities??[]],i=Math.max(0,e.index);let c=0,a=r.length;for(let m=0;m<r.length;m+=1)if(r[m].parent===e.parentSourceEntityId){if(c===i){a=m;break}c+=1,a=m+1}const d=structuredClone(e.entity),u=d.id??`${e.instanceSourceEntityId}:added:${r.length}`;return d.id=u,r.splice(a,0,{id:u,parent:e.parentSourceEntityId,entity:d}),s.addedEntities=r,t}function Nt(o,e){if(o.root===e)throw new Error("Cannot remove prefab root entity from source");Q(o,e);const t=Dt(o,e),n=new Set;for(const r of o.entities)if(t.has(r.id))for(const i of r.components??[])n.add(i);const s=T(o);return s.entities=s.entities.filter(r=>!t.has(r.id)).map(r=>{const i=structuredClone(r),c=(i.children??[]).filter(d=>!t.has(d)),a=(i.components??[]).filter(d=>!n.has(d));return c.length?i.children=c:delete i.children,a.length?i.components=a:delete i.components,i}),s.components=s.components.filter(r=>!n.has(r.id)),s}function Kt(o,e,t,n){if(ze(o).includes(t))throw new Error(`Prefab source component id "${t}" already exists`);const s=T(o),r=s.entities[Q(s,e)];return s.components.push({...structuredClone(n),id:t}),r.components=[...r.components??[],t],s}function Vt(o,e){je(o,e);const t=T(o);return t.components=t.components.filter(n=>n.id!==e),t.entities=t.entities.map(n=>{const s=structuredClone(n),r=(s.components??[]).filter(i=>i!==e);return r.length?s.components=r:delete s.components,s}),t}function Lt(o){switch(o.kind){case"add-source-entity":if(o.sourceEntityIds.length===0)throw new Error("Prefab source edit add-source-entity requires at least one source entity id");return;case"remove-source-entity":if(!o.sourceEntityId)throw new Error("Prefab source edit remove-source-entity requires a source entity id");return;case"add-source-component":if(!o.sourceComponentId)throw new Error("Prefab source edit add-source-component requires a source component id");return;case"remove-source-component":if(!o.sourceComponentId)throw new Error("Prefab source edit remove-source-component requires a source component id");return;case"add-nested-instance-entity":if(!o.instanceSourceEntityId)throw new Error("Prefab source edit add-nested-instance-entity requires an instance source entity id");if(!o.parentSourceEntityId)throw new Error("Prefab source edit add-nested-instance-entity requires a parent source entity id");return}}function ve(o,e){return o.length===e.length&&o.every((t,n)=>t===e[n])}function G(o,e,t){const n=new Set(e);for(const s of t)if(!n.has(s))throw new Error(`Prefab source edit expected ${o} id "${s}" to exist`)}function se(o,e,t){const n=new Set(e);for(const s of t)if(n.has(s))throw new Error(`Prefab source edit expected ${o} id "${s}" to be removed`)}function F(o){return o.entities.map(e=>e.id)}function B(o){return o.components.map(e=>e.id)}function Be(o,e){const t=o.entities.findIndex(n=>n.id===e);if(t<0)throw new Error(`Prefab source edit expected entity id "${e}" to exist`);return t}function qt(o,e){var n;const t=Be(o,e);if(!((n=o.entities[t])!=null&&n.instance))throw new Error(`Prefab source edit expected entity id "${e}" to be an instance entity`)}function Te(o,e,t){var s,r,i;const n=Be(o,e);return(((i=(r=(s=o.entities[n])==null?void 0:s.instance)==null?void 0:r.overrides)==null?void 0:i.addedEntities)??[]).filter(c=>c.parent===t).length}function D(o,e,t,n,s){if(o!=null){if(Array.isArray(o)){o.forEach((r,i)=>D(r,e,t,`${n}[${i}]`,s));return}if(Je(o)){o.$component===e&&s.push({entityId:t,propPath:n});for(const[r,i]of Object.entries(o))D(i,e,t,`${n}.${r}`,s)}}}function Ne(o,e,t,n,s){var r;D(o.props,e,t,`${n}.props`,s),(r=o.calls)==null||r.forEach((i,c)=>D(i,e,t,`${n}.calls[${c}]`,s))}function Ke(o,e,t,n,s){var r,i,c;(r=o.components)==null||r.forEach((a,d)=>Ne(a,e,t,`${n}.components[${d}]`,s)),(i=o.children)==null||i.forEach((a,d)=>Ke(a,e,t,`${n}.children[${d}]`,s)),Ve((c=o.instance)==null?void 0:c.overrides,e,t,`${n}.instance.overrides`,s)}function Ve(o,e,t,n,s){var r,i,c;(r=o==null?void 0:o.componentProps)==null||r.forEach((a,d)=>D(a.props,e,t,`${n}.componentProps[${d}].props`,s)),(i=o==null?void 0:o.addedComponents)==null||i.forEach((a,d)=>Ne(a.component,e,t,`${n}.addedComponents[${d}].component`,s)),(c=o==null?void 0:o.addedEntities)==null||c.forEach((a,d)=>Ke(a.entity,e,t,`${n}.addedEntities[${d}].entity`,s))}function Ut(o,e){var s,r;const t=[],n=new Map;for(const i of o.entities)for(const c of i.components??[])n.set(c,i.id);for(const i of o.components){if(i.id===e)continue;const c=n.get(i.id)??"<unowned>";D(i.props,e,c,`components.${i.id}.props`,t),(s=i.calls)==null||s.forEach((a,d)=>D(a,e,c,`components.${i.id}.calls[${d}]`,t))}for(const i of o.entities)Ve((r=i.instance)==null?void 0:r.overrides,e,i.id,`entities.${i.id}.instance.overrides`,t);return t}function Jt(o,e){const t=Ut(o,e);if(t.length!==0)throw new Error(`Cannot remove component "${e}": it is referenced by $component bindings in ${t.map(n=>`entity "${n.entityId}" prop "${n.propPath}"`).join(", ")}. Remove the bindings first.`)}function Gt(o,e){switch(e.kind){case"add-source-entity":se("entity",F(o),e.sourceEntityIds);return;case"remove-source-entity":G("entity",F(o),[e.sourceEntityId]);return;case"add-source-component":se("component",B(o),[e.sourceComponentId]);return;case"remove-source-component":G("component",B(o),[e.sourceComponentId]),Jt(o,e.sourceComponentId);return;case"add-nested-instance-entity":G("entity",F(o),[e.instanceSourceEntityId]),qt(o,e.instanceSourceEntityId);return}}function Wt(o,e,t){switch(t.kind){case"add-source-entity":G("entity",F(e),t.sourceEntityIds);return;case"remove-source-entity":se("entity",F(e),[t.sourceEntityId]);return;case"add-source-component":G("component",B(e),[t.sourceComponentId]);return;case"remove-source-component":se("component",B(e),[t.sourceComponentId]);return;case"add-nested-instance-entity":{if(!ve(F(o),F(e))||!ve(B(o),B(e)))throw new Error("Prefab source edit add-nested-instance-entity must not change source entity or component ids");const n=Te(o,t.instanceSourceEntityId,t.parentSourceEntityId);if(Te(e,t.instanceSourceEntityId,t.parentSourceEntityId)!==n+1)throw new Error(`Prefab source edit expected nested added entity count under "${t.parentSourceEntityId}" to increase by 1`);return}}}function H(o){Lt(o.intent),be(o.prefabFile),Gt(o.prefabFile,o.intent);const e=o.mutation(o.prefabFile);return be(e),Wt(o.prefabFile,e,o.intent),e}function Qt(o,e){return H({prefabFile:o,intent:{kind:"add-source-entity",sourceEntityIds:e.entityIds},mutation:t=>zt(t,e)})}function Ht(o,e){return H({prefabFile:o,intent:{kind:"add-nested-instance-entity",instanceSourceEntityId:e.instanceSourceEntityId,parentSourceEntityId:e.parentSourceEntityId},mutation:t=>Bt(t,e)})}function Xt(o,e){return H({prefabFile:o,intent:{kind:"remove-source-entity",sourceEntityId:e},mutation:t=>Nt(t,e)})}function Yt(o,e){return H({prefabFile:o,intent:{kind:"add-source-component",sourceComponentId:e.sourceComponentId},mutation:t=>Kt(t,e.sourceEntityId,e.sourceComponentId,e.component)})}function Zt(o,e){return H({prefabFile:o,intent:{kind:"remove-source-component",sourceComponentId:e},mutation:t=>Vt(t,e)})}class ae{static update(e,t){!this.entity&&(this.entity=e.createChild("prefab"));const n=this.tempCloneEntity=t.instantiateEngineObject();this.entity.addChild(n)}static clear(){var e;(e=this.entity)==null||e.clearChildren(),this.tempCloneEntity&&this.tempCloneEntity.destroy(),this.tempCloneEntity=null}}C(ae,"entity"),C(ae,"tempCloneEntity");const en=Ie(({asset:o})=>{const{dependentAssets:e}=o,{configDataStore:t}=Re(),{t:n}=Ge(),s=Ie(({dependentAssetInfo:r})=>{const{assetStore:i}=Re(),c=Object.values(i.assets).filter(u=>{const l=u.getMetaConfig().type,m=u.id===r.id,h=u.id===o.id,f=!m&&!h&&!u.isSubAsset;return r.type==="glTF"||r.type==="Prefab"?l==="glTF"||l==="Prefab"&&f:u.getMetaConfig().type===r.type&&f}),a=i.assets[r.id],d=a==null?void 0:a.name;return O.jsx(We,{dropLayer:he.Asset,placeholder:n("prefab.inspector.missed"),assets:c,onSelect:u=>{o.replaceDependentAsset(r,u)},onLocate:()=>{i.selectAsset(r.id)},value:d,asset:a})});return O.jsxs(O.Fragment,{children:[O.jsx(Qe,{title:n("prefab.inspector.basic-info"),defaultOpen:!0,children:t.isBuc&&O.jsx(He,{label:n("prefab.inspector.url")})}),O.jsx(Xe,{label:n("prefab.inspector.dependent-assets"),children:e.map((r,i)=>O.jsx(s,{dependentAssetInfo:r},`${r.id}-${i}`))})]})}),tn={asset:{version:"2.0"},root:"defaultPrefab",entities:[{id:"defaultPrefab",name:"prefab"}],components:[]};class nn extends At{constructor(){super(...arguments);C(this,"_animators",[]);C(this,"_particles",[])}setViewAsset(t,n){const s=t.entityManager.rootEntities[0];this._entity=s.engineObject,n.addChild(this._entity),s.getComponentsIncludeChildren("Animator",this._animators).forEach(c=>{c.applyBoundPathChange("enabled",Ye.Toggle,c.enabled)}),this._entity.getComponentsIncludeChildren(Ze,this._particles).forEach(c=>{c.generator.stop(!1,Ee.StopEmittingAndClear),c.generator.main.simulationSpeed=1,c.generator.play()})}stopViewAsset(){super.stopViewAsset(),this._particles.forEach(t=>{t.generator.stop(!1,Ee.StopEmittingAndClear)})}}function de(o,e,t){if(Array.isArray(o))return o.map(r=>de(r,e,t));if(!o||typeof o!="object")return o;const n=o,s={};for(const[r,i]of Object.entries(n))s[r]=r==="$ref"&&i===e?t:de(i,e,t);return s}function Ae(o,e,t){return de(o,e,t)}function sn(o,e,t){const n=et(t),s=e.ref??e.id;if(typeof s!="string"||s.length===0)throw new Error(`[SceneV2] Unable to replace prefab asset ref "${e.id}": missing old source ref`);let r=Ae(o,s,n);return s!==e.id&&(r=Ae(r,e.id,n)),r}function rn(o,e){const t=e.entities.findIndex(n=>n.id===e.root);if(!e.entities[t])throw new Error(`Prefab asset "${o}" source root "${e.root}" was not found.`);return t}function k(o,e,t){const n=e.entities[t];if(!n)throw new Error(`Prefab asset "${o}" source entity at index "${t}" was not found.`);return n}function N(o,e,t){var s;const n=(s=e.entities[t])==null?void 0:s.id;if(!n)throw new Error(`Prefab asset "${o}" source entity at index "${t}" is missing a stable source id.`);return n}function on(o,e,t){var s;const n=(s=e.components[t])==null?void 0:s.id;if(!n)throw new Error(`Prefab asset "${o}" source component at index "${t}" is missing a stable source id.`);return n}function xe(o,e,t){const n=k(o,e,t);if(W(n))return[];const s=(n.children??[]).map(r=>e.entities.findIndex(i=>i.id===r));for(const r of s)if(!e.entities[r])throw new Error(`Prefab asset "${o}" source child index "${r}" on entity "${t}" was not found.`);return s}function Oe(o,e,t){const n=k(o,e,t);return W(n)?[]:(n.components??[]).map(s=>{const r=e.components.findIndex(c=>c.id===s),i=e.components[r];if(!i)throw new Error(`Prefab asset "${o}" source component "${s}" was not found.`);return{key:on(o,e,r),type:i.type,schema:i}})}function Me(o,e,t,n,s){var a,d;const r=N(o,e,t),i=n.find(u=>u.id===r&&!s.has(u.id));if(i)return i;const c=k(o,e,t);if(!W(c)&&!((d=(a=c.instance)==null?void 0:a.asset)!=null&&d.$ref))throw new Error(`Prefab source child "${r}" cannot be matched to a loaded source entity.`)}function cn(o,e,t,n){const s=r=>!t.type||r.type===t.type;if(n){const r=o.find(i=>i.key===n&&!e.has(i.key)&&s(i));if(r)return r}if(t.id){const r=o.find(i=>i.key===t.id&&!e.has(i.key)&&s(i));if(r)return r}}function an(o,e,t,n){const s=(e==null?void 0:e.components)??[],r=t==null?void 0:t.get(o.key);if(r){const c=s.find(a=>(a==null?void 0:a.id)===r&&!a.ignoreToJSON);if(c)return c}const i=s.find(c=>{var d;return!(c!=null&&c.id)||n.has(c.id)||c.ignoreToJSON||((d=c.instance)==null?void 0:d.sourceComponentKey)!==o.key?!1:!c.type||c.type===o.type});if(i)return i}function dn(o){var a,d,u,l,m,h,f,y;const e=k(o.assetId,o.prefabFile,o.sourceIndex),t=N(o.assetId,o.prefabFile,o.sourceIndex),n=(d=(a=e==null?void 0:e.instance)==null?void 0:a.asset)==null?void 0:d.$ref;if(!n||!W(e))return!1;const s=((m=(l=(u=o.normalized)==null?void 0:u.entities)==null?void 0:l[o.sceneChild.id])==null?void 0:m.instance)??o.sceneChild.instance,r=s==null?void 0:s.bindingId,i=r?(y=(f=(h=o.normalized)==null?void 0:h.prefab)==null?void 0:f.bindings)==null?void 0:y[r]:void 0,c=o.resolveInstanceAsset(n,t);return c?i?i.instanceRootEntityId===o.sceneChild.id&&i.assetId===c.id&&i.assetKind===c.kind:(s==null?void 0:s.assetId)===c.id&&(s==null?void 0:s.assetKind)===c.kind&&(!(s!=null&&s.role)||s.role==="root"):!1}function un(o){var s,r;const t=(r=(s=k(o.assetId,o.prefabFile,o.sourceIndex).instance)==null?void 0:s.asset)==null?void 0:r.$ref;if(typeof t!="string")return;const n=o.resolveInstanceAsset(t,o.sourceEntityId);if(!n)throw new Error(`Prefab source entity "${o.sourceEntityId}" references missing instance asset "${t}".`);if(n.kind!=="Prefab"&&n.kind!=="glTF")throw new Error(`Prefab source entity "${o.sourceEntityId}" references unsupported instance asset "${t}" of type "${String(n.kind)}".`);return n}function fn(o,e){var r,i,c,a;if(!(o!=null&&o.id))return;const t=((i=(r=e==null?void 0:e.entities)==null?void 0:r[o.id])==null?void 0:i.instance)??o.instance,n=t==null?void 0:t.bindingId,s=n?(a=(c=e==null?void 0:e.prefab)==null?void 0:c.bindings)==null?void 0:a[n]:void 0;return typeof(s==null?void 0:s.sourceRootEntityId)=="string"?s.sourceRootEntityId:void 0}function ie(o,e){return{x:Number((o==null?void 0:o.x)??e.x),y:Number((o==null?void 0:o.y)??e.y),z:Number((o==null?void 0:o.z)??e.z)}}function ln(o,e){const t=o==null?void 0:o.transform;return{position:t!=null&&t.position?ie(t.position,{x:0,y:0,z:0}):e.position,rotation:t!=null&&t.rotation?ie(t.rotation,{x:0,y:0,z:0}):e.rotation,scale:t!=null&&t.scale?ie(t.scale,{x:1,y:1,z:1}):e.scale}}function hn(o,e,t){const n=o==null?void 0:o.layer;return Array.isArray(n)?t?t(n):e:typeof n=="number"?n:e}function pn(o){var c,a,d,u,l,m;const e=(c=o.normalized)==null?void 0:c.components,t=(o.sceneComponentId?e==null?void 0:e[o.sceneComponentId]:void 0)??((a=o.component)!=null&&a.id?e==null?void 0:e[o.component.id]:void 0),n={},s=(t==null?void 0:t.refId)??(typeof((d=o.schema.script)==null?void 0:d.$ref)=="string"?st(o.schema.script.$ref):void 0);s&&(n.refId=s);const r=(t==null?void 0:t.scriptKey)??((u=o.schema.script)==null?void 0:u.key);r&&(n.scriptKey=r);const i=(l=t==null?void 0:t.calls)!=null&&l.length?structuredClone(t.calls):(m=o.schema.calls)!=null&&m.length?o.convertSourceRefsToDomainRefs(structuredClone(o.schema.calls)):void 0;return i!=null&&i.length&&(n.calls=i),n}function mn(o){var e,t;return o.sceneEntityIdBySource.has(o.sourceEntityId)?((t=(e=o.allowMissingSceneComponentSourceKeys)==null?void 0:e.get(o.sourceEntityId))==null?void 0:t.has(o.sourceComponentKey))===!0:!0}function yn(o){const{assetId:e,prefabFile:t,sourceRoot:n,sceneRoot:s,normalized:r}=o,i=[],c=[],a=new Map,d=new Map,u=rn(e,t),l=y=>{var I,_;const p=((_=(I=r==null?void 0:r.entities)==null?void 0:I[y.id])==null?void 0:_.instance)??y.instance;return(p==null?void 0:p.role)==="added"},m=(y,p,I,_)=>{var q,ee,te,U;if(l(I))return;const P=N(e,t,y),g=k(e,t,y),A=W(g);i.push({sceneEntityId:I.id,sourceEntityId:P,role:_}),a.set(P,I.id);const K=Oe(e,t,y),Y=I.components??[],R=new Set;for(const b of Y){if(!(b!=null&&b.id)||b.ignoreToJSON)continue;const S=((ee=(q=r==null?void 0:r.components)==null?void 0:q[b.id])==null?void 0:ee.instance)??b.instance;if((S==null?void 0:S.role)==="added")continue;const w=((te=o.sceneSourceComponentKeys)==null?void 0:te.get(b.id))??(S==null?void 0:S.sourceComponentKey),E=cn(K,R,b,w);if(!E){if(!A)throw new Error(`Prefab asset "${e}" live scene component "${b.id}" on source entity "${P}" cannot be matched to a prefab source component.`);continue}R.add(E.key),c.push({sceneEntityId:I.id,sceneComponentId:b.id,sourceComponentKey:E.key});const $=d.get(P)??new Map;$.set(E.key,b.id),d.set(P,$)}const z=xe(e,t,y),Z=(p==null?void 0:p.children)??[],x=I.children??[],V=new Set,L=new Set;for(let b=0;b<z.length;b++){const S=z[b],w=N(e,t,S),E=Me(e,t,S,Z,V);E!=null&&E.id&&V.add(E.id);const $=x.find(v=>{var me,ye,Se;if(L.has(v.id)||l(v))return!1;if(v.id===w||E!=null&&E.id&&v.id===E.id||dn({assetId:e,prefabFile:t,sourceIndex:S,sceneChild:v,normalized:r,resolveInstanceAsset:o.resolveInstanceAsset}))return!0;const re=((ye=(me=r==null?void 0:r.entities)==null?void 0:me[v.id])==null?void 0:ye.instance)??v.instance,pe=((Se=o.sceneSourceEntityIds)==null?void 0:Se.get(v.id))??(re==null?void 0:re.sourceEntityId)??v.instanceSourceEntityId;return pe===w||(E==null?void 0:E.id)&&pe===E.id});if(!$){if((U=o.allowMissingSceneChildSourceIds)!=null&&U.has(w))continue;throw new Error(`Prefab asset "${e}" source child "${w}" cannot be matched to live scene child under source entity "${P}".`)}L.add($.id),m(S,E,$,"linked")}},h={},f=(y,p,I,_)=>{const P=k(e,t,y),g=N(e,t,y),A={},K=Oe(e,t,y),Y=new Set;K.forEach(b=>{var $;const S=an(b,p,d.get(g),Y);if(S!=null&&S.ignoreToJSON)return;S!=null&&S.id&&Y.add(S.id);const w=typeof(S==null?void 0:S.toJSON)=="function"?S.toJSON():b.schema,E=($=d.get(g))==null?void 0:$.get(b.key);if(!E&&!mn({sourceEntityId:g,sourceComponentKey:b.key,sceneEntityIdBySource:a,allowMissingSceneComponentSourceKeys:o.allowMissingSceneComponentSourceKeys}))throw new Error(`Prefab asset "${e}" source component "${b.key}" on source entity "${g}" cannot be matched to live scene component.`);A[b.key]={sceneComponentId:E,type:w.type??(S==null?void 0:S.type),...pn({component:S,schema:w,sceneComponentId:E,normalized:r,convertSourceRefsToDomainRefs:o.convertSourceRefsToDomainRefs}),props:o.collectComponentProps(S,w)}});const R=un({assetId:e,prefabFile:t,sourceIndex:y,sourceEntityId:g,resolveInstanceAsset:o.resolveInstanceAsset}),z=R==null?void 0:R.kind,Z=tt({sourceEntity:P,fallbackSourceEntityId:g,instanceAssetKind:z,bindingSourceRootEntityId:fn(p,r)??(R==null?void 0:R.sourceRootEntityId)}),x=nt(P,g,{...typeof Z=="string"?{rootOverrideTarget:Z}:{}}),V=hn(p,x.layer,o.combineLayers),L=(p==null?void 0:p.isLocked)??x.isLocked,q=xe(e,t,y),ee=q.map(b=>N(e,t,b));h[g]={sceneEntityId:a.get(g),parentSourceEntityId:I,childSourceEntityIds:ee,childIndex:_,...z?{instanceAssetKind:z}:{},name:(p==null?void 0:p.name)??x.name,isActive:(p==null?void 0:p.isActive)??x.isActive,...V!==void 0?{layer:V}:{},...L!==void 0?{isLocked:L}:{},transform:ln(p,x.transform),components:A};const te=(p==null?void 0:p.children)??[],U=new Set;q.forEach((b,S)=>{const w=Me(e,t,b,te,U);w!=null&&w.id&&U.add(w.id),f(b,w,g,S)})};return m(u,n,s,"root"),f(u,n,null,0),{entityMappings:i,componentMappings:c,sourceEntitySnapshots:h}}class Sn{constructor(e){this.host=e}async apply(e,t){const n=this.host.readSourceFile(),s=e(n);try{if(this.host.writeSourceFile(s),this.host.syncDependentAssets(),this.host.updateCreateByAddResumeSnapshot(),(t==null?void 0:t.refresh)===!1)return;await this.host.refreshContent((t==null?void 0:t.structuralDeltaMode)==="domain-source-replace"?{structuralDeltaMode:"domain-source-replace"}:void 0)}catch(r){throw this.host.writeSourceFile(n),this.host.syncDependentAssets(),this.host.updateCreateByAddResumeSnapshot(),r}}}var bn=Object.defineProperty,In=Object.getOwnPropertyDescriptor,X=(o,e,t,n)=>{for(var s=n>1?void 0:n?In(e,t):e,r=o.length-1,i;r>=0;r--)(i=o[r])&&(s=(n?i(e,t,s):i(s))||s);return n&&s&&bn(e,t,s),s};const M=Rt("PrefabAsset"),Fe=new $t("PrefabAsset"),ue=[0,0,0],fe=[0,0,0],le=[1,1,1];function De(o){const e=new Map;for(const[t,n]of o)e.set(n,t);return e}function ce(o,e,t){const n=o??e;return[(t==null?void 0:t.x)??n[0],(t==null?void 0:t.y)??n[1],(t==null?void 0:t.z)??n[2]]}function En(o,e){e&&Object.assign(o,{...e.position?{position:ce(o.position,ue,e.position)}:{},...e.rotation?{rotation:ce(o.rotation,fe,e.rotation)}:{},...e.scale?{scale:ce(o.scale,le,e.scale)}:{}})}let j=class extends Tt{constructor(e){super(e);C(this,"acceptDragLayer",he.Entity);C(this,"_entityManager");C(this,"_contentQueue",new vt);C(this,"prefabFile",null);C(this,"dependentAssets",[]);C(this,"_skipInitUpdateContent",!1);this._entityManager=new ct(e)}static async createByEntity(e){var t,n,s;if(e.isPrefabSubEntity||e.isGLTFSubEntity){rt.error(J("prefab.error.create-from-sub"));return}ge()&&ot();try{Fe.info("createByEntity START",{entityName:e.name,entityId:e.id,isGLTFWrap:e.isGLTFWrapEntity,childCount:(t=e.children)==null?void 0:t.length,childNames:(n=e.children)==null?void 0:n.map(i=>i.name),hasGLTFChild:(s=e.children)==null?void 0:s.some(i=>i.isGLTFRefEntity)});const{assetFacade:r}=e.root;await e.root.runInUndoGroup("asset.create",async()=>{const i=await r.createAssetByAdd({assetType:"Prefab",name:e.name});await i.updateByEntity(e,!1,{undoable:!0,replaceInstances:!1}),i.addInstance(e,{undoable:!0}),i._bindInstantiatedEntity(e,{undoable:!0})})}finally{ge()&&it()}}get entityManager(){return this._entityManager}get entities(){var e;return((e=this.prefabFile)==null?void 0:e.entities)??[]}async initByMain(e,t){const{dependentAssets:n}=this.meta;if(this.url=t,this.prefabFile=at(await e.text()),this.dependentAssets=n,this._skipInitUpdateContent){this._skipInitUpdateContent=!1;return}await this._updateContent()}async initByCreation(){return this.prefabFile=tn,this._skipInitUpdateContent=!0,this.getMainData()}getMainData(){return dt(this._requirePrefabSourceFile("serializing prefab main data"))}async updateByEntity(e,t=!1,n){Fe.info("updateByEntity START",{entityName:e.name,entityId:e.id,isGLTFWrap:e.isGLTFWrapEntity,updateInstanceFrom:t});const s=this._serializeRootEntityTreeForSource(e),r=s.entities;if(r[0]){delete r[0].position;const i=r[0].instance?this._resolveNestedInstanceRootOverrideTarget(e):void 0;ut(r[0],i)}this.prefabFile={asset:{version:"2.0"},root:s.entityIds[0],entities:r,components:s.components},this._syncDependentAssetsFromPrefabFile(),this._updateCreateByAddResumeSnapshot(),t&&this.addInstance(e),await this._updateContent({...n!=null&&n.undoable?{undoable:!0}:{},...(n==null?void 0:n.replaceInstances)===!1?{replaceInstances:!1}:{}})}async refreshFromData(e){await this._updateContent(e)}async _editPrefabSource(e,t){await new Sn({readSourceFile:()=>this.prefabFile,writeSourceFile:n=>{this.prefabFile=n},syncDependentAssets:()=>this._syncDependentAssetsFromPrefabFile(),updateCreateByAddResumeSnapshot:()=>this._updateCreateByAddResumeSnapshot(),refreshContent:n=>this._updateContent(n)}).apply(e,t)}async applyEntityPropsOverride(e,t,n){await this._editPrefabSource(s=>kt(s,e,t),n)}async applyComponentPropsOverride(e,t,n){const s=t?this._componentPropsOverrideToSourcePatch(e,t):void 0;await this._editPrefabSource(r=>jt(r,e,s),n)}async applyAddedEntityOverride(e,t,n,s){const r=this._serializeEntityTreeForSource(n),i=this._resolveSourceChildInsertionIndex(e,t,n);await this._editPrefabSource(c=>Qt(c,{parentSourceEntityId:e,index:i,entities:r.entities,entityIds:r.entityIds,components:r.components,componentIds:r.componentIds}),{...s,structuralDeltaMode:"domain-source-replace"})}async applyNestedInstanceAddedEntityOverride(e,t,n,s,r){const i=this._serializeEntityInlineForSource(s);await this._editPrefabSource(c=>Ht(c,{instanceSourceEntityId:e,parentSourceEntityId:t,index:n,entity:i}),{...r,structuralDeltaMode:"domain-source-replace"})}async applyRemovedEntityOverride(e,t){await this._editPrefabSource(n=>Xt(n,e),{...t,structuralDeltaMode:"domain-source-replace"})}async applyAddedComponentOverride(e,t,n,s){await this._editPrefabSource(r=>Yt(r,{sourceEntityId:e,sourceComponentId:t,component:this._componentSchemaToSourceRefs(n)}),{...s,structuralDeltaMode:"domain-source-replace"})}async applyRemovedComponentOverride(e,t){await this._editPrefabSource(n=>Zt(n,e),{...t,structuralDeltaMode:"domain-source-replace"})}replaceDependentAsset(e,t){this.prefabFile=sn(this.prefabFile,e,t.id),e.id=t.id,e.name=t.name,e.type=t.getMetaConfig().type,e.ref=this._createSourceRefCodec().domainToSource(t.id,"replace prefab asset"),this._updateContent()}_createSourceSerializeContext(e=[]){var n,s;const t=(s=(n=this.root.domainStore)==null?void 0:n.getNormalizedState)==null?void 0:s.call(n);return new ft(e,r=>{var c;const i=(c=t==null?void 0:t.components)==null?void 0:c[r];if(i)return{refId:i.refId,scriptKey:i.scriptKey,calls:i.calls}})}_createSourceRefCodec(){const e=this.root.assetStore;return lt({resolveAssetKind:t=>{var s,r,i,c;const n=(c=(i=(r=(s=e.assets)==null?void 0:s[t])==null?void 0:r.getMetaConfig)==null?void 0:i.call(r))==null?void 0:c.type;return n==="Prefab"||n==="glTF"?n:void 0}})}_convertDomainRefsToSourceRefs(e){return this._createSourceSerializeContext().convertRefs(e)}_convertSourceRefsToDomainRefs(e){return ht(e)}_componentSchemaToSourceRefs(e){var s,r;const t=this._createSourceSerializeContext(),n=structuredClone(e);return(s=n.script)!=null&&s.$ref&&(n.script={$ref:this._componentScriptRefToSourceRef(n.script.$ref),...n.script.key?{key:n.script.key}:{}}),n.props&&(n.props=t.convertRefs(n.props)),(r=n.calls)!=null&&r.length&&(n.calls=t.convertRefs(n.calls)),n}_componentScriptRefToSourceRef(e){return this._createSourceRefCodec().domainToSource(e,"prefab script")}_findSourceComponentModel(e){var n,s;const t=[...((n=this._entityManager)==null?void 0:n.rootEntities)??[]];for(;t.length>0;){const r=t.pop(),i=(s=r==null?void 0:r.components)==null?void 0:s.find(c=>(c==null?void 0:c.id)===e);if(i)return i;t.push(...(r==null?void 0:r.children)??[])}}_componentPropsOverrideToSourcePatch(e,t){const n=this._findSourceComponentModel(e);if(!n||typeof n.toJSON!="function")return this._convertDomainRefsToSourceRefs(t);const s=c=>this._componentSchemaToSourceRefs(c.toJSON()),r=pt(n,s),i=mt(n,t,s);return yt(r,i)}_serializeEntityTreeForSource(e,t={}){const n=t.materializeRootPrefabInstance?null:this._serializeNestedInstanceRootEntityForSource(e);if(n)return{entities:[n],entityIds:[e.id],components:[],componentIds:[]};const s=this._collectEntitySubtree(e,{materializeRootPrefabInstance:t.materializeRootPrefabInstance}),r=s.map(c=>c.id),i=this._createSourceSerializeContext(r);return{entities:s.map((c,a)=>a===0&&t.materializeRootPrefabInstance?c.toV2(i,!0):this._serializeNestedInstanceRootEntityForSource(c)??c.toV2(i,!0)),entityIds:i.entityIds,components:i.components,componentIds:i.componentIds}}_serializeRootEntityTreeForSource(e){const t=this._serializeNestedInstanceRootInlineForSource(e);return t?{entities:[t],entityIds:[e.id],components:[],componentIds:[]}:this._serializeEntityTreeForSource(e)}_sourceEntityTreeToInlineEntity(e,t=0){const n=e.entities[t];if(!n)throw new Error(`Prefab source added entity tree is missing entity index ${t}`);const{children:s,components:r,...i}=n,c=structuredClone(i),a=new Map(e.components.map(u=>[u.id,u]));r!=null&&r.length&&(c.components=r.map(u=>{const l=a.get(u);if(!l)throw new Error(`Prefab source added entity tree is missing component "${String(u)}"`);return structuredClone(l)}));const d=new Map(e.entities.map((u,l)=>[u.id,l]));return s!=null&&s.length&&(c.children=s.map(u=>{const l=d.get(u);if(l===void 0)throw new Error(`Prefab source added entity tree is missing child "${String(u)}"`);return this._sourceEntityTreeToInlineEntity(e,l)})),c}_serializeEntityInlineForSource(e){const t=this._serializeNestedInstanceRootInlineForSource(e);return t||this._sourceEntityTreeToInlineEntity(this._serializeEntityTreeForSource(e))}_serializeNestedInstanceRootEntityForSource(e){const t=this._resolveNestedInstanceAssetRef(e);if(!t)return null;const n=this._serializeNestedInstanceRootFromEntityModel(e,t);if(n)return n;const s={id:e.id,instance:{asset:t}};return this._mergeEntitySourcePropsIntoInstanceOverrides(s,e),s}_serializeNestedInstanceRootInlineForSource(e){const t=this._serializeNestedInstanceRootEntityForSource(e);if(!t)return null;const{children:n,components:s,...r}=t;return r}_serializeNestedInstanceRootFromEntityModel(e,t){if(typeof e.toV2!="function")return null;const n=this._createSourceSerializeContext([e.id]),s=e.toV2(n,!1);if(!s.instance)return null;const{children:r,components:i,...c}=structuredClone(s);return c.instance={...c.instance,asset:{...c.instance.asset??{},$ref:t.$ref}},this._mergeEntitySourcePropsIntoInstanceOverrides(c,e),c}_mergeEntitySourcePropsIntoInstanceOverrides(e,t){if(!e.instance)return;const n={};if(this._writeEntitySourceProps(n,t),Object.keys(n).length===0)return;const s=e.instance.overrides??{},r=[...s.entityProps??[]],i=this._resolveNestedInstanceRootOverrideTarget(t),c=r.findIndex(a=>a.target===i);if(c>=0){const a=r[c];r[c]={...n,...a,target:i}}else r.unshift({target:i,...n});e.instance.overrides={...s,entityProps:r}}_resolveNestedInstanceRootOverrideTarget(e){var s,r;const t=this._findInstanceRootBinding(e.id);if(t!=null&&t.sourceRootEntityId)return t.sourceRootEntityId;if(((t==null?void 0:t.assetKind)??((r=(s=this._resolveNestedInstanceAsset(e))==null?void 0:s.getMetaConfig)==null?void 0:r.call(s).type))==="glTF")return"root";throw new Error(`Cannot serialize nested instance "${e.id}": missing source root entity id for instance overrides.`)}_resolveNestedInstanceAssetRef(e){var r;if(!this._isNestedInstanceRootForSource(e))return null;const t=this._resolveNestedInstanceAsset(e);if(!t)throw new Error(`Cannot serialize nested instance "${e.id}": source asset is not registered.`);const n=(r=t.getMetaConfig)==null?void 0:r.call(t).type;if(n!=="Prefab"&&n!=="glTF")throw new Error(`Cannot serialize nested instance "${e.id}": asset "${t.id}" is type "${n}".`);return{$ref:this._createSourceRefCodec().domainToSource(t.id,`nested instance "${e.id}"`)}}_isNestedInstanceRootForSource(e){var n;const t=this._findInstanceRootBinding(e.id);return(t==null?void 0:t.assetKind)==="Prefab"||(t==null?void 0:t.assetKind)==="glTF"?!0:!!(e.isGLTFRefEntity&&!((n=e.parentEntity)!=null&&n.isGLTFRefEntity))}_findInstanceRootBinding(e){var t,n,s;return Object.values(((s=(n=(t=this.root.domainStore)==null?void 0:t.state)==null?void 0:n.prefab)==null?void 0:s.bindings)??{}).find(r=>r.instanceRootEntityId===e)}_resolveNestedInstanceAsset(e){var s,r;const t=this._findInstanceRootBinding(e.id);if((t==null?void 0:t.assetKind)==="Prefab"||(t==null?void 0:t.assetKind)==="glTF")return(s=this.root.assetStore.assets)==null?void 0:s[t.assetId];const n=(r=e.engineObject)==null?void 0:r._templateResource;if(n)return this.root.assetStore.engineObjectToAssetMap.get(n)}_writeEntitySourceProps(e,t){t.name&&(e.name=t.name),t.isActive===!1&&(e.isActive=!1),t.isLocked&&(e.isLocked=!0);const n=t.layer,s=Array.isArray(n)?we(n):typeof n=="number"?n:0;s!==0&&(e.layer=s),this._writeEntityTransformTuples(e,t)}_writeEntityTransformTuples(e,t){const n=t.transform;if(!n)return;const s=(d,u)=>[Number((d==null?void 0:d.x)??u[0]),Number((d==null?void 0:d.y)??u[1]),Number((d==null?void 0:d.z)??u[2])],r=(d,u)=>d[0]===u[0]&&d[1]===u[1]&&d[2]===u[2],i=s(n.position,ue);r(i,ue)||(e.position=i);const c=s(n.rotation,fe);r(c,fe)||(e.rotation=c);const a=s(n.scale,le);r(a,le)||(e.scale=a)}destroy(){super.destroy(),this.engineObject&&(this.engineObject._root.destroy(),this.engineObject.destroy())}unpackAllInstances(){var n;const e=this.root.sceneStore,t=this._queryInstanceEntityIdsFromDomain();for(const s of t){const r=(n=e.getEntityModel)==null?void 0:n.call(e,s);r==null||r.unpackPrefab()}super.unpackAllInstances()}async instantiate(e,t,n){var m;const s=structuredClone(this.prefabFile),r=St(s);if(typeof s.root!="string")throw new Error(`Prefab asset "${this.id}" source root must be a stable source entity id.`);const i=r.entityIndexById.get(s.root);if(i===void 0)throw new Error(`Prefab asset "${this.id}" source root "${s.root}" was not indexed.`);const c=s.entities[i];c&&En(c,t);const a=this._assignSceneInstanceIds(s,i,n==null?void 0:n.expectedRootId),d=await e.hydrateSourceV2LocalEntities(s,{resolveAssetKind:h=>{var y,p,I,_;const f=(_=(I=(p=(y=this.root.assetStore.assets)==null?void 0:y[h])==null?void 0:p.getMetaConfig)==null?void 0:I.call(p))==null?void 0:_.type;return f==="Prefab"||f==="glTF"?f:void 0},resolvePrefabSourceFile:h=>{var y,p,I,_;const f=(p=(y=this.root.assetStore).getAsset)==null?void 0:p.call(y,h);return((_=(I=f==null?void 0:f.getMetaConfig)==null?void 0:I.call(f))==null?void 0:_.type)==="Prefab"?f.prefabFile:void 0},clearExisting:!1,registerDomain:(n==null?void 0:n.deferDomainBinding)!==!0,deferredInstanceBindings:(n==null?void 0:n.deferredInstanceBindings)??[]}),u=(m=s.entities[i])==null?void 0:m.id,l=(u?e.entities.get(u):void 0)??d[0];if(await this._ensureSourceEntityManagerReady(),l.convertToPrefabRefEntity(),(n==null?void 0:n.deferDomainBinding)!==!0&&e.isDomainScoped&&!this.root.domainStore.state.entities[l.id]&&e.registerEntityTreeInDomain(l,null),this.addInstance(l,n),n!=null&&n.deferDomainBinding){if(!n.deferredInstanceBindings)throw new Error(`PrefabAsset "${this.id}" cannot defer domain binding without a deferred binding queue.`);return n.deferredInstanceBindings.push(()=>this._bindInstantiatedEntity(l,{...n,...a})),l}return this._bindInstantiatedEntity(l,{...n,...a}),l}_assignSceneInstanceIds(e,t,n){const s=new Map;e.entities.forEach((i,c)=>{s.set(i.id,n&&c===t?n:_e())});const r=new Map;return e.components.forEach(i=>{r.set(i.id,_e())}),this._remapLocalHydrationIds(e,s,r),{sourceEntityIdBySceneId:De(s),sourceComponentKeyBySceneComponentId:De(r)}}_remapLocalHydrationIds(e,t,n){const s=r=>{if(Array.isArray(r))return r.map(a=>s(a));if(!r||typeof r!="object")return r;const i=r;if(typeof i.$entity=="string")return{$entity:t.get(i.$entity)??i.$entity};if(typeof i.$component=="string")return{$component:n.get(i.$component)??i.$component};const c={};for(const[a,d]of Object.entries(i))c[a]=s(d);return c};e.root=t.get(e.root)??e.root,e.entities=e.entities.map(r=>{var a,d;const i=r.id,c=structuredClone(r);return c.id=t.get(i)??i,(a=c.children)!=null&&a.length&&(c.children=c.children.map(u=>t.get(u)??u)),(d=c.components)!=null&&d.length&&(c.components=c.components.map(u=>n.get(u)??u)),c}),e.components=e.components.map(r=>{var c;const i=structuredClone(r);return i.id=n.get(r.id)??r.id,i.props&&(i.props=s(i.props)),(c=i.calls)!=null&&c.length&&(i.calls=s(i.calls)),i})}async _ensureSourceEntityManagerReady(){if(!this._entityManager.rootEntities[0]&&(await this._entityManager.init(this),!this._entityManager.rootEntities[0]))throw new Error(`PrefabAsset "${this.id}" has no source root entity after source initialization.`)}_updateCreateByAddResumeSnapshot(){const e=this.getMainData(),t=this.getMetaData(),n=this.name??"Prefab";if(typeof e!="string"||e.length===0)throw new Error(`[PrefabAsset] ${n} (${this.id}) cannot update create-by-add resume snapshot without serialized main data.`);const s=new Blob([e],{type:"application/json"});this.root.assetStore.updateCreateByAddResumeSnapshot(this.id,{assetName:n,serializedMeta:JSON.stringify(t),mainBlob:s})}_bindInstantiatedEntity(e,t){if(e.entityManager&&!e.entityManager.isDomainScoped)return;const n=this._entityManager.rootEntities[0];if(!n)return;const{prefab:s}=this.root.domainStore.state,r=s.byAssetId[this.id]??[],i=r.map(h=>s.bindings[h]).find(h=>(h==null?void 0:h.instanceRootEntityId)===e.id||(t==null?void 0:t.expectedBindingId)===(h==null?void 0:h.id)),c=i?new Set(Object.keys(i.overrides.removedEntities??{})):void 0,a=i?new Map(Object.entries(i.overrides.removedComponents??{}).map(([h,f])=>[h,new Set(Object.keys(f??{}))])):void 0,{entityMappings:d,componentMappings:u,sourceEntitySnapshots:l}=this._collectInstanceMappings(n,e,c!=null&&c.size||a!=null&&a.size?{...t,...c!=null&&c.size?{allowMissingSceneChildSourceIds:c}:{},...a!=null&&a.size?{allowMissingSceneComponentSourceKeys:a}:{}}:t);if(!d.length)return;for(const h of r){const f=s.bindings[h];if((f==null?void 0:f.instanceRootEntityId)===e.id||(t==null?void 0:t.expectedBindingId)===h){t!=null&&t.syncPreservedInstanceState&&this._syncPreservedInstanceStateFromSource(f,l),this.root.prefabFacade.updateBindingSourceBaseline({assetId:this.id,bindingId:h,instanceRootEntityId:e.id,sourceRevision:f.sourceRevision,entityMappings:d,componentMappings:u,sourceEntitySnapshots:l});return}}let m=1;for(const h of r){const f=s.bindings[h];f&&f.sourceRevision>m&&(m=f.sourceRevision)}this.root.prefabFacade.bindExistingInstance({assetId:this.id,instanceRootEntityId:e.id,sourceRevision:m,entityMappings:d,componentMappings:u,sourceEntitySnapshots:l,undoable:(t==null?void 0:t.undoable)===!0})}_syncPreservedInstanceStateFromSource(e,t){const n=this.root.domainStore.getNormalizedState(),s=[];for(const[r,i]of Object.entries(t)){const c=i.sceneEntityId??e.sourceToSceneEntity[r];if(!c)continue;const a=n.entities[c];if(!a)continue;const d=`/entities/${ne(c)}`,u=e.overrides.entityProps[r];(u==null?void 0:u.name)===void 0&&i.name!==void 0&&a.name!==i.name&&s.push({op:"replace",path:`${d}/name`,value:i.name}),(u==null?void 0:u.isActive)===void 0&&i.isActive!==void 0&&a.isActive!==i.isActive&&s.push({op:"replace",path:`${d}/isActive`,value:i.isActive}),(u==null?void 0:u.layer)===void 0&&(i.layer===void 0?a.layer!==void 0&&s.push({op:"remove",path:`${d}/layer`}):a.layer!==i.layer&&s.push({op:a.layer===void 0?"add":"replace",path:`${d}/layer`,value:i.layer}));const l=u==null?void 0:u.transform;for(const h of["position","rotation","scale"]){if((l==null?void 0:l[h])!==void 0)continue;const f=i.transform[h];Pe(a.transform[h],f)||s.push({op:"replace",path:`${d}/transform/${h}`,value:f})}const m=e.overrides.componentProps[r]??{};for(const[h,f]of Object.entries(i.components)){const y=f.sceneComponentId;if(!y)continue;const p=n.components[y];if(!p)continue;const I=`${d}/components/${ne(y)}`,_=m[h]??{},P=f.props??{};for(const[g,A]of Object.entries(P)){if(Object.prototype.hasOwnProperty.call(_,g))continue;const K=`${I}/props/${ne(g)}`;Pe(p.props[g],A)||s.push({op:Object.prototype.hasOwnProperty.call(p.props,g)?"replace":"add",path:K,value:A})}for(const g of Object.keys(p.props))Object.prototype.hasOwnProperty.call(P,g)||Object.prototype.hasOwnProperty.call(_,g)||s.push({op:"remove",path:`${I}/props/${ne(g)}`})}}this.root.domainStore.applySystem(s)}_collectInstanceMappings(e,t,n){var s,r,i;return yn({assetId:this.id,prefabFile:this._requirePrefabSourceFile(),sourceRoot:e,sceneRoot:t,normalized:(i=(r=(s=this.root)==null?void 0:s.domainStore)==null?void 0:r.getNormalizedState)==null?void 0:i.call(r),sceneSourceEntityIds:n==null?void 0:n.sourceEntityIdBySceneId,sceneSourceComponentKeys:n==null?void 0:n.sourceComponentKeyBySceneComponentId,allowMissingSceneChildSourceIds:n==null?void 0:n.allowMissingSceneChildSourceIds,allowMissingSceneComponentSourceKeys:n==null?void 0:n.allowMissingSceneComponentSourceKeys,resolveInstanceAsset:(c,a)=>{var m,h,f;const d=(m=this.root.assetStore.assets)==null?void 0:m[c];if(!d)throw new Error(`Prefab source entity "${a}" references missing instance asset "${c}".`);const u=(f=(h=d.getMetaConfig)==null?void 0:h.call(d))==null?void 0:f.type;if(u!=="Prefab"&&u!=="glTF")throw new Error(`Prefab source entity "${a}" references unsupported instance asset "${c}" of type "${String(u)}".`);const l=d.prefabFile;return{id:d.id,kind:u,...u==="Prefab"&&typeof(l==null?void 0:l.root)=="string"?{sourceRootEntityId:l.root}:{}}},convertSourceRefsToDomainRefs:c=>this._convertSourceRefsToDomainRefs(c),collectComponentProps:(c,a)=>this._collectSnapshotComponentProps(c,a),combineLayers:c=>we(c)})}_requirePrefabSourceFile(e="using prefab source file"){const t=this.prefabFile;if(!t)throw new Error(`Prefab asset "${this.id}" has no source file while ${e}.`);if(!Array.isArray(t.entities))throw new Error(`Prefab asset "${this.id}" source file is missing entity anchors.`);return t}_resolveSourceChildInsertionIndex(e,t,n){var l,m,h;const s=this._requirePrefabSourceFile(),r=s.entities.findIndex(f=>f.id===e);if(r<0)return t;const i=new Set(((l=s.entities[r])==null?void 0:l.children)??[]);if(i.size===0)return 0;const c=((m=n.parentEntity)==null?void 0:m.children)??[],a=c.findIndex(f=>f.id===n.id),d=a>=0?a:Math.min(Math.max(t,0),c.length);let u=0;for(let f=0;f<d;f+=1){const y=(h=c[f])==null?void 0:h.instanceSourceEntityId;y&&i.has(y)&&(u+=1)}return Math.min(Math.max(u,0),i.size)}_collectSnapshotComponentProps(e,t){return e&&Reflect.ownKeys(bt(e)).length>0?this._convertSourceRefsToDomainRefs(It(e)):this._convertSourceRefsToDomainRefs(structuredClone(t.props??{}))}async replaceInstance(e,t,n){var h,f,y,p;const s=t.entities.get(e);if(!s)return null;const r=(h=s==null?void 0:s.engineObject)==null?void 0:h.transform,i=r?{position:{x:r.position.x,y:r.position.y,z:r.position.z},rotation:{x:r.rotation.x,y:r.rotation.y,z:r.rotation.z},scale:{x:r.scale.x,y:r.scale.y,z:r.scale.z}}:void 0,c=(y=(f=s.root.domainStore.getNormalizedState().entities[e])==null?void 0:f.instance)==null?void 0:y.bindingId,a=[],d=await this.instantiate(t,n!=null&&n.resetRootTransform?void 0:i,{...n!=null&&n.undoable?{undoable:!0}:{},expectedBindingId:c,deferDomainBinding:!0,deferredInstanceBindings:a});d.convertToPrefabRefEntity();const u=((p=t.root)==null?void 0:p.domainStore)??s.root.domainStore,l=t.entities.get(e),m=u.getNormalizedState().entities[e];return!l||!(m!=null&&m.instance)?(d.destroy(),null):(t.isDomainScoped&&!u.state.entities[d.id]&&t.registerEntityTreeInDomain(d,null,void 0,{...i&&!(n!=null&&n.resetRootTransform)?{transform:i}:{},deferInstanceBinding:!0}),a.splice(0).forEach(I=>I()),n!=null&&n.structuralDeltaMode?t.replaceEntity(e,d,{structuralDeltaMode:n.structuralDeltaMode}):t.replaceEntity(e,d),d)}_refreshTrackedInstanceBindings(e){var s;const t=this.root.sceneStore,n=this._queryInstanceEntityIdsFromDomain();for(const r of n){const i=(s=t.getEntityModel)==null?void 0:s.call(t,r);i&&this._bindInstantiatedEntity(i,e)}}_instantiateEngineObject(){return this.engineObject.instantiate()}_onDrop(e,t){if(!t||t.id===this.id)return;this.dropping=!1;const{sceneStore:n,sceneUIStore:s}=this.root,r=Array.from(s.selectedKeys);if(r.length>1)for(let i=0;i<r.length;i++)j.createByEntity(n.getEntityModel(r[i]));else Et({title:J("prefab.replace.title").toString(),description:J("prefab.replace.description",{name:this.name}).toString(),confirmText:J("prefab.replace.confirm").toString(),onConfirm:()=>{const i=n.getEntityModel(r[0]);this.updateByEntity(i,!0)}})}_rebaseInstanceRevisions(){const{prefabFacade:e,domainStore:t}=this.root,n=t.state.prefab.byAssetId[this.id];if(!n||n.length===0)return;let s=0;for(const r of n){const i=t.state.prefab.bindings[r];i&&i.sourceRevision>s&&(s=i.sourceRevision)}e.updatePrefabContent(this.id,s+1)}_collectEntitySubtree(e,t={}){const n=[],s=(r,i=!1)=>{if(n.push(r),!(this._isNestedInstanceRootForSource(r)&&!(i&&t.materializeRootPrefabInstance)))for(const a of r.children)a.prefabEntityRemoved||s(a)};return s(e,!0),n}_collectDependentAssetsFromPrefabFile(){var n;const e=new Set,t=this.root.assetStore;for(const s of xt(this.prefabFile,["$ref"])){if(typeof s!="string"||s===this.id)continue;const r=(n=t.assets)==null?void 0:n[s];if(!r)throw new Error(`[SceneV2] Unable to resolve prefab asset ref "${s}" while collecting dependencies`);r.id!==this.id&&e.add(r)}return e}_syncDependentAssetsFromPrefabFile(){this.root.assetStore,this.dependentAssets=Array.from(this._collectDependentAssetsFromPrefabFile(),e=>({id:e.id,name:e.name,type:e.getMetaConfig().type,ref:e.id}))}_updateContent(e){return this._contentQueue.enqueue(async()=>{try{await this._updateContentInternal(e)}catch(t){if(t instanceof Error&&t.message==="cancelled")return;throw M.error("_updateContent failed:",t),t}})}async _updateContentInternal(e){const{url:t,dependentAssets:n}=this,s=(e==null?void 0:e.persist)!==!1;await Promise.all(n.map(a=>this.root.assetStore.getAssetByRef({refId:a.id}))),await this._entityManager.init(this);const r=this.engineObject;if(r){this.root.assetStore.engineObjectToAssetMap.delete(r);try{r.destroy()}catch(a){M.warn("failed to destroy oldEngineObject:",a)}}const i=new gt(this.engine,t);this.bindEngineObject(i),this.root.assetStore.engineObjectToAssetMap.set(i,this);let c=this._entityManager.rootEntities[0];if(c||(c=this._entityManager.createEntity("prefab","defaultPrefab"),c.bindEngineObject(new Ce(this.engine,"prefab")),M.error(`The prefab which id is ${this.id} is broken, use default prefab instead.`)),c.engineObject||(M.warn("rootEntity engineObject is null, binding new Entity"),c.bindEngineObject(new Ce(this.engine,"prefab"))),this._markAsTemplate(c),i._root=c.engineObject,c.once("delete",()=>{M.error(`The prefab which id is ${this.id} is broken.`),this._updateContent().catch(a=>{M.error(`Failed to rebuild broken prefab which id is ${this.id}.`,a)})}),this._updateDragTempEntity(),this.updateThumbnail(),s&&(this.root.assetFacade.persistAssetMeta(this.id),this.root.assetFacade.persistAssetMain(this.id)),(e==null?void 0:e.replaceInstances)!==!1){const a=new Set((e==null?void 0:e.resetRootTransformBindingIds)??[]),d=e!=null&&e.undoable?{undoable:!0}:void 0,u=this.root.sceneStore,l=this._queryInstanceEntityIdsFromDomain();await Promise.all(l.map(m=>{var f,y;const h=(y=(f=this.root.domainStore.getNormalizedState().entities[m])==null?void 0:f.instance)==null?void 0:y.bindingId;return this.replaceInstance(m,u,{...d??{},resetRootTransform:h!==void 0&&a.has(h),...e!=null&&e.structuralDeltaMode?{structuralDeltaMode:e.structuralDeltaMode}:{}})}))}else{const a={...e!=null&&e.undoable?{undoable:!0}:{},syncPreservedInstanceState:!0};this._refreshTrackedInstanceBindings(a)}this._rebaseInstanceRevisions()}_markAsTemplate(e){const t=e.engineObject;if(!t){M.warn("_markAsTemplate: engineObject is null",{prefabId:this.id,entityModelId:e.id});return}const n=t;n._templateResource||n._markAsTemplate(this.engineObject),e.selfChildren.forEach(s=>{this._markAsTemplate(s)})}};X([wt()],j.prototype,"prefabFile",2);X([_t(),Pt],j.prototype,"dependentAssets",2);X([ke],j.prototype,"replaceDependentAsset",1);X([ke],j.prototype,"_onDrop",1);j=X([Ct({type:"Prefab",label:J("asset.prefab.title"),extname:"prefab",dragLayer:he.Prefab,customInspector:en,viewer:nn,thumbnail:ae,async bundle(o){return{content:new Blob([o.content],{type:"application/json"})}}})],j);export{j as PrefabAsset};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var l=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var o=(t,e,s)=>(l(t,typeof e!="symbol"?e+"":e,s),s);import{j as m,u as h,aW as u,aX as d,aY as f,aZ as y,n as D,e as S,o as v}from"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./postmen-3b48c572.js";function b(t){const e={asset:{version:"2.0",generator:"Galacean Editor"},scene:{rootEntities:["1000000","1000001"],background:{mode:0,color:{r:.0157,g:.0157,b:.0157,a:1}},ambient:{},shadow:{},fog:{}},entities:[{id:"1000000",name:"Camera",position:[0,0,10],components:["1000100"]},{id:"1000001",name:"DirectLight",position:[0,3,0],rotation:[-45,-45,0],components:["1000101"]}],components:[{id:"1000100",type:"Camera",props:{isOrthographic:!1,nearClipPlane:.1,farClipPlane:100,viewport:{x:0,y:0,z:1,w:1}}},{id:"1000101",type:"DirectLight",props:{enabled:!0,intensity:.6,color:{r:1,g:1,b:1,a:1}}}]};return t!==void 0&&(e.scene.name=t),e}var g=Object.defineProperty,w=Object.getOwnPropertyDescriptor,C=(t,e,s,a)=>{for(var n=a>1?void 0:a?w(e,s):e,i=t.length-1,r;i>=0;i--)(r=t[i])&&(n=(a?r(e,s,n):r(n))||n);return a&&n&&g(e,s,n),n};let c=class extends m{constructor(e){super(e);o(this,"sceneData",null);h(this)}async initByMain(e,s){this.sceneData=u(await e.text())}getMainData(){return d(this.sceneData)}async rename(e){await super.rename(e),await this.root.assetFacade.persistAssetMain(this.id)}saveMainImmediately(){var s;const e=this.root.sceneStore;if(this.id===e.refId){if(e.destroyed){f(this.root.projectStore.id,this.serverId);return}const a=y(this.root,this.id);return this.sceneData=a,this.sceneData.scene&&(this.sceneData.scene.name=this.name),super.saveMainImmediately()}else if((s=this.sceneData)!=null&&s.scene&&this.sceneData.scene.name!==this.name)return this.sceneData.scene.name=this.name,super.saveMainImmediately()}async initByCreation(e,s,a){return this.sceneData=b(this._name)}onDoubleClick(){this.root.projectStore.switchScene({scene:this.id})}};c=C([D({type:"Scene",label:S("asset.scene.title"),defaultName:"Scene",extname:"scene",importMenuConfig:{type:v.Add},async bundle(t){return{content:new Blob([t.content],{type:"application/json"})}}})],c);export{c as SceneAsset};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aM as s,b9 as _,d3 as le,av as f,bc as D,bb as g,d4 as G,d5 as ce,d6 as ue,d7 as de,d8 as fe,b5 as pe,d9 as Y,da as ve,db as z,dc as he,dd as ye,bd as xe,b8 as Ee,de as be,bh as me,aH as Ce}from"./index-b126bb6b.js";var ge="DismissableLayer",I="dismissableLayer.update",Te="dismissableLayer.pointerDownOutside",Pe="dismissableLayer.focusOutside",V,X=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),q=s.forwardRef((e,n)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:u,...c}=e,d=s.useContext(X),[l,h]=s.useState(null),v=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=s.useState({}),x=_(n,p=>h(p)),E=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(b),m=l?E.indexOf(l):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,T=m>=C,w=Oe(p=>{const A=p.target,$=[...d.branches].some(k=>k.contains(A));!T||$||(o==null||o(p),i==null||i(p),p.defaultPrevented||u==null||u())},v),O=De(p=>{const A=p.target;[...d.branches].some(k=>k.contains(A))||(a==null||a(p),i==null||i(p),p.defaultPrevented||u==null||u())},v);return le(p=>{m===d.layers.size-1&&(r==null||r(p),!p.defaultPrevented&&u&&(p.preventDefault(),u()))},v),s.useEffect(()=>{if(l)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(V=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),U(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=V)}},[l,v,t,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),U())},[l,d]),s.useEffect(()=>{const p=()=>y({});return document.addEventListener(I,p),()=>document.removeEventListener(I,p)},[]),f.jsx(D.div,{...c,ref:x,style:{pointerEvents:P?T?"auto":"none":void 0,...e.style},onFocusCapture:g(e.onFocusCapture,O.onFocusCapture),onBlurCapture:g(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,w.onPointerDownCapture)})});q.displayName=ge;var we="DismissableLayerBranch",Re=s.forwardRef((e,n)=>{const t=s.useContext(X),r=s.useRef(null),o=_(n,r);return s.useEffect(()=>{const a=r.current;if(a)return t.branches.add(a),()=>{t.branches.delete(a)}},[t.branches]),f.jsx(D.div,{...e,ref:o})});Re.displayName=we;function Oe(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let c=function(){K(Te,t,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=c,n.addEventListener("click",o.current,{once:!0})):c()}else n.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",a),n.removeEventListener("click",o.current)}},[n,t]),{onPointerDownCapture:()=>r.current=!0}}function De(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&K(Pe,t,{originalEvent:a},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function U(){const e=new CustomEvent(I);document.dispatchEvent(e)}function K(e,n,t,{discrete:r}){const o=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),r?ce(o,a):o.dispatchEvent(a)}var Le="Portal",Z=s.forwardRef((e,n)=>{var u;const{container:t,...r}=e,[o,a]=s.useState(!1);ue(()=>a(!0),[]);const i=t||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?de.createPortal(f.jsx(D.div,{...r,ref:n}),i):null});Z.displayName=Le;var Ae=s.forwardRef((e,n)=>{const{children:t,...r}=e,o=s.Children.toArray(t),a=o.find(_e);if(a){const i=a.props.children,u=o.map(c=>c===a?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:c);return f.jsx(M,{...r,ref:n,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return f.jsx(M,{...r,ref:n,children:t})});Ae.displayName="Slot";var M=s.forwardRef((e,n)=>{const{children:t,...r}=e;if(s.isValidElement(t)){const o=Se(t);return s.cloneElement(t,{...je(r,t.props),ref:n?fe(n,o):o})}return s.Children.count(t)>1?s.Children.only(null):null});M.displayName="SlotClone";var J=({children:e})=>f.jsx(f.Fragment,{children:e});function _e(e){return s.isValidElement(e)&&e.type===J}function je(e,n){const t={...n};for(const r in n){const o=e[r],a=n[r];/^on[A-Z]/.test(r)?o&&a?t[r]=(...u)=>{a(...u),o(...u)}:o&&(t[r]=o):r==="style"?t[r]={...o,...a}:r==="className"&&(t[r]=[o,a].filter(Boolean).join(" "))}return{...e,...t}}function Se(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Ne="VisuallyHidden",Q=s.forwardRef((e,n)=>f.jsx(D.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Q.displayName=Ne;var ke=Q,[j,ot]=pe("Tooltip",[Y]),S=Y(),ee="TooltipProvider",Ie=700,H="tooltip.open",[Me,W]=j(ee),te=e=>{const{__scopeTooltip:n,delayDuration:t=Ie,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,u]=s.useState(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),f.jsx(Me,{scope:n,isOpenDelayed:i,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),u(!1)},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:a})};te.displayName=ee;var N="Tooltip",[He,L]=j(N),ne=e=>{const{__scopeTooltip:n,children:t,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:u}=e,c=W(N,e.__scopeTooltip),d=S(n),[l,h]=s.useState(null),v=xe(),y=s.useRef(0),x=i??c.disableHoverableContent,E=u??c.delayDuration,b=s.useRef(!1),[C=!1,m]=Ee({prop:r,defaultProp:o,onChange:p=>{p?(c.onOpen(),document.dispatchEvent(new CustomEvent(H))):c.onClose(),a==null||a(p)}}),P=s.useMemo(()=>C?b.current?"delayed-open":"instant-open":"closed",[C]),T=s.useCallback(()=>{window.clearTimeout(y.current),b.current=!1,m(!0)},[m]),w=s.useCallback(()=>{window.clearTimeout(y.current),m(!1)},[m]),O=s.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,m(!0)},E)},[E,m]);return s.useEffect(()=>()=>window.clearTimeout(y.current),[]),f.jsx(be,{...d,children:f.jsx(He,{scope:n,contentId:v,open:C,stateAttribute:P,trigger:l,onTriggerChange:h,onTriggerEnter:s.useCallback(()=>{c.isOpenDelayed?O():T()},[c.isOpenDelayed,O,T]),onTriggerLeave:s.useCallback(()=>{x?w():window.clearTimeout(y.current)},[w,x]),onOpen:T,onClose:w,disableHoverableContent:x,children:t})})};ne.displayName=N;var B="TooltipTrigger",re=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=L(B,t),a=W(B,t),i=S(t),u=s.useRef(null),c=_(n,u,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),h=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),f.jsx(ve,{asChild:!0,...i,children:f.jsx(D.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:g(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:g(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:g(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:g(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:g(e.onBlur,o.onClose),onClick:g(e.onClick,o.onClose)})})});re.displayName=B;var F="TooltipPortal",[Be,We]=j(F,{forceMount:void 0}),oe=e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,a=L(F,n);return f.jsx(Be,{scope:n,forceMount:t,children:f.jsx(z,{present:t||a.open,children:f.jsx(Z,{asChild:!0,container:o,children:r})})})};oe.displayName=F;var R="TooltipContent",se=s.forwardRef((e,n)=>{const t=We(R,e.__scopeTooltip),{forceMount:r=t.forceMount,side:o="top",...a}=e,i=L(R,e.__scopeTooltip);return f.jsx(z,{present:r||i.open,children:i.disableHoverableContent?f.jsx(ae,{side:o,...a,ref:n}):f.jsx(Fe,{side:o,...a,ref:n})})}),Fe=s.forwardRef((e,n)=>{const t=L(R,e.__scopeTooltip),r=W(R,e.__scopeTooltip),o=s.useRef(null),a=_(n,o),[i,u]=s.useState(null),{trigger:c,onClose:d}=t,l=o.current,{onPointerInTransitChange:h}=r,v=s.useCallback(()=>{u(null),h(!1)},[h]),y=s.useCallback((x,E)=>{const b=x.currentTarget,C={x:x.clientX,y:x.clientY},m=Ge(C,b.getBoundingClientRect()),P=Ye(C,m),T=ze(E.getBoundingClientRect()),w=qe([...P,...T]);u(w),h(!0)},[h]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(c&&l){const x=b=>y(b,l),E=b=>y(b,c);return c.addEventListener("pointerleave",x),l.addEventListener("pointerleave",E),()=>{c.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",E)}}},[c,l,y,v]),s.useEffect(()=>{if(i){const x=E=>{const b=E.target,C={x:E.clientX,y:E.clientY},m=(c==null?void 0:c.contains(b))||(l==null?void 0:l.contains(b)),P=!Xe(C,i);m?v():P&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,l,i,d,v]),f.jsx(ae,{...e,ref:a})}),[$e,Ve]=j(N,{isInside:!1}),ae=s.forwardRef((e,n)=>{const{__scopeTooltip:t,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...u}=e,c=L(R,t),d=S(t),{onClose:l}=c;return s.useEffect(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),s.useEffect(()=>{if(c.trigger){const h=v=>{const y=v.target;y!=null&&y.contains(c.trigger)&&l()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,l]),f.jsx(q,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:l,children:f.jsxs(he,{"data-state":c.stateAttribute,...d,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(J,{children:r}),f.jsx($e,{scope:t,isInside:!0,children:f.jsx(ke,{id:c.contentId,role:"tooltip",children:o||r})})]})})});se.displayName=R;var ie="TooltipArrow",Ue=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=S(t);return Ve(ie,t).isInside?null:f.jsx(ye,{...o,...r,ref:n})});Ue.displayName=ie;function Ge(e,n){const t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),a=Math.abs(n.left-e.x);switch(Math.min(t,r,o,a)){case a:return"left";case o:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ye(e,n,t=5){const r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function ze(e){const{top:n,right:t,bottom:r,left:o}=e;return[{x:o,y:n},{x:t,y:n},{x:t,y:r},{x:o,y:r}]}function Xe(e,n){const{x:t,y:r}=e;let o=!1;for(let a=0,i=n.length-1;a<n.length;i=a++){const u=n[a].x,c=n[a].y,d=n[i].x,l=n[i].y;c>r!=l>r&&t<(d-u)*(r-c)/(l-c)+u&&(o=!o)}return o}function qe(e){const n=e.slice();return n.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ke(n)}function Ke(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}n.pop();const t=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var Ze=ne,Je=re,Qe=oe,et=se;const tt=me({"0%":{opacity:0,transform:"scale(0) translateY(-4px)"},"100%":{opacity:1,transform:"scale(1) translateY(0px)"}}),nt=Ce(et,{display:"flex",alignItems:"center",fontSize:"13px",padding:"$2 $3",backgroundColor:"$gray2",borderRadius:"$4",color:"$gray12",boxShadow:"inset 0 0 0 1px $colors$grayA4",transformOrigin:"var(--radix-tooltip-content-transform-origin)",animation:`${tt} 0.2s ease forwards`});function st(e){const{children:n,content:t,side:r="bottom",sideOffset:o=6,delayDuration:a=0,...i}=e;return f.jsx(te,{children:f.jsxs(Ze,{delayDuration:a,...i,children:[f.jsx(Je,{asChild:!0,children:n}),f.jsx(Qe,{children:f.jsx(nt,{sideOffset:o,side:r,children:t})})]})})}export{st as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as d,c as h,b as y,a as T,S as f}from"./ShaderAsset-f4eead79.js";import{S as E}from"./ShaderUIScriptAsset-3c731f3b.js";import"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./postmen-3b48c572.js";import"./meshopt_simplifier.module-cd99529d.js";import"./shader-data-utils-c90e48b8.js";import"./IconPointFilled-3ba6d082.js";import"./createReactComponent-baa41397.js";import"./index-cd09e78a.js";export{d as EShaderPropertyType,h as ShaderAsset,y as ShaderPropertyEnumType,T as ShaderPropertyRangeType,f as ShaderTemplateConfigs,E as ShaderUIScript};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as a,D as C,F as s,H as l,P as c,a as S,S as d}from"./PhysicsStore-ab32886e.js";import"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./Component-398551a0.js";import"./postmen-3b48c572.js";import"./FormItemArray-9ca61884.js";import"./Accordion-4afac60c.js";export{a as CharacterControllerComponent,C as DynamicColliderComponent,s as FixedJointComponent,l as HingeJointComponent,c as PhysicsStore,S as SpringJointComponent,d as StaticColliderComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as a,a as n}from"./AnimatorStore-aa58d85c.js";import"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./Component-398551a0.js";import"./postmen-3b48c572.js";export{a as AnimatorComponent,n as AnimatorStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A,a as l,b as C}from"./AnimationClipAsset-660ecb36.js";import"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./postmen-3b48c572.js";import"./AssetViewer-8338dfe1.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./module-83a57161.js";import"./module-113ac03a.js";export{A as AnimationClipAsset,l as AnimationClipInspector,C as AnimationClipViewer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as a}from"./PostProcessComponent-9590ec29.js";import"./index-b126bb6b.js";import"./index-c8ed2a45.js";import"./Component-398551a0.js";import"./postmen-3b48c572.js";import"./IconPlus-b3ed4c04.js";import"./createReactComponent-baa41397.js";import"./Menu-36c201c0.js";import"./Accordion-4afac60c.js";export{a as PostProcessComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as E,b as w,T as I,a as R}from"./TextureAsset-ff089b5a.js";import{G as F,a as G}from"./GlTFAsset-d2ee4f95.js";import{M as U,a as V}from"./MaterialAsset-8f3b3302.js";import{MeshAsset as X}from"./MeshAsset-3ddf1ac6.js";import{AnimatorControllerAsset as D}from"./AnimatorControllerAsset-dcf11a9d.js";import{A as j,a as q,b as z}from"./AnimationClipAsset-660ecb36.js";import{L as H,c as J,b as N,S as Q,a as W}from"./ShaderChunkAsset-4bea2733.js";import{AmbientLightAsset as Z}from"./AmbientLightAsset-3825f3bf.js";import{S as $}from"./SpineSkeletonDataAsset-afb4afae.js";import{FontAsset as te}from"./FontAsset-dc385d41.js";import{SceneAsset as se}from"./SceneAsset-c3bb667f.js";import{E as pe,c as ae,b as ie,a as me,S as Ae}from"./ShaderAsset-f4eead79.js";import{E as fe,a as ne,S as xe,b as he,t as le}from"./ShaderUIScriptAsset-3c731f3b.js";import{PrimitiveMesh as ce}from"./PrimitiveMesh-0492d482.js";import{XRReferenceImageAsset as ye}from"./XRReferenceImageAsset-ff82ab30.js";import{PrefabAsset as Me}from"./PrefabAsset-2f94de73.js";import{PhysicsMaterialAsset as Ce}from"./PhysicsMaterialAsset-e0491877.js";import{RenderTargetAsset as ge}from"./RenderTargetAsset-dc1f9494.js";import{AudioAsset as we}from"./AudioAsset-6e607154.js";import{StateMachineScript as Re}from"./index-29916a80.js";import{MarkdownAsset as Fe}from"./MarkdownAsset-02477e7c.js";import"./index-b126bb6b.js";import"./ktx2-encoder-8498815e.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./index-c8ed2a45.js";import"./postmen-3b48c572.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-1bcb87b5.js";import"./createReactComponent-baa41397.js";import"./AssetViewer-8338dfe1.js";import"./glTFIO-45ff9a17.js";import"./MaterialInspector-3fb471d9.js";import"./IconPointFilled-3ba6d082.js";import"./shader-data-utils-c90e48b8.js";import"./index-cd09e78a.js";import"./MeshThumbnail-8c20ee92.js";import"./bundlers-9b0d37fc.js";import"./module-83a57161.js";import"./module-113ac03a.js";import"./IconPlus-b3ed4c04.js";import"./FormItemArray-9ca61884.js";import"./Accordion-4afac60c.js";import"./module-8efda49c.js";export{Z as AmbientLightAsset,j as AnimationClipAsset,q as AnimationClipInspector,z as AnimationClipViewer,D as AnimatorControllerAsset,we as AudioAsset,fe as EScriptSubType,pe as EShaderPropertyType,te as FontAsset,F as GlTFAsset,G as GlTFViewer,E as KTX2Options,H as LottieAsset,Fe as MarkdownAsset,U as MaterialAsset,V as MaterialViewer,X as MeshAsset,Ce as PhysicsMaterialAsset,Me as PrefabAsset,ce as PrimitiveMesh,ge as RenderTargetAsset,se as SceneAsset,ne as ScriptAsset,ae as ShaderAsset,J as ShaderChunkAsset,ie as ShaderPropertyEnumType,me as ShaderPropertyRangeType,Ae as ShaderTemplateConfigs,xe as ShaderUIScript,he as ShaderUIScriptAsset,N as SpineAtlasAsset,$ as SpineSkeletonDataAsset,Q as SpriteAsset,W as SpriteAtlasAsset,Re as StateMachineScript,w as TextureAsset,I as TextureShape,R as TextureUseType,ye as XRReferenceImageAsset,le as scriptTemplates};
|