gaesup-world 1.2.0 → 1.3.1

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.
Files changed (88) hide show
  1. package/dist/{ControllerWrapper-jGqlqLgR.js → ControllerWrapper-Bc_pRQSv.js} +1 -1
  2. package/dist/{ControllerWrapper-WJUu-I7W.cjs → ControllerWrapper-C6mzwejv.cjs} +1 -1
  3. package/dist/{Gamepad-DsvoS6os.cjs → Gamepad-BVhh5IfO.cjs} +1 -1
  4. package/dist/{Gamepad-D1PJuBvE.js → Gamepad-DpCgazVm.js} +1 -1
  5. package/dist/{NodeGrassMaterial-fyrFt7pU.cjs → NodeGrassMaterial-BMwfsBMP.cjs} +1 -1
  6. package/dist/{NodeGrassMaterial-D3U4NZAW.js → NodeGrassMaterial-W9H9z72i.js} +1 -1
  7. package/dist/{NodeWaterMaterial-CBrHckTC.js → NodeWaterMaterial-Bc1nkYSw.js} +1 -1
  8. package/dist/{NodeWaterMaterial-C90WTomH.cjs → NodeWaterMaterial-C5fHPHUG.cjs} +1 -1
  9. package/dist/{Rideable-C2aoGTmF.cjs → Rideable-CWddzOkn.cjs} +1 -1
  10. package/dist/{Rideable-CuNvwh2D.js → Rideable-DTSh5xu3.js} +2 -2
  11. package/dist/{WorldContainer-DI4x1VGT.cjs → WorldContainer-BjZj0uvZ.cjs} +1 -1
  12. package/dist/{WorldContainer-B5bM3fwx.js → WorldContainer-Ce5PVxSF.js} +4 -4
  13. package/dist/{WorldPostProcessing-2fSaVGEL.cjs → WorldPostProcessing-C80qMk1k.cjs} +1 -1
  14. package/dist/{WorldPostProcessing-C1uP1gjh.js → WorldPostProcessing-Dfq_RW-t.js} +2 -3
  15. package/dist/blueprints-editor.cjs +1 -1
  16. package/dist/blueprints-editor.js +4 -4
  17. package/dist/building.cjs +1 -1
  18. package/dist/building.js +1 -1
  19. package/dist/core/building/components/WallSystem/batch.d.cts +12 -3
  20. package/dist/core/building/components/WallSystem/batch.d.ts +12 -3
  21. package/dist/core/building/components/WallSystem/pieces.d.cts +8 -4
  22. package/dist/core/building/components/WallSystem/pieces.d.ts +8 -4
  23. package/dist/core/building/hooks/useReusedByKey.d.cts +5 -0
  24. package/dist/core/building/hooks/useReusedByKey.d.ts +5 -0
  25. package/dist/core/camera/utils/triangleGrid.d.cts +29 -0
  26. package/dist/core/camera/utils/triangleGrid.d.ts +29 -0
  27. package/dist/core/networks/components/index.d.cts +1 -0
  28. package/dist/core/networks/components/index.d.ts +1 -0
  29. package/dist/core/perf/idle.d.cts +2 -2
  30. package/dist/core/perf/idle.d.ts +2 -2
  31. package/dist/core/rendering/sceneCompile.d.cts +6 -7
  32. package/dist/core/rendering/sceneCompile.d.ts +6 -7
  33. package/dist/editor.cjs +1 -1
  34. package/dist/editor.js +3 -3
  35. package/dist/flow-BnFTzumT.cjs +1 -0
  36. package/dist/flow-DJRTbNvJ.js +144 -0
  37. package/dist/index.cjs +2 -2
  38. package/dist/index.css +1 -1
  39. package/dist/index.js +878 -875
  40. package/dist/legacyDrei-B6cWIHbX.js +2 -0
  41. package/dist/network.cjs +1 -1
  42. package/dist/network.js +2 -2
  43. package/dist/{plugin-epk5BZCz.cjs → plugin-BUKo4q0N.cjs} +32 -32
  44. package/dist/{plugin-KFnkRLsd.js → plugin-Dsf9EwPP.js} +1468 -1522
  45. package/dist/postprocessing.cjs +1 -1
  46. package/dist/postprocessing.js +1 -1
  47. package/dist/{quality-KkwsHdju.cjs → quality-0VukPLnv.cjs} +1 -1
  48. package/dist/{quality-BgplnaOO.js → quality-BLE1xXFm.js} +1 -1
  49. package/dist/runtime.cjs +1 -1
  50. package/dist/runtime.js +2 -2
  51. package/dist/{sceneCompile-CHRGwswb.js → sceneCompile-BWpSal9S.js} +80 -64
  52. package/dist/sceneCompile-D9xft0op.cjs +1 -0
  53. package/dist/{sfe-CjDh54rj.js → sfe-BAXSr5BB.js} +147 -40
  54. package/dist/{sfe-aBcZuSF2.cjs → sfe-DnOKmvUM.cjs} +1 -1
  55. package/dist/shell-BRQStYy9.cjs +1 -0
  56. package/dist/{shell-69YWpmhQ.js → shell-aiiC8SLL.js} +1283 -1416
  57. package/dist/useGenericRefs-CZ_HIQG_.cjs +1 -0
  58. package/dist/{useGenericRefs-8NKwNG7N.js → useGenericRefs-D0cOKidj.js} +247 -188
  59. package/dist/{useVisitRoom-BbS5lhx5.js → useVisitRoom-C_UX2avV.js} +372 -390
  60. package/dist/{useVisitRoom-D_7rwTnk.cjs → useVisitRoom-GXR8KyFN.cjs} +1 -1
  61. package/package.json +4 -3
  62. package/public/gltf/nature/fern.glb +0 -0
  63. package/public/gltf/nature/kenney/LICENSE.txt +23 -0
  64. package/public/gltf/nature/kenney/bush.glb +0 -0
  65. package/public/gltf/nature/kenney/fallen-log.glb +0 -0
  66. package/public/gltf/nature/kenney/flower-purple.glb +0 -0
  67. package/public/gltf/nature/kenney/flower-red.glb +0 -0
  68. package/public/gltf/nature/kenney/flower-yellow.glb +0 -0
  69. package/public/gltf/nature/kenney/lily.glb +0 -0
  70. package/public/gltf/nature/kenney/mushroom-cluster.glb +0 -0
  71. package/public/gltf/nature/kenney/rock-flat.glb +0 -0
  72. package/public/gltf/nature/kenney/rock-large.glb +0 -0
  73. package/public/gltf/nature/kenney/rock-moss.glb +0 -0
  74. package/public/gltf/nature/kenney/rock-small.glb +0 -0
  75. package/public/gltf/nature/kenney/stump.glb +0 -0
  76. package/public/gltf/nature/manifest.json +137 -0
  77. package/public/gltf/nature/rock-round.glb +0 -0
  78. package/public/gltf/nature/rock-tall.glb +0 -0
  79. package/public/gltf/nature/rock-wide.glb +0 -0
  80. package/public/gltf/nature/tree-fat.glb +0 -0
  81. package/public/gltf/nature/tree-oak.glb +0 -0
  82. package/public/gltf/nature/tree-pine.glb +0 -0
  83. package/public/gltf/nature/tree-round.glb +0 -0
  84. package/public/gltf/nature/tree-thin.glb +0 -0
  85. package/dist/legacyDrei-DIgQmWEr.js +0 -2
  86. package/dist/sceneCompile-CZwYKosw.cjs +0 -1
  87. package/dist/shell-Cuw1RbCu.cjs +0 -1
  88. package/dist/useGenericRefs-D8axfJ-5.cjs +0 -1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-Chgba0Kb.cjs"),t=require("./logger-B9OaKOPw.cjs"),n=require("./WorldPhysics-CueqwH91.cjs"),r=require("./CoreBridge-CnLqWZNv.cjs"),i=require("./id-DWiNl1ym.cjs"),a=require("./defaults-BLDQhn77.cjs"),o=require("./guards-FnxbNibY.cjs"),s=require("./useGenericRefs-D8axfJ-5.cjs"),c=require("./ControllerWrapper-WJUu-I7W.cjs"),l=require("./BlueprintFactory-D6FM31oL.cjs"),u=require("./blueprints-BHfyy363.cjs"),d=require("./Gamepad-DsvoS6os.cjs");let f=require("three");f=e.n(f,1);let p=require("react");p=e.n(p,1);let m=require("@react-three/fiber"),h=require("react/jsx-runtime"),g=require("@react-three/rapier"),_=require("@react-three/drei");var v=new Map([[`melee`,`근접`],[`tank`,`방어형`],[`starter`,`기본`],[`magic`,`마법`],[`ranged`,`원거리`],[`fire`,`화염`],[`land`,`지상`],[`fast`,`고속`],[`small`,`소형`],[`custom`,`사용자 지정`]]),y=new Map([[`character`,`캐릭터`],[`vehicle`,`차량`],[`airplane`,`비행기`],[`animation-sequence`,`애니메이션 시퀀스`],[`behavior-tree`,`행동 트리`],[`animation`,`애니메이션`],[`behavior`,`행동`],[`item`,`아이템`]]),b={id:`식별자`,name:`이름`,description:`설명`,version:`버전`,tags:`태그`,type:`유형`,metadata:`추가 정보`,physics:`물리`,mass:`질량`,height:`높이`,radius:`반지름`,jumpForce:`점프 힘`,moveSpeed:`이동 속도`,runSpeed:`달리기 속도`,airControl:`공중 조작`,maxSpeed:`최고 속도`,acceleration:`가속`,braking:`제동`,turning:`회전`,lift:`양력`,drag:`항력`,suspension:`서스펜션`,animations:`애니메이션`,idle:`대기`,walk:`걷기`,run:`달리기`,jump:`점프`,start:`시작`,loop:`반복`,land:`착지`,combat:`전투`,special:`특수 동작`,moving:`이동`,flying:`비행`,wheels:`바퀴`,propeller:`프로펠러`,behaviors:`행동`,data:`데이터`,stats:`능력치`,health:`체력`,stamina:`지구력`,mana:`마나`,strength:`공격력`,defense:`방어력`,speed:`속도`,visuals:`외형`,parts:`구성 요소`,model:`모델`,textures:`텍스처`,materials:`재질`,scale:`크기`,camera:`카메라`,controls:`조작`,seats:`좌석`,position:`위치`,rotation:`회전`,isDriver:`운전석`,mode:`모드`,distance:`거리`,fov:`시야각`,smoothing:`보간`,enableCollision:`충돌 사용`,enableZoom:`확대 사용`,zoomSpeed:`확대 속도`,minZoom:`최소 확대`,maxZoom:`최대 확대`,enableKeyboard:`키보드 사용`,enableMouse:`마우스 사용`,enableGamepad:`게임패드 사용`,clickToMove:`클릭 이동`,keyMapping:`키 설정`,clips:`클립`,transitions:`전환`,duration:`길이`,file:`파일`,events:`이벤트`,time:`시간`,from:`시작`,to:`대상`,condition:`조건`,attack_light:`가벼운 공격`,attack_heavy:`강한 공격`,block:`막기`,parry:`받아치기`,cast_fireball:`화염구 시전`,cast_meteor:`운석 시전`,cast_firewall:`화염벽 시전`,channel:`집중 시전`,meditate:`명상`,teleport:`순간 이동`,initial:`초기 상태`,states:`상태 목록`,on:`이벤트 전환`,casting:`시전 중`,meditating:`명상 중`,MOVE:`이동 시작`,ATTACK:`공격`,STOP:`정지`,FINISH:`완료`,CAST:`시전`,MEDITATE:`명상 시작`,INTERRUPT:`중단`,stiffness:`강성`,damping:`감쇠`,restLength:`기본 길이`,maxTravel:`최대 변위`,url:`파일 경로`,color:`색상`,attachmentPoint:`장착 지점`},x=e=>e?.type===`character`;function S(e,t,n){let r={...n};for(let i of Object.keys(t))!Object.is(e[i],t[i])&&Object.is(n[i],t[i])&&(Object.prototype.hasOwnProperty.call(e,i)?r[i]=e[i]:delete r[i]);return r}function C({blueprint:e}){let t=e?u.r(e):``;return!x(e)||!t?(0,h.jsxs)(`div`,{className:`blueprint-preview blueprint-preview--empty`,role:`status`,children:[(0,h.jsx)(`strong`,{children:e?.name??`미리보기`}),(0,h.jsx)(`p`,{children:e?x(e)?`몸체 모델을 지정하면 3D 미리보기가 표시됩니다.`:`이 유형의 3D 미리보기는 아직 지원하지 않습니다. 속성은 편집할 수 있습니다.`:`블루프린트를 선택하면 미리보기가 표시됩니다.`})]}):(0,h.jsx)(w,{blueprint:e,modelUrl:t})}function w({blueprint:e,modelUrl:t}){let i=r.s(),o=(0,p.useRef)(null),l=r.o(e=>e.setUrls),u=r.o(e=>e.setCameraOption),v=r.o(e=>e.setMode),y=r.o(e=>e.mode),[b,C]=(0,p.useState)(20),w=x(e)?e.controls?.clickToMove??!0:!1,T=x(e)?e.controls?.enableKeyboard??!0:!1,E=x(e)?e.controls?.enableMouse??!0:!1,D=e.controls?.enableGamepad??!1,O=e.camera;return(0,p.useEffect)(()=>{let{physics:t,setPhysics:n}=i.getState(),r=e.physics.mass>0?e.physics.jumpForce/e.physics.mass:0;n({walkSpeed:e.physics.moveSpeed,runSpeed:e.physics.runSpeed,jumpSpeed:Number.isFinite(r)?Math.max(0,r):0});let a=i.getState().physics;return()=>{i.setState(e=>({physics:S(t,a,e.physics)}))}},[e.physics.moveSpeed,e.physics.runSpeed,e.physics.jumpForce,e.physics.mass,i]),(0,p.useEffect)(()=>{let{mode:e,cameraOption:t}=i.getState(),n=O??{};v({type:`character`,controller:D?`gamepad`:`keyboard`,control:n.mode||`thirdPerson`}),u({xDistance:n.distance?.x??b,yDistance:n.distance?.y??b*.5,zDistance:n.distance?.z??b,offset:new f.Vector3(0,0,0),enableCollision:n.enableCollision??!1,smoothing:n.smoothing||{position:.25,rotation:.3,fov:.2},fov:n.fov||50,zoom:1,enableZoom:n.enableZoom??!0,zoomSpeed:n.zoomSpeed??.001,minZoom:n.minZoom||.5,maxZoom:n.maxZoom||3,enableFocus:!1,bounds:{minY:2,maxY:50}});let{mode:r,cameraOption:a}=i.getState();return()=>{let n=i.getState();n.setMode(S(e,r,n.mode)),n.replaceCameraOption(S(t,a,n.cameraOption))}},[v,u,b,O,D,i]),(0,p.useEffect)(()=>{let e=i.getState().urls.characterUrl??``;return l({characterUrl:t}),()=>{i.getState().urls.characterUrl===t&&l({characterUrl:e})}},[t,l,i]),(0,p.useEffect)(()=>{let t=o.current;if(!t)return;let n=t=>{if(!E||e.camera?.enableZoom===!1)return;t.preventDefault();let n=t.deltaY*.01;C(e=>Math.max(10,Math.min(40,e+n)))};return t.addEventListener(`wheel`,n,{passive:!1}),()=>t.removeEventListener(`wheel`,n)},[e,E]),(0,h.jsxs)(`div`,{ref:o,className:`blueprint-preview`,children:[(0,h.jsxs)(m.Canvas,{shadows:!0,camera:{position:[0,10,20],fov:50},style:{width:`100%`,height:`100%`},children:[(0,h.jsx)(n.n,{}),(0,h.jsx)(s.n,{enableMouse:E}),(0,h.jsx)(_.Environment,{preset:`sunset`}),(0,h.jsx)(`ambientLight`,{intensity:.5}),(0,h.jsx)(`directionalLight`,{castShadow:!0,position:[20,30,10],intensity:.5,"shadow-mapSize":[1024,1024],"shadow-camera-near":1,"shadow-camera-far":120,"shadow-camera-top":90,"shadow-camera-right":90,"shadow-camera-bottom":-90,"shadow-camera-left":-90}),(0,h.jsxs)(n.t,{debug:!1,gravity:[0,-9.81,0],children:[e&&y?.type===`character`&&(0,h.jsx)(c.t,{enableKeyboard:T,controllerOptions:{lerp:{cameraTurn:.1,cameraPosition:.08}},rigidBodyProps:{lockRotations:!0},parts:!x(e)||!e.visuals?.parts?[]:e.visuals.parts.filter(e=>e.type!==`body`).map(e=>e.color?{url:e.url,color:e.color}:{url:e.url}),position:[0,1,0],rotation:(0,g.euler)({x:0,y:Math.PI,z:0})},`preview-${e.id}`),E&&w&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.i,{}),(0,h.jsx)(c.r,{})]}),(0,h.jsx)(g.RigidBody,{type:`fixed`,children:(0,h.jsxs)(`mesh`,{receiveShadow:!0,position:[0,-.5,0],children:[(0,h.jsx)(`boxGeometry`,{args:[100,1,100]}),(0,h.jsx)(`meshStandardMaterial`,{color:`#303030`})]})}),(0,h.jsx)(_.Grid,{renderOrder:-1,position:[0,.01,0],infiniteGrid:!0,cellSize:1,cellThickness:.5,cellColor:`#404040`,sectionSize:5,sectionThickness:1,sectionColor:`#606060`,fadeDistance:50,fadeStrength:1,followCamera:!1,userData:{intangible:!0}})]})]}),D&&(0,h.jsx)(`div`,{className:`blueprint-preview__gamepad`,role:`group`,"aria-label":`화면 조작 버튼`,children:(0,h.jsx)(d.t,{})}),e&&(0,h.jsxs)(`div`,{className:`blueprint-preview__info`,children:[(0,h.jsx)(`h4`,{className:`blueprint-preview__name`,children:e.name}),x(e)&&e.physics&&(0,h.jsxs)(`div`,{className:`blueprint-preview__stats`,children:[(0,h.jsxs)(`div`,{children:[`이동 속도: `,e.physics.moveSpeed]}),(0,h.jsxs)(`div`,{children:[`점프 힘: `,e.physics.jumpForce]})]}),(0,h.jsxs)(`div`,{className:`blueprint-preview__controls`,children:[(0,h.jsxs)(`div`,{children:[`카메라: `,x(e)?a.r.find(t=>t.value===(e.camera?.mode??`thirdPerson`))?.label??`사용자 지정`:`해당 없음`]}),(0,h.jsxs)(`div`,{children:[`키보드: `,T?`켜짐`:`꺼짐`]}),(0,h.jsxs)(`div`,{children:[`마우스: `,E?`켜짐`:`꺼짐`]}),(0,h.jsxs)(`div`,{children:[`클릭 이동: `,w?`켜짐`:`꺼짐`]})]})]})]})}var T=e=>{switch(e.type){case`animation-sequence`:return`animation`;case`behavior-tree`:return`behavior`;default:return e.type}},E=e=>({id:e.id,name:e.name,type:T(e),version:e.version,tags:e.tags||[],description:e.description??``,lastModified:new Date().toISOString().split(`T`)[0]??``}),D=(e,t,n)=>{if(t.length===0)return!1;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(!n)return!1;if(Array.isArray(r)){let e=Number(n);if(!Number.isInteger(e)||e<0||e>=r.length)return!1;let t=r[e],i=Array.isArray(t)?[...t]:o.r(t)?{...t}:void 0;if(!i)return!1;r[e]=i,r=i;continue}if(!o.r(r))return!1;let i=r[n],a=Array.isArray(i)?[...i]:o.r(i)?{...i}:void 0;if(!a)return!1;r[n]=a,r=a}let i=t[t.length-1];if(!i)return!1;if(Array.isArray(r)){let e=Number(i);return!Number.isInteger(e)||e<0||e>=r.length?!1:(r[e]=n,!0)}return o.r(r)?(r[i]=n,!0):!1},O=[{id:`characters`,name:`캐릭터`,type:`character`,count:0},{id:`vehicles`,name:`차량`,type:`vehicle`,count:0},{id:`airplanes`,name:`비행기`,type:`airplane`,count:0},{id:`animations`,name:`애니메이션`,type:`animation`,count:0},{id:`behaviors`,name:`행동`,type:`behavior`,count:0},{id:`items`,name:`아이템`,type:`item`,count:0}],k=({onClose:e})=>{let[n,r]=(0,p.useState)(`character`),[i,s]=(0,p.useState)(null),[c,d]=(0,p.useState)(``),[f,m]=(0,p.useState)(null),[g,_]=(0,p.useState)(!0),[x,S]=(0,p.useState)(!1),{spawnAtCursor:w,isSpawning:T}=u.n(),[k,A]=(0,p.useState)(!1),[j,M]=(0,p.useState)(()=>l.n.getAll().map(E)),N=(0,p.useMemo)(()=>{let e={character:0,vehicle:0,airplane:0,animation:0,behavior:0,item:0};return j.forEach(t=>{t.type in e&&e[t.type]++}),O.map(t=>({...t,count:e[t.type]})).filter(e=>e.count>0)},[j]),P=(0,p.useMemo)(()=>{let e=c.trim().toLowerCase();return j.filter(t=>{let r=t.type===n,i=e===``||t.name.toLowerCase().includes(e)||t.tags.some(t=>t.toLowerCase().includes(e)||v.get(t)?.includes(e));return r&&i})},[n,c,j]),F=(0,p.useCallback)((e,t)=>{S(!0),m(n=>{if(!n)return null;let r={...n};return D(r,e,t)?r:n})},[]),I=(0,p.useCallback)(e=>{if(A(!1),S(!1),s(e),e){let t=l.n.get(e);t&&m(JSON.parse(JSON.stringify(t)))}else m(null)},[]);(0,p.useEffect)(()=>{if(x)return;let e=P.some(e=>e.id===i);P[0]?.id&&P.length>0&&!e?I(P[0].id):P.length===0&&I(null)},[P,i,I,x]);let L=()=>{f&&(l.n.register(f),M(l.n.getAll().map(E)),S(!1))},R=async()=>{if(f){A(!1);try{L(),await w(f.id)?e():A(!0)}catch(e){t.t.error(`Blueprint spawn failed`,e instanceof Error?e:String(e)),A(!0)}}},z=(e,t,n)=>{let r=b[e]??e;return Array.isArray(t)?(0,h.jsxs)(`details`,{className:`blueprint-editor__inspector-group`,children:[(0,h.jsxs)(`summary`,{className:`blueprint-editor__inspector-title`,children:[r,` · `,t.length===0?`비어 있음`:`${t.length}개 항목`]}),t.map((e,t)=>z(`항목 ${t+1}`,e,[...n,String(t)]))]},n.join(`.`)):o.r(t)?(0,h.jsxs)(`div`,{className:`blueprint-editor__inspector-group`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__inspector-title`,children:r}),Object.entries(t).map(([e,t])=>z(e,t,[...n,e]))]},n.join(`.`)):typeof t==`boolean`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`button`,{className:`blueprint-editor__toggle ${t?`blueprint-editor__toggle--on`:``}`,onClick:()=>F(n,!t),"aria-pressed":t,children:t?`켜짐`:`꺼짐`})]},n.join(`.`)):typeof t==`number`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`input`,{type:`number`,value:t,onChange:e=>F(n,Number(e.target.value)),className:`blueprint-editor__inspector-input`})]},n.join(`.`)):n.length===2&&n[0]===`camera`&&e===`mode`&&typeof t==`string`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:`카메라 모드`}),(0,h.jsxs)(`select`,{value:t,onChange:e=>F(n,e.target.value),className:`blueprint-editor__inspector-input`,children:[!a.r.some(e=>e.value===t)&&(0,h.jsxs)(`option`,{value:t,children:[`사용자 지정 (`,t,`)`]}),a.r.map(e=>(0,h.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]},n.join(`.`)):(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`input`,{type:`text`,value:typeof t==`string`?n.length===1&&e===`type`?y.get(t)??t:t:``,readOnly:n.length===1&&(e===`id`||e===`type`),onChange:e=>F(n,e.target.value),className:`blueprint-editor__inspector-input`})]},n.join(`.`))};return(0,h.jsxs)(`div`,{className:`blueprint-editor`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__sidebar`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__search`,children:(0,h.jsx)(`input`,{type:`text`,placeholder:`블루프린트 검색`,"aria-label":`블루프린트 검색`,disabled:x,value:c,onChange:e=>d(e.target.value),className:`blueprint-editor__search-input`})}),(0,h.jsx)(`div`,{className:`blueprint-editor__categories`,children:N.map(e=>(0,h.jsxs)(`button`,{"aria-pressed":n===e.type,disabled:x,onClick:()=>r(e.type),className:`blueprint-editor__category ${n===e.type?`active`:``}`,children:[(0,h.jsx)(`span`,{className:`blueprint-editor__category-name`,children:e.name}),(0,h.jsx)(`span`,{className:`blueprint-editor__category-count`,children:e.count})]},e.id))}),(0,h.jsxs)(`div`,{className:`blueprint-editor__list`,children:[P.map(e=>(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":i===e.id,disabled:x,onClick:()=>I(e.id),className:`blueprint-editor__item ${i===e.id?`active`:``}`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__item-name`,children:e.name}),(0,h.jsx)(`div`,{className:`blueprint-editor__item-tags`,children:e.tags.map(e=>(0,h.jsx)(`span`,{className:`blueprint-editor__tag`,children:v.get(e)??e},e))})]},e.id)),P.length===0&&(0,h.jsx)(`p`,{className:`blueprint-editor__empty`,children:`조건에 맞는 블루프린트가 없습니다.`})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__actions`,children:[k&&(0,h.jsx)(`p`,{role:`alert`,className:`blueprint-editor__spawn-error`,children:`생성하지 못했습니다. 월드가 준비되어 있는지 확인한 뒤 다시 시도해 주세요.`}),(0,h.jsx)(`button`,{onClick:L,disabled:!x||!f||T,className:`blueprint-editor__spawn-button`,children:`변경 적용`}),x&&(0,h.jsx)(`button`,{type:`button`,onClick:()=>I(i),disabled:T,className:`blueprint-editor__cancel-button`,children:`변경 취소`}),(0,h.jsx)(`p`,{className:`blueprint-editor__empty`,children:x?`다른 항목으로 이동하려면 변경 사항을 적용하거나 취소해 주세요.`:`변경 사항은 현재 세션에 적용됩니다. 생성 시에도 함께 적용합니다.`}),(0,h.jsx)(`button`,{onClick:R,disabled:!i||T,className:`blueprint-editor__spawn-button`,children:T?`생성 중...`:`엔티티 생성`})]})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__main`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__preview-section`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__preview-header`,children:[(0,h.jsx)(`h3`,{className:`blueprint-editor__preview-title`,children:`미리보기`}),(0,h.jsx)(`button`,{onClick:()=>_(!g),className:`blueprint-editor__preview-toggle`,children:g?`숨기기`:`보기`})]}),g&&(0,h.jsx)(`div`,{className:`blueprint-editor__preview-container`,children:(0,h.jsx)(C,{blueprint:f},f?f.id:`no-blueprint`)})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__inspector-section`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__preview-header`,children:(0,h.jsx)(`h3`,{className:`blueprint-editor__preview-title`,children:`속성`})}),(0,h.jsx)(`div`,{className:`blueprint-editor__inspector`,children:f?Object.entries(f).map(([e,t])=>z(e,t,[e])):(0,h.jsx)(`div`,{className:`blueprint-editor__empty`,children:`블루프린트를 선택하세요.`})})]})]})]})},A=(e,t,n)=>{if(t.length===0)return!1;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(!n)return!1;if(Array.isArray(r)){let e=Number(n);if(!Number.isInteger(e)||e<0||e>=r.length)return!1;r=r[e];continue}if(!o.r(r))return!1;r=r[n]}let i=t[t.length-1];if(!i)return!1;if(Array.isArray(r)){let e=Number(i);return!Number.isInteger(e)||e<0||e>=r.length?!1:(r[e]=n,!0)}return o.r(r)?(r[i]=n,!0):!1},j=[{id:`characters`,name:`캐릭터`,type:`character`,count:0},{id:`vehicles`,name:`차량`,type:`vehicle`,count:0},{id:`airplanes`,name:`비행기`,type:`airplane`,count:0},{id:`animations`,name:`애니메이션`,type:`animation`,count:0},{id:`behaviors`,name:`행동`,type:`behavior`,count:0},{id:`items`,name:`아이템`,type:`item`,count:0}],M=({className:e=``,style:t,children:n})=>{let[r,a]=(0,p.useState)(`character`),[s,c]=(0,p.useState)(null),[d,f]=(0,p.useState)(``),[m,g]=(0,p.useState)(!1),[_,x]=(0,p.useState)(null),[S,C]=(0,p.useState)(!1),{spawnAtCursor:w,isSpawning:T}=u.n(),[D,O]=(0,p.useState)(()=>l.n.getAll().map(E)),k=(0,p.useMemo)(()=>{let e={character:0,vehicle:0,airplane:0,animation:0,behavior:0,item:0};return D.forEach(t=>{t.type in e&&e[t.type]++}),j.map(t=>({...t,count:e[t.type]}))},[D]),M=(0,p.useMemo)(()=>{let e=d.trim().toLowerCase();return D.filter(t=>{let n=t.type===r,i=e===``||t.name.toLowerCase().includes(e)||t.tags.some(t=>t.toLowerCase().includes(e)||v.get(t)?.includes(e));return n&&i})},[r,d,D]),N=e=>{c(e);let t=l.n.get(e);t&&x(JSON.parse(JSON.stringify(t)))},P=()=>{g(!0)},F=()=>{_&&(l.n.register(_),O(l.n.getAll().map(E)),g(!1),C(!1),N(_.id))},I=()=>{if(g(!1),C(!1),S){c(null),x(null);return}if(s){let e=l.n.get(s);e&&x(JSON.parse(JSON.stringify(e)))}},L=()=>{if(![`character`,`vehicle`,`airplane`].includes(r))return;let e,t={id:i.t(`custom-${r}`),name:`새 ${j.find(e=>e.type===r)?.name}`,version:`1.0.0`,tags:[`custom`],description:`사용자 지정 블루프린트`};switch(r){case`vehicle`:e={...t,type:`vehicle`,physics:{mass:1e3,maxSpeed:30,acceleration:10,braking:15,turning:2},seats:[{position:[0,1,0],isDriver:!0}],animations:{idle:``}};break;case`airplane`:e={...t,type:`airplane`,physics:{mass:2e3,maxSpeed:100,acceleration:20,turning:1,lift:50,drag:10},seats:[{position:[0,1,2],isDriver:!0}],animations:{idle:``}};break;default:e={...t,type:`character`,physics:{mass:70,height:1.8,radius:.3,jumpForce:300,moveSpeed:5,runSpeed:10,airControl:.2},animations:{idle:``,walk:``,run:``,jump:{start:``,loop:``,land:``}},stats:{health:100,stamina:50,strength:10,defense:10,speed:10}}}x(e),c(e.id),C(!0),g(!0)},R=(e,t)=>{if(!_)return;let n=JSON.parse(JSON.stringify(_));A(n,e,t)&&x(n)},z=(e,t=[])=>{let n=[];return Object.entries(e).forEach(([e,r])=>{let i=b[e]??e,a=[...t,e],s=a.join(`.`);e===`id`||e===`type`?n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:`text`,value:t.length===0&&e===`type`?y.get(r)??r:r,disabled:!0,"aria-label":i,className:`property-editor__input property-editor__input--disabled`})]},s)):o.r(r)?n.push((0,h.jsxs)(`div`,{className:`property-editor__group`,children:[(0,h.jsxs)(`div`,{className:`property-editor__group-title editor-text`,children:[i,`:`]}),(0,h.jsx)(`div`,{className:`property-editor__group-content`,children:z(r,a)})]},s)):Array.isArray(r)?r.length>0&&r.every(e=>o.r(e))?n.push((0,h.jsxs)(`div`,{className:`property-editor__group`,children:[(0,h.jsxs)(`div`,{className:`property-editor__group-title editor-text`,children:[i,`:`]}),(0,h.jsx)(`div`,{className:`property-editor__group-content`,children:r.map((e,t)=>(0,h.jsxs)(`div`,{className:`property-editor__array-item`,children:[(0,h.jsxs)(`div`,{className:`property-editor__array-item-title editor-text-small`,children:[`항목 `,t+1]}),z(e,[...a,t.toString()])]},`${s}.${t}`))})]},s)):n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:`text`,value:r.join(`, `),onChange:e=>R(a,e.target.value.split(`,`).map(e=>e.trim())),"aria-label":i,className:`property-editor__input`})]},s)):typeof r==`boolean`?n.push((0,h.jsx)(`div`,{className:`property-editor__field`,children:(0,h.jsxs)(`label`,{className:`property-editor__checkbox-label editor-text-small`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>R(a,e.target.checked),className:`property-editor__checkbox`}),i]})},s)):n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:typeof r==`number`?`number`:`text`,value:r,onChange:e=>R(a,typeof r==`number`?Number(e.target.value):e.target.value),"aria-label":i,className:`property-editor__input`})]},s))}),n};return(0,h.jsxs)(`div`,{className:`blueprint-panel ${e}`,style:t,children:[(0,h.jsx)(`h3`,{className:`editor-title`,children:`블루프린트 라이브러리`}),(0,h.jsx)(`div`,{className:`blueprint-panel__toolbar`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__search-container`,children:[(0,h.jsx)(`input`,{type:`text`,placeholder:`블루프린트 검색`,"aria-label":`블루프린트 검색`,value:d,onChange:e=>f(e.target.value),className:`blueprint-panel__search-input`}),(0,h.jsx)(`button`,{onClick:L,disabled:m||![`character`,`vehicle`,`airplane`].includes(r),className:`blueprint-panel__button blueprint-panel__button--primary`,children:`+ 새 블루프린트`})]})}),(0,h.jsx)(`div`,{className:`blueprint-panel__categories`,children:k.map(e=>(0,h.jsxs)(`button`,{"aria-pressed":r===e.type,disabled:m,onClick:()=>a(e.type),className:`blueprint-panel__category-button ${r===e.type?`blueprint-panel__category-button--active`:``}`,children:[(0,h.jsx)(`span`,{children:e.name}),(0,h.jsxs)(`span`,{children:[`(`,e.count,`)`]})]},e.id))}),m?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`blueprint-panel__property-editor-container editor-scrollbar`,children:_&&(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h4`,{className:`blueprint-panel__property-editor-title editor-text`,children:S?`새 블루프린트 만들기`:`편집: ${_.name}`}),z(_)]})}),(0,h.jsx)(`div`,{className:`blueprint-panel__footer`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__footer-buttons`,children:[(0,h.jsx)(`button`,{onClick:F,className:`blueprint-panel__button blueprint-panel__button--primary`,children:S?`만들기`:`적용`}),(0,h.jsx)(`button`,{onClick:I,className:`blueprint-panel__button blueprint-panel__button--danger`,children:`취소`})]})})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`blueprint-panel__list editor-scrollbar`,children:M.length===0?(0,h.jsx)(`div`,{className:`blueprint-panel__empty-message editor-text-small`,children:`조건에 맞는 블루프린트가 없습니다.`}):M.map(e=>(0,h.jsx)(`button`,{type:`button`,"aria-pressed":s===e.id,onClick:()=>N(e.id),className:`blueprint-panel__list-item ${s===e.id?`blueprint-panel__list-item--selected`:``}`,children:(0,h.jsxs)(`span`,{className:`list-item__content`,children:[(0,h.jsxs)(`span`,{className:`list-item__text-content`,children:[(0,h.jsx)(`span`,{className:`list-item__name editor-text`,children:e.name}),(0,h.jsx)(`span`,{className:`list-item__description editor-text-small`,children:e.description}),(0,h.jsx)(`span`,{className:`list-item__tags`,children:e.tags.map(e=>(0,h.jsx)(`span`,{className:`list-item__tag editor-text-small`,children:v.get(e)??e},e))})]}),(0,h.jsxs)(`span`,{className:`list-item__meta editor-text-small`,children:[(0,h.jsxs)(`span`,{children:[`v`,e.version]}),(0,h.jsx)(`span`,{children:e.lastModified})]})]})},e.id))}),s&&(0,h.jsx)(`div`,{className:`blueprint-panel__footer`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__footer-buttons`,children:[(0,h.jsx)(`button`,{onClick:P,className:`blueprint-panel__button blueprint-panel__button--secondary`,children:`블루프린트 편집`}),(0,h.jsx)(`button`,{onClick:async()=>{s&&await w(s)},disabled:T,className:`blueprint-panel__button blueprint-panel__button--primary`,children:T?`생성 중...`:`엔티티 생성`})]})})]}),n]})};exports.BlueprintEditor=k,exports.BlueprintPanel=M,exports.BlueprintPreview=C;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-Chgba0Kb.cjs"),t=require("./logger-B9OaKOPw.cjs"),n=require("./WorldPhysics-CueqwH91.cjs"),r=require("./CoreBridge-CnLqWZNv.cjs"),i=require("./id-DWiNl1ym.cjs"),a=require("./defaults-BLDQhn77.cjs"),o=require("./guards-FnxbNibY.cjs"),s=require("./useGenericRefs-CZ_HIQG_.cjs"),c=require("./ControllerWrapper-C6mzwejv.cjs"),l=require("./BlueprintFactory-D6FM31oL.cjs"),u=require("./blueprints-BHfyy363.cjs"),d=require("./Gamepad-BVhh5IfO.cjs");let f=require("three");f=e.n(f,1);let p=require("react");p=e.n(p,1);let m=require("@react-three/fiber"),h=require("react/jsx-runtime"),g=require("@react-three/rapier"),_=require("@react-three/drei");var v=new Map([[`melee`,`근접`],[`tank`,`방어형`],[`starter`,`기본`],[`magic`,`마법`],[`ranged`,`원거리`],[`fire`,`화염`],[`land`,`지상`],[`fast`,`고속`],[`small`,`소형`],[`custom`,`사용자 지정`]]),y=new Map([[`character`,`캐릭터`],[`vehicle`,`차량`],[`airplane`,`비행기`],[`animation-sequence`,`애니메이션 시퀀스`],[`behavior-tree`,`행동 트리`],[`animation`,`애니메이션`],[`behavior`,`행동`],[`item`,`아이템`]]),b={id:`식별자`,name:`이름`,description:`설명`,version:`버전`,tags:`태그`,type:`유형`,metadata:`추가 정보`,physics:`물리`,mass:`질량`,height:`높이`,radius:`반지름`,jumpForce:`점프 힘`,moveSpeed:`이동 속도`,runSpeed:`달리기 속도`,airControl:`공중 조작`,maxSpeed:`최고 속도`,acceleration:`가속`,braking:`제동`,turning:`회전`,lift:`양력`,drag:`항력`,suspension:`서스펜션`,animations:`애니메이션`,idle:`대기`,walk:`걷기`,run:`달리기`,jump:`점프`,start:`시작`,loop:`반복`,land:`착지`,combat:`전투`,special:`특수 동작`,moving:`이동`,flying:`비행`,wheels:`바퀴`,propeller:`프로펠러`,behaviors:`행동`,data:`데이터`,stats:`능력치`,health:`체력`,stamina:`지구력`,mana:`마나`,strength:`공격력`,defense:`방어력`,speed:`속도`,visuals:`외형`,parts:`구성 요소`,model:`모델`,textures:`텍스처`,materials:`재질`,scale:`크기`,camera:`카메라`,controls:`조작`,seats:`좌석`,position:`위치`,rotation:`회전`,isDriver:`운전석`,mode:`모드`,distance:`거리`,fov:`시야각`,smoothing:`보간`,enableCollision:`충돌 사용`,enableZoom:`확대 사용`,zoomSpeed:`확대 속도`,minZoom:`최소 확대`,maxZoom:`최대 확대`,enableKeyboard:`키보드 사용`,enableMouse:`마우스 사용`,enableGamepad:`게임패드 사용`,clickToMove:`클릭 이동`,keyMapping:`키 설정`,clips:`클립`,transitions:`전환`,duration:`길이`,file:`파일`,events:`이벤트`,time:`시간`,from:`시작`,to:`대상`,condition:`조건`,attack_light:`가벼운 공격`,attack_heavy:`강한 공격`,block:`막기`,parry:`받아치기`,cast_fireball:`화염구 시전`,cast_meteor:`운석 시전`,cast_firewall:`화염벽 시전`,channel:`집중 시전`,meditate:`명상`,teleport:`순간 이동`,initial:`초기 상태`,states:`상태 목록`,on:`이벤트 전환`,casting:`시전 중`,meditating:`명상 중`,MOVE:`이동 시작`,ATTACK:`공격`,STOP:`정지`,FINISH:`완료`,CAST:`시전`,MEDITATE:`명상 시작`,INTERRUPT:`중단`,stiffness:`강성`,damping:`감쇠`,restLength:`기본 길이`,maxTravel:`최대 변위`,url:`파일 경로`,color:`색상`,attachmentPoint:`장착 지점`},x=e=>e?.type===`character`;function S(e,t,n){let r={...n};for(let i of Object.keys(t))!Object.is(e[i],t[i])&&Object.is(n[i],t[i])&&(Object.prototype.hasOwnProperty.call(e,i)?r[i]=e[i]:delete r[i]);return r}function C({blueprint:e}){let t=e?u.r(e):``;return!x(e)||!t?(0,h.jsxs)(`div`,{className:`blueprint-preview blueprint-preview--empty`,role:`status`,children:[(0,h.jsx)(`strong`,{children:e?.name??`미리보기`}),(0,h.jsx)(`p`,{children:e?x(e)?`몸체 모델을 지정하면 3D 미리보기가 표시됩니다.`:`이 유형의 3D 미리보기는 아직 지원하지 않습니다. 속성은 편집할 수 있습니다.`:`블루프린트를 선택하면 미리보기가 표시됩니다.`})]}):(0,h.jsx)(w,{blueprint:e,modelUrl:t})}function w({blueprint:e,modelUrl:t}){let i=r.s(),o=(0,p.useRef)(null),l=r.o(e=>e.setUrls),u=r.o(e=>e.setCameraOption),v=r.o(e=>e.setMode),y=r.o(e=>e.mode),[b,C]=(0,p.useState)(20),w=x(e)?e.controls?.clickToMove??!0:!1,T=x(e)?e.controls?.enableKeyboard??!0:!1,E=x(e)?e.controls?.enableMouse??!0:!1,D=e.controls?.enableGamepad??!1,O=e.camera;return(0,p.useEffect)(()=>{let{physics:t,setPhysics:n}=i.getState(),r=e.physics.mass>0?e.physics.jumpForce/e.physics.mass:0;n({walkSpeed:e.physics.moveSpeed,runSpeed:e.physics.runSpeed,jumpSpeed:Number.isFinite(r)?Math.max(0,r):0});let a=i.getState().physics;return()=>{i.setState(e=>({physics:S(t,a,e.physics)}))}},[e.physics.moveSpeed,e.physics.runSpeed,e.physics.jumpForce,e.physics.mass,i]),(0,p.useEffect)(()=>{let{mode:e,cameraOption:t}=i.getState(),n=O??{};v({type:`character`,controller:D?`gamepad`:`keyboard`,control:n.mode||`thirdPerson`}),u({xDistance:n.distance?.x??b,yDistance:n.distance?.y??b*.5,zDistance:n.distance?.z??b,offset:new f.Vector3(0,0,0),enableCollision:n.enableCollision??!1,smoothing:n.smoothing||{position:.25,rotation:.3,fov:.2},fov:n.fov||50,zoom:1,enableZoom:n.enableZoom??!0,zoomSpeed:n.zoomSpeed??.001,minZoom:n.minZoom||.5,maxZoom:n.maxZoom||3,enableFocus:!1,bounds:{minY:2,maxY:50}});let{mode:r,cameraOption:a}=i.getState();return()=>{let n=i.getState();n.setMode(S(e,r,n.mode)),n.replaceCameraOption(S(t,a,n.cameraOption))}},[v,u,b,O,D,i]),(0,p.useEffect)(()=>{let e=i.getState().urls.characterUrl??``;return l({characterUrl:t}),()=>{i.getState().urls.characterUrl===t&&l({characterUrl:e})}},[t,l,i]),(0,p.useEffect)(()=>{let t=o.current;if(!t)return;let n=t=>{if(!E||e.camera?.enableZoom===!1)return;t.preventDefault();let n=t.deltaY*.01;C(e=>Math.max(10,Math.min(40,e+n)))};return t.addEventListener(`wheel`,n,{passive:!1}),()=>t.removeEventListener(`wheel`,n)},[e,E]),(0,h.jsxs)(`div`,{ref:o,className:`blueprint-preview`,children:[(0,h.jsxs)(m.Canvas,{shadows:!0,camera:{position:[0,10,20],fov:50},style:{width:`100%`,height:`100%`},children:[(0,h.jsx)(n.n,{}),(0,h.jsx)(s.n,{enableMouse:E}),(0,h.jsx)(_.Environment,{preset:`sunset`}),(0,h.jsx)(`ambientLight`,{intensity:.5}),(0,h.jsx)(`directionalLight`,{castShadow:!0,position:[20,30,10],intensity:.5,"shadow-mapSize":[1024,1024],"shadow-camera-near":1,"shadow-camera-far":120,"shadow-camera-top":90,"shadow-camera-right":90,"shadow-camera-bottom":-90,"shadow-camera-left":-90}),(0,h.jsxs)(n.t,{debug:!1,gravity:[0,-9.81,0],children:[e&&y?.type===`character`&&(0,h.jsx)(c.t,{enableKeyboard:T,controllerOptions:{lerp:{cameraTurn:.1,cameraPosition:.08}},rigidBodyProps:{lockRotations:!0},parts:!x(e)||!e.visuals?.parts?[]:e.visuals.parts.filter(e=>e.type!==`body`).map(e=>e.color?{url:e.url,color:e.color}:{url:e.url}),position:[0,1,0],rotation:(0,g.euler)({x:0,y:Math.PI,z:0})},`preview-${e.id}`),E&&w&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.i,{}),(0,h.jsx)(c.r,{})]}),(0,h.jsx)(g.RigidBody,{type:`fixed`,children:(0,h.jsxs)(`mesh`,{receiveShadow:!0,position:[0,-.5,0],children:[(0,h.jsx)(`boxGeometry`,{args:[100,1,100]}),(0,h.jsx)(`meshStandardMaterial`,{color:`#303030`})]})}),(0,h.jsx)(_.Grid,{renderOrder:-1,position:[0,.01,0],infiniteGrid:!0,cellSize:1,cellThickness:.5,cellColor:`#404040`,sectionSize:5,sectionThickness:1,sectionColor:`#606060`,fadeDistance:50,fadeStrength:1,followCamera:!1,userData:{intangible:!0}})]})]}),D&&(0,h.jsx)(`div`,{className:`blueprint-preview__gamepad`,role:`group`,"aria-label":`화면 조작 버튼`,children:(0,h.jsx)(d.t,{})}),e&&(0,h.jsxs)(`div`,{className:`blueprint-preview__info`,children:[(0,h.jsx)(`h4`,{className:`blueprint-preview__name`,children:e.name}),x(e)&&e.physics&&(0,h.jsxs)(`div`,{className:`blueprint-preview__stats`,children:[(0,h.jsxs)(`div`,{children:[`이동 속도: `,e.physics.moveSpeed]}),(0,h.jsxs)(`div`,{children:[`점프 힘: `,e.physics.jumpForce]})]}),(0,h.jsxs)(`div`,{className:`blueprint-preview__controls`,children:[(0,h.jsxs)(`div`,{children:[`카메라: `,x(e)?a.r.find(t=>t.value===(e.camera?.mode??`thirdPerson`))?.label??`사용자 지정`:`해당 없음`]}),(0,h.jsxs)(`div`,{children:[`키보드: `,T?`켜짐`:`꺼짐`]}),(0,h.jsxs)(`div`,{children:[`마우스: `,E?`켜짐`:`꺼짐`]}),(0,h.jsxs)(`div`,{children:[`클릭 이동: `,w?`켜짐`:`꺼짐`]})]})]})]})}var T=e=>{switch(e.type){case`animation-sequence`:return`animation`;case`behavior-tree`:return`behavior`;default:return e.type}},E=e=>({id:e.id,name:e.name,type:T(e),version:e.version,tags:e.tags||[],description:e.description??``,lastModified:new Date().toISOString().split(`T`)[0]??``}),D=(e,t,n)=>{if(t.length===0)return!1;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(!n)return!1;if(Array.isArray(r)){let e=Number(n);if(!Number.isInteger(e)||e<0||e>=r.length)return!1;let t=r[e],i=Array.isArray(t)?[...t]:o.r(t)?{...t}:void 0;if(!i)return!1;r[e]=i,r=i;continue}if(!o.r(r))return!1;let i=r[n],a=Array.isArray(i)?[...i]:o.r(i)?{...i}:void 0;if(!a)return!1;r[n]=a,r=a}let i=t[t.length-1];if(!i)return!1;if(Array.isArray(r)){let e=Number(i);return!Number.isInteger(e)||e<0||e>=r.length?!1:(r[e]=n,!0)}return o.r(r)?(r[i]=n,!0):!1},O=[{id:`characters`,name:`캐릭터`,type:`character`,count:0},{id:`vehicles`,name:`차량`,type:`vehicle`,count:0},{id:`airplanes`,name:`비행기`,type:`airplane`,count:0},{id:`animations`,name:`애니메이션`,type:`animation`,count:0},{id:`behaviors`,name:`행동`,type:`behavior`,count:0},{id:`items`,name:`아이템`,type:`item`,count:0}],k=({onClose:e})=>{let[n,r]=(0,p.useState)(`character`),[i,s]=(0,p.useState)(null),[c,d]=(0,p.useState)(``),[f,m]=(0,p.useState)(null),[g,_]=(0,p.useState)(!0),[x,S]=(0,p.useState)(!1),{spawnAtCursor:w,isSpawning:T}=u.n(),[k,A]=(0,p.useState)(!1),[j,M]=(0,p.useState)(()=>l.n.getAll().map(E)),N=(0,p.useMemo)(()=>{let e={character:0,vehicle:0,airplane:0,animation:0,behavior:0,item:0};return j.forEach(t=>{t.type in e&&e[t.type]++}),O.map(t=>({...t,count:e[t.type]})).filter(e=>e.count>0)},[j]),P=(0,p.useMemo)(()=>{let e=c.trim().toLowerCase();return j.filter(t=>{let r=t.type===n,i=e===``||t.name.toLowerCase().includes(e)||t.tags.some(t=>t.toLowerCase().includes(e)||v.get(t)?.includes(e));return r&&i})},[n,c,j]),F=(0,p.useCallback)((e,t)=>{S(!0),m(n=>{if(!n)return null;let r={...n};return D(r,e,t)?r:n})},[]),I=(0,p.useCallback)(e=>{if(A(!1),S(!1),s(e),e){let t=l.n.get(e);t&&m(JSON.parse(JSON.stringify(t)))}else m(null)},[]);(0,p.useEffect)(()=>{if(x)return;let e=P.some(e=>e.id===i);P[0]?.id&&P.length>0&&!e?I(P[0].id):P.length===0&&I(null)},[P,i,I,x]);let L=()=>{f&&(l.n.register(f),M(l.n.getAll().map(E)),S(!1))},R=async()=>{if(f){A(!1);try{L(),await w(f.id)?e():A(!0)}catch(e){t.t.error(`Blueprint spawn failed`,e instanceof Error?e:String(e)),A(!0)}}},z=(e,t,n)=>{let r=b[e]??e;return Array.isArray(t)?(0,h.jsxs)(`details`,{className:`blueprint-editor__inspector-group`,children:[(0,h.jsxs)(`summary`,{className:`blueprint-editor__inspector-title`,children:[r,` · `,t.length===0?`비어 있음`:`${t.length}개 항목`]}),t.map((e,t)=>z(`항목 ${t+1}`,e,[...n,String(t)]))]},n.join(`.`)):o.r(t)?(0,h.jsxs)(`div`,{className:`blueprint-editor__inspector-group`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__inspector-title`,children:r}),Object.entries(t).map(([e,t])=>z(e,t,[...n,e]))]},n.join(`.`)):typeof t==`boolean`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`button`,{className:`blueprint-editor__toggle ${t?`blueprint-editor__toggle--on`:``}`,onClick:()=>F(n,!t),"aria-pressed":t,children:t?`켜짐`:`꺼짐`})]},n.join(`.`)):typeof t==`number`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`input`,{type:`number`,value:t,onChange:e=>F(n,Number(e.target.value)),className:`blueprint-editor__inspector-input`})]},n.join(`.`)):n.length===2&&n[0]===`camera`&&e===`mode`&&typeof t==`string`?(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:`카메라 모드`}),(0,h.jsxs)(`select`,{value:t,onChange:e=>F(n,e.target.value),className:`blueprint-editor__inspector-input`,children:[!a.r.some(e=>e.value===t)&&(0,h.jsxs)(`option`,{value:t,children:[`사용자 지정 (`,t,`)`]}),a.r.map(e=>(0,h.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]},n.join(`.`)):(0,h.jsxs)(`label`,{className:`blueprint-editor__inspector-field`,children:[(0,h.jsx)(`span`,{children:r}),(0,h.jsx)(`input`,{type:`text`,value:typeof t==`string`?n.length===1&&e===`type`?y.get(t)??t:t:``,readOnly:n.length===1&&(e===`id`||e===`type`),onChange:e=>F(n,e.target.value),className:`blueprint-editor__inspector-input`})]},n.join(`.`))};return(0,h.jsxs)(`div`,{className:`blueprint-editor`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__sidebar`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__search`,children:(0,h.jsx)(`input`,{type:`text`,placeholder:`블루프린트 검색`,"aria-label":`블루프린트 검색`,disabled:x,value:c,onChange:e=>d(e.target.value),className:`blueprint-editor__search-input`})}),(0,h.jsx)(`div`,{className:`blueprint-editor__categories`,children:N.map(e=>(0,h.jsxs)(`button`,{"aria-pressed":n===e.type,disabled:x,onClick:()=>r(e.type),className:`blueprint-editor__category ${n===e.type?`active`:``}`,children:[(0,h.jsx)(`span`,{className:`blueprint-editor__category-name`,children:e.name}),(0,h.jsx)(`span`,{className:`blueprint-editor__category-count`,children:e.count})]},e.id))}),(0,h.jsxs)(`div`,{className:`blueprint-editor__list`,children:[P.map(e=>(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":i===e.id,disabled:x,onClick:()=>I(e.id),className:`blueprint-editor__item ${i===e.id?`active`:``}`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__item-name`,children:e.name}),(0,h.jsx)(`div`,{className:`blueprint-editor__item-tags`,children:e.tags.map(e=>(0,h.jsx)(`span`,{className:`blueprint-editor__tag`,children:v.get(e)??e},e))})]},e.id)),P.length===0&&(0,h.jsx)(`p`,{className:`blueprint-editor__empty`,children:`조건에 맞는 블루프린트가 없습니다.`})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__actions`,children:[k&&(0,h.jsx)(`p`,{role:`alert`,className:`blueprint-editor__spawn-error`,children:`생성하지 못했습니다. 월드가 준비되어 있는지 확인한 뒤 다시 시도해 주세요.`}),(0,h.jsx)(`button`,{onClick:L,disabled:!x||!f||T,className:`blueprint-editor__spawn-button`,children:`변경 적용`}),x&&(0,h.jsx)(`button`,{type:`button`,onClick:()=>I(i),disabled:T,className:`blueprint-editor__cancel-button`,children:`변경 취소`}),(0,h.jsx)(`p`,{className:`blueprint-editor__empty`,children:x?`다른 항목으로 이동하려면 변경 사항을 적용하거나 취소해 주세요.`:`변경 사항은 현재 세션에 적용됩니다. 생성 시에도 함께 적용합니다.`}),(0,h.jsx)(`button`,{onClick:R,disabled:!i||T,className:`blueprint-editor__spawn-button`,children:T?`생성 중...`:`엔티티 생성`})]})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__main`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__preview-section`,children:[(0,h.jsxs)(`div`,{className:`blueprint-editor__preview-header`,children:[(0,h.jsx)(`h3`,{className:`blueprint-editor__preview-title`,children:`미리보기`}),(0,h.jsx)(`button`,{onClick:()=>_(!g),className:`blueprint-editor__preview-toggle`,children:g?`숨기기`:`보기`})]}),g&&(0,h.jsx)(`div`,{className:`blueprint-editor__preview-container`,children:(0,h.jsx)(C,{blueprint:f},f?f.id:`no-blueprint`)})]}),(0,h.jsxs)(`div`,{className:`blueprint-editor__inspector-section`,children:[(0,h.jsx)(`div`,{className:`blueprint-editor__preview-header`,children:(0,h.jsx)(`h3`,{className:`blueprint-editor__preview-title`,children:`속성`})}),(0,h.jsx)(`div`,{className:`blueprint-editor__inspector`,children:f?Object.entries(f).map(([e,t])=>z(e,t,[e])):(0,h.jsx)(`div`,{className:`blueprint-editor__empty`,children:`블루프린트를 선택하세요.`})})]})]})]})},A=(e,t,n)=>{if(t.length===0)return!1;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(!n)return!1;if(Array.isArray(r)){let e=Number(n);if(!Number.isInteger(e)||e<0||e>=r.length)return!1;r=r[e];continue}if(!o.r(r))return!1;r=r[n]}let i=t[t.length-1];if(!i)return!1;if(Array.isArray(r)){let e=Number(i);return!Number.isInteger(e)||e<0||e>=r.length?!1:(r[e]=n,!0)}return o.r(r)?(r[i]=n,!0):!1},j=[{id:`characters`,name:`캐릭터`,type:`character`,count:0},{id:`vehicles`,name:`차량`,type:`vehicle`,count:0},{id:`airplanes`,name:`비행기`,type:`airplane`,count:0},{id:`animations`,name:`애니메이션`,type:`animation`,count:0},{id:`behaviors`,name:`행동`,type:`behavior`,count:0},{id:`items`,name:`아이템`,type:`item`,count:0}],M=({className:e=``,style:t,children:n})=>{let[r,a]=(0,p.useState)(`character`),[s,c]=(0,p.useState)(null),[d,f]=(0,p.useState)(``),[m,g]=(0,p.useState)(!1),[_,x]=(0,p.useState)(null),[S,C]=(0,p.useState)(!1),{spawnAtCursor:w,isSpawning:T}=u.n(),[D,O]=(0,p.useState)(()=>l.n.getAll().map(E)),k=(0,p.useMemo)(()=>{let e={character:0,vehicle:0,airplane:0,animation:0,behavior:0,item:0};return D.forEach(t=>{t.type in e&&e[t.type]++}),j.map(t=>({...t,count:e[t.type]}))},[D]),M=(0,p.useMemo)(()=>{let e=d.trim().toLowerCase();return D.filter(t=>{let n=t.type===r,i=e===``||t.name.toLowerCase().includes(e)||t.tags.some(t=>t.toLowerCase().includes(e)||v.get(t)?.includes(e));return n&&i})},[r,d,D]),N=e=>{c(e);let t=l.n.get(e);t&&x(JSON.parse(JSON.stringify(t)))},P=()=>{g(!0)},F=()=>{_&&(l.n.register(_),O(l.n.getAll().map(E)),g(!1),C(!1),N(_.id))},I=()=>{if(g(!1),C(!1),S){c(null),x(null);return}if(s){let e=l.n.get(s);e&&x(JSON.parse(JSON.stringify(e)))}},L=()=>{if(![`character`,`vehicle`,`airplane`].includes(r))return;let e,t={id:i.t(`custom-${r}`),name:`새 ${j.find(e=>e.type===r)?.name}`,version:`1.0.0`,tags:[`custom`],description:`사용자 지정 블루프린트`};switch(r){case`vehicle`:e={...t,type:`vehicle`,physics:{mass:1e3,maxSpeed:30,acceleration:10,braking:15,turning:2},seats:[{position:[0,1,0],isDriver:!0}],animations:{idle:``}};break;case`airplane`:e={...t,type:`airplane`,physics:{mass:2e3,maxSpeed:100,acceleration:20,turning:1,lift:50,drag:10},seats:[{position:[0,1,2],isDriver:!0}],animations:{idle:``}};break;default:e={...t,type:`character`,physics:{mass:70,height:1.8,radius:.3,jumpForce:300,moveSpeed:5,runSpeed:10,airControl:.2},animations:{idle:``,walk:``,run:``,jump:{start:``,loop:``,land:``}},stats:{health:100,stamina:50,strength:10,defense:10,speed:10}}}x(e),c(e.id),C(!0),g(!0)},R=(e,t)=>{if(!_)return;let n=JSON.parse(JSON.stringify(_));A(n,e,t)&&x(n)},z=(e,t=[])=>{let n=[];return Object.entries(e).forEach(([e,r])=>{let i=b[e]??e,a=[...t,e],s=a.join(`.`);e===`id`||e===`type`?n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:`text`,value:t.length===0&&e===`type`?y.get(r)??r:r,disabled:!0,"aria-label":i,className:`property-editor__input property-editor__input--disabled`})]},s)):o.r(r)?n.push((0,h.jsxs)(`div`,{className:`property-editor__group`,children:[(0,h.jsxs)(`div`,{className:`property-editor__group-title editor-text`,children:[i,`:`]}),(0,h.jsx)(`div`,{className:`property-editor__group-content`,children:z(r,a)})]},s)):Array.isArray(r)?r.length>0&&r.every(e=>o.r(e))?n.push((0,h.jsxs)(`div`,{className:`property-editor__group`,children:[(0,h.jsxs)(`div`,{className:`property-editor__group-title editor-text`,children:[i,`:`]}),(0,h.jsx)(`div`,{className:`property-editor__group-content`,children:r.map((e,t)=>(0,h.jsxs)(`div`,{className:`property-editor__array-item`,children:[(0,h.jsxs)(`div`,{className:`property-editor__array-item-title editor-text-small`,children:[`항목 `,t+1]}),z(e,[...a,t.toString()])]},`${s}.${t}`))})]},s)):n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:`text`,value:r.join(`, `),onChange:e=>R(a,e.target.value.split(`,`).map(e=>e.trim())),"aria-label":i,className:`property-editor__input`})]},s)):typeof r==`boolean`?n.push((0,h.jsx)(`div`,{className:`property-editor__field`,children:(0,h.jsxs)(`label`,{className:`property-editor__checkbox-label editor-text-small`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>R(a,e.target.checked),className:`property-editor__checkbox`}),i]})},s)):n.push((0,h.jsxs)(`div`,{className:`property-editor__field`,children:[(0,h.jsxs)(`label`,{className:`property-editor__label editor-text-small`,children:[i,`:`]}),(0,h.jsx)(`input`,{type:typeof r==`number`?`number`:`text`,value:r,onChange:e=>R(a,typeof r==`number`?Number(e.target.value):e.target.value),"aria-label":i,className:`property-editor__input`})]},s))}),n};return(0,h.jsxs)(`div`,{className:`blueprint-panel ${e}`,style:t,children:[(0,h.jsx)(`h3`,{className:`editor-title`,children:`블루프린트 라이브러리`}),(0,h.jsx)(`div`,{className:`blueprint-panel__toolbar`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__search-container`,children:[(0,h.jsx)(`input`,{type:`text`,placeholder:`블루프린트 검색`,"aria-label":`블루프린트 검색`,value:d,onChange:e=>f(e.target.value),className:`blueprint-panel__search-input`}),(0,h.jsx)(`button`,{onClick:L,disabled:m||![`character`,`vehicle`,`airplane`].includes(r),className:`blueprint-panel__button blueprint-panel__button--primary`,children:`+ 새 블루프린트`})]})}),(0,h.jsx)(`div`,{className:`blueprint-panel__categories`,children:k.map(e=>(0,h.jsxs)(`button`,{"aria-pressed":r===e.type,disabled:m,onClick:()=>a(e.type),className:`blueprint-panel__category-button ${r===e.type?`blueprint-panel__category-button--active`:``}`,children:[(0,h.jsx)(`span`,{children:e.name}),(0,h.jsxs)(`span`,{children:[`(`,e.count,`)`]})]},e.id))}),m?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`blueprint-panel__property-editor-container editor-scrollbar`,children:_&&(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h4`,{className:`blueprint-panel__property-editor-title editor-text`,children:S?`새 블루프린트 만들기`:`편집: ${_.name}`}),z(_)]})}),(0,h.jsx)(`div`,{className:`blueprint-panel__footer`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__footer-buttons`,children:[(0,h.jsx)(`button`,{onClick:F,className:`blueprint-panel__button blueprint-panel__button--primary`,children:S?`만들기`:`적용`}),(0,h.jsx)(`button`,{onClick:I,className:`blueprint-panel__button blueprint-panel__button--danger`,children:`취소`})]})})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`blueprint-panel__list editor-scrollbar`,children:M.length===0?(0,h.jsx)(`div`,{className:`blueprint-panel__empty-message editor-text-small`,children:`조건에 맞는 블루프린트가 없습니다.`}):M.map(e=>(0,h.jsx)(`button`,{type:`button`,"aria-pressed":s===e.id,onClick:()=>N(e.id),className:`blueprint-panel__list-item ${s===e.id?`blueprint-panel__list-item--selected`:``}`,children:(0,h.jsxs)(`span`,{className:`list-item__content`,children:[(0,h.jsxs)(`span`,{className:`list-item__text-content`,children:[(0,h.jsx)(`span`,{className:`list-item__name editor-text`,children:e.name}),(0,h.jsx)(`span`,{className:`list-item__description editor-text-small`,children:e.description}),(0,h.jsx)(`span`,{className:`list-item__tags`,children:e.tags.map(e=>(0,h.jsx)(`span`,{className:`list-item__tag editor-text-small`,children:v.get(e)??e},e))})]}),(0,h.jsxs)(`span`,{className:`list-item__meta editor-text-small`,children:[(0,h.jsxs)(`span`,{children:[`v`,e.version]}),(0,h.jsx)(`span`,{children:e.lastModified})]})]})},e.id))}),s&&(0,h.jsx)(`div`,{className:`blueprint-panel__footer`,children:(0,h.jsxs)(`div`,{className:`blueprint-panel__footer-buttons`,children:[(0,h.jsx)(`button`,{onClick:P,className:`blueprint-panel__button blueprint-panel__button--secondary`,children:`블루프린트 편집`}),(0,h.jsx)(`button`,{onClick:async()=>{s&&await w(s)},disabled:T,className:`blueprint-panel__button blueprint-panel__button--primary`,children:T?`생성 중...`:`엔티티 생성`})]})})]}),n]})};exports.BlueprintEditor=k,exports.BlueprintPanel=M,exports.BlueprintPreview=C;
@@ -4,12 +4,12 @@ import { o as r, s as i } from "./CoreBridge-DdJBUxmY.js";
4
4
  import { t as a } from "./id-_cdNn144.js";
5
5
  import { r as o } from "./defaults-jVT3EUVe.js";
6
6
  import { r as s } from "./guards-DxYgyyOk.js";
7
- import { n as c } from "./useGenericRefs-8NKwNG7N.js";
8
- import { i as l, r as u, t as d } from "./ControllerWrapper-jGqlqLgR.js";
7
+ import { n as c } from "./useGenericRefs-D0cOKidj.js";
8
+ import { i as l, r as u, t as d } from "./ControllerWrapper-Bc_pRQSv.js";
9
9
  import { n as f } from "./BlueprintFactory-D9JM9lZh.js";
10
10
  import { n as p, r as m } from "./blueprints-BlhgrXDo.js";
11
- import { t as h } from "./Gamepad-D1PJuBvE.js";
12
- import { t as g } from "./legacyDrei-DIgQmWEr.js";
11
+ import { t as h } from "./Gamepad-DpCgazVm.js";
12
+ import { t as g } from "./legacyDrei-B6cWIHbX.js";
13
13
  import * as _ from "three";
14
14
  import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
15
15
  import { Canvas as C } from "@react-three/fiber";
package/dist/building.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useClicker-0Ln5ZSz0.cjs"),t=require("./WorldProps-L3Izutxz.cjs"),n=require("./plugin-epk5BZCz.cjs");exports.BUILDING_BASIC_OBJECT_OPTIONS=e.Yt,exports.BUILDING_FLAG_STYLE_OPTIONS=e.Xt,exports.BUILDING_PLACED_OBJECT_OPTIONS=e.Zt,exports.BUILDING_STORE_SERVICE=e.Vt,exports.BUILDING_TILE_GROUP_DRAG_TYPE=e.Qt,exports.BUILDING_TILE_OBJECT_OPTIONS=e.$t,exports.BUILDING_TILE_PRESETS=e.en,exports.BUILDING_TILE_PRESET_DRAG_TYPE=e.tn,exports.BUILDING_TILE_SHAPE_OPTIONS=e.nn,exports.BUILDING_TREE_COLOR_PRESETS=e.rn,exports.BUILDING_TREE_OPTIONS=e.in,exports.BUILDING_WALL_KIND_OPTIONS=e.an,exports.BUILDING_WALL_PRESETS=e.on,exports.BUILDING_WEATHER_EFFECT_OPTIONS=e.sn,exports.BUILDING_WORLD_SURFACE_OPTIONS=e.cn,exports.Billboard=n.U,exports.BlockSystem=n.K,exports.BuildingController=n.h,exports.BuildingGpuCullingDriver=n.f,exports.BuildingGpuMirrorDriver=n.m,exports.BuildingGpuUploadDriver=n.p,exports.BuildingIndirectArgsUploadDriver=n.u,exports.BuildingIndirectDrawDriver=n.d,exports.BuildingNavigationObstacleDriver=n.tt,exports.BuildingRenderStateDriver=n._,exports.BuildingSystem=n.x,exports.BuildingUI=n.s,exports.BuildingVisibilityDriver=n.g,exports.DEFAULT_BUILDING_GRID_EXTENSION_ID=n.t,exports.DEFAULT_BUILDING_OBJECT_CATALOG=n.rt,exports.DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID=n.n,exports.DEFAULT_BUILDING_SAVE_EXTENSION_ID=n.r,exports.DEFAULT_BUILDING_STORE_SERVICE_ID=n.i,exports.DRAW_CLUSTER_BILLBOARD=t.rt,exports.DRAW_CLUSTER_BLOCK=t.it,exports.DRAW_CLUSTER_COUNT=t.at,exports.DRAW_CLUSTER_DESCRIPTORS=t.Z,exports.DRAW_CLUSTER_FIRE=t.ot,exports.DRAW_CLUSTER_FLAG=t.st,exports.DRAW_CLUSTER_GRASS=t.ct,exports.DRAW_CLUSTER_MODEL=t.lt,exports.DRAW_CLUSTER_SAKURA=t.ut,exports.DRAW_CLUSTER_SAND=t.dt,exports.DRAW_CLUSTER_SNOWFIELD=t.ft,exports.DRAW_CLUSTER_TILE=t.pt,exports.DRAW_CLUSTER_WALL=t.mt,exports.DRAW_CLUSTER_WATER=t.ht,exports.FLAG_STYLE_META=e.ln,exports.Fire=n.H,exports.GPU_META_STRIDE=t.K,exports.GPU_SPATIAL_STRIDE=t.q,exports.GpuBatchBridge=n.J,exports.Grass=n.O,exports.GrassDriver=n.z,exports.GrassManagerProvider=n.B,exports.GridHelper=n.W,exports.INDIRECT_DRAW_STRIDE=t.Q,exports.MaterialManager=n.q,exports.Sakura=n.L,exports.SakuraBatch=n.R,exports.Sand=n.E,exports.SandBatch=n.D,exports.Snow=n.I,exports.Snowfield=n.w,exports.SnowfieldBatch=n.T,exports.TileSystem=n.C,exports.WallSystem=n.S,exports.Water=n.A,exports.applyBuildingNavigationObstacles=n.nt,exports.blockToPlacementEntry=e.un,exports.buildBuildingGpuMirror=t.J,exports.buildBuildingIndirectDrawMirror=t.$,exports.buildingCellToWorld=e.dn,exports.buildingGridAdapter=e.fn,exports.buildingGroupsToPlacementEntries=e.pn,exports.buildingPlacementAdapter=e.mn,exports.buildingPlugin=n.a,exports.cellToTilePosition=e.hn,exports.createBlockFootprint=e.gn,exports.createBuildingCullingStore=t.Ct,exports.createBuildingGpuUploadPlan=t.Y,exports.createBuildingIndirectDrawUploadPlan=t.et,exports.createBuildingPlacementEngine=e._n,exports.createBuildingPlugin=n.o,exports.createBuildingRenderStore=t.R,exports.createBuildingScopeId=n.l,exports.createBuildingStore=e.Ht,exports.createBuildingVisibilityStore=t.F,exports.createCustomMeshId=n.c,exports.createEmptyBuildingGpuUploadResources=t.V,exports.createEmptyBuildingIndirectDrawMirror=t.tt,exports.createEmptyGpuMirror=t.X,exports.createGrassManager=t.Et,exports.createShoreField=n.M,exports.createTerrainBlockMaterial=n.v,exports.createTileFootprint=e.vn,exports.createTileSampler=n.Z,exports.destroyBuildingGpuUploadResources=t.H,exports.edgeKey=e.yn,exports.edgeSideToWallRotation=e.bn,exports.edgeToWallTransform=e.xn,exports.findTerrainBlockMaterial=n.y,exports.getBlockSupportHeight=e.Sn,exports.getBuildingSupportHeight=e.Cn,exports.getDefaultBuildingObject=n.it,exports.getDrawClusterForSnapshotEntry=t.gt,exports.getGrassManager=t.Dt,exports.getIndirectInstanceCount=t.nt,exports.getTileSupportHeight=e.wn,exports.getWallMaterialKey=n.G,exports.getWebGPUDeviceFromRenderer=t.U,exports.hasTileCollision=e.Tn,exports.hasWallCollision=e.En,exports.indexAabb=e.Dn,exports.normalizeQuarterTurnRotation=e.On,exports.pair=e.kn,exports.parseBuildingGpuVisibilityFlags=t._t,exports.queryAabbIds=e.An,exports.snapBuildingPosition=e.jn,exports.supportsGpuInstanceBatches=n.Y,exports.syncBuildingGpuBuffers=t.W,exports.syncBuildingIndirectArgsBuffer=t.G,exports.tileFootprintKeys=e.Mn,exports.tileGroupToPlacementEntries=e.Nn,exports.tileHalfSize=e.Pn,exports.tileOverlaps=e.Fn,exports.tilePositionToCell=e.In,exports.tileToPlacementEntry=e.Ln,exports.unindexId=e.Rn,exports.useBuildingEditor=n.b,exports.useBuildingGpuCullingStore=t.wt,exports.useBuildingGpuCullingStoreApi=t.Tt,exports.useBuildingRenderStateStore=t.z,exports.useBuildingRenderStateStoreApi=t.B,exports.useBuildingStore=e.Ut,exports.useBuildingStoreApi=e.Wt,exports.useBuildingVisibilityStore=t.I,exports.useBuildingVisibilityStoreApi=t.L,exports.useGrassManager=n.V,exports.useShoreField=n.j,exports.wallGroupToPlacementEntries=e.zn,exports.wallToPlacementEntry=e.Bn,exports.wallTransformToEdge=e.Vn,exports.worldToBuildingCell=e.Hn,exports.zigZag=e.Un;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useClicker-0Ln5ZSz0.cjs"),t=require("./WorldProps-L3Izutxz.cjs"),n=require("./plugin-BUKo4q0N.cjs");exports.BUILDING_BASIC_OBJECT_OPTIONS=e.Yt,exports.BUILDING_FLAG_STYLE_OPTIONS=e.Xt,exports.BUILDING_PLACED_OBJECT_OPTIONS=e.Zt,exports.BUILDING_STORE_SERVICE=e.Vt,exports.BUILDING_TILE_GROUP_DRAG_TYPE=e.Qt,exports.BUILDING_TILE_OBJECT_OPTIONS=e.$t,exports.BUILDING_TILE_PRESETS=e.en,exports.BUILDING_TILE_PRESET_DRAG_TYPE=e.tn,exports.BUILDING_TILE_SHAPE_OPTIONS=e.nn,exports.BUILDING_TREE_COLOR_PRESETS=e.rn,exports.BUILDING_TREE_OPTIONS=e.in,exports.BUILDING_WALL_KIND_OPTIONS=e.an,exports.BUILDING_WALL_PRESETS=e.on,exports.BUILDING_WEATHER_EFFECT_OPTIONS=e.sn,exports.BUILDING_WORLD_SURFACE_OPTIONS=e.cn,exports.Billboard=n.U,exports.BlockSystem=n.K,exports.BuildingController=n.h,exports.BuildingGpuCullingDriver=n.f,exports.BuildingGpuMirrorDriver=n.m,exports.BuildingGpuUploadDriver=n.p,exports.BuildingIndirectArgsUploadDriver=n.u,exports.BuildingIndirectDrawDriver=n.d,exports.BuildingNavigationObstacleDriver=n.tt,exports.BuildingRenderStateDriver=n._,exports.BuildingSystem=n.x,exports.BuildingUI=n.s,exports.BuildingVisibilityDriver=n.g,exports.DEFAULT_BUILDING_GRID_EXTENSION_ID=n.t,exports.DEFAULT_BUILDING_OBJECT_CATALOG=n.rt,exports.DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID=n.n,exports.DEFAULT_BUILDING_SAVE_EXTENSION_ID=n.r,exports.DEFAULT_BUILDING_STORE_SERVICE_ID=n.i,exports.DRAW_CLUSTER_BILLBOARD=t.rt,exports.DRAW_CLUSTER_BLOCK=t.it,exports.DRAW_CLUSTER_COUNT=t.at,exports.DRAW_CLUSTER_DESCRIPTORS=t.Z,exports.DRAW_CLUSTER_FIRE=t.ot,exports.DRAW_CLUSTER_FLAG=t.st,exports.DRAW_CLUSTER_GRASS=t.ct,exports.DRAW_CLUSTER_MODEL=t.lt,exports.DRAW_CLUSTER_SAKURA=t.ut,exports.DRAW_CLUSTER_SAND=t.dt,exports.DRAW_CLUSTER_SNOWFIELD=t.ft,exports.DRAW_CLUSTER_TILE=t.pt,exports.DRAW_CLUSTER_WALL=t.mt,exports.DRAW_CLUSTER_WATER=t.ht,exports.FLAG_STYLE_META=e.ln,exports.Fire=n.H,exports.GPU_META_STRIDE=t.K,exports.GPU_SPATIAL_STRIDE=t.q,exports.GpuBatchBridge=n.J,exports.Grass=n.O,exports.GrassDriver=n.z,exports.GrassManagerProvider=n.B,exports.GridHelper=n.W,exports.INDIRECT_DRAW_STRIDE=t.Q,exports.MaterialManager=n.q,exports.Sakura=n.L,exports.SakuraBatch=n.R,exports.Sand=n.E,exports.SandBatch=n.D,exports.Snow=n.I,exports.Snowfield=n.w,exports.SnowfieldBatch=n.T,exports.TileSystem=n.C,exports.WallSystem=n.S,exports.Water=n.A,exports.applyBuildingNavigationObstacles=n.nt,exports.blockToPlacementEntry=e.un,exports.buildBuildingGpuMirror=t.J,exports.buildBuildingIndirectDrawMirror=t.$,exports.buildingCellToWorld=e.dn,exports.buildingGridAdapter=e.fn,exports.buildingGroupsToPlacementEntries=e.pn,exports.buildingPlacementAdapter=e.mn,exports.buildingPlugin=n.a,exports.cellToTilePosition=e.hn,exports.createBlockFootprint=e.gn,exports.createBuildingCullingStore=t.Ct,exports.createBuildingGpuUploadPlan=t.Y,exports.createBuildingIndirectDrawUploadPlan=t.et,exports.createBuildingPlacementEngine=e._n,exports.createBuildingPlugin=n.o,exports.createBuildingRenderStore=t.R,exports.createBuildingScopeId=n.l,exports.createBuildingStore=e.Ht,exports.createBuildingVisibilityStore=t.F,exports.createCustomMeshId=n.c,exports.createEmptyBuildingGpuUploadResources=t.V,exports.createEmptyBuildingIndirectDrawMirror=t.tt,exports.createEmptyGpuMirror=t.X,exports.createGrassManager=t.Et,exports.createShoreField=n.M,exports.createTerrainBlockMaterial=n.v,exports.createTileFootprint=e.vn,exports.createTileSampler=n.Z,exports.destroyBuildingGpuUploadResources=t.H,exports.edgeKey=e.yn,exports.edgeSideToWallRotation=e.bn,exports.edgeToWallTransform=e.xn,exports.findTerrainBlockMaterial=n.y,exports.getBlockSupportHeight=e.Sn,exports.getBuildingSupportHeight=e.Cn,exports.getDefaultBuildingObject=n.it,exports.getDrawClusterForSnapshotEntry=t.gt,exports.getGrassManager=t.Dt,exports.getIndirectInstanceCount=t.nt,exports.getTileSupportHeight=e.wn,exports.getWallMaterialKey=n.G,exports.getWebGPUDeviceFromRenderer=t.U,exports.hasTileCollision=e.Tn,exports.hasWallCollision=e.En,exports.indexAabb=e.Dn,exports.normalizeQuarterTurnRotation=e.On,exports.pair=e.kn,exports.parseBuildingGpuVisibilityFlags=t._t,exports.queryAabbIds=e.An,exports.snapBuildingPosition=e.jn,exports.supportsGpuInstanceBatches=n.Y,exports.syncBuildingGpuBuffers=t.W,exports.syncBuildingIndirectArgsBuffer=t.G,exports.tileFootprintKeys=e.Mn,exports.tileGroupToPlacementEntries=e.Nn,exports.tileHalfSize=e.Pn,exports.tileOverlaps=e.Fn,exports.tilePositionToCell=e.In,exports.tileToPlacementEntry=e.Ln,exports.unindexId=e.Rn,exports.useBuildingEditor=n.b,exports.useBuildingGpuCullingStore=t.wt,exports.useBuildingGpuCullingStoreApi=t.Tt,exports.useBuildingRenderStateStore=t.z,exports.useBuildingRenderStateStoreApi=t.B,exports.useBuildingStore=e.Ut,exports.useBuildingStoreApi=e.Wt,exports.useBuildingVisibilityStore=t.I,exports.useBuildingVisibilityStoreApi=t.L,exports.useGrassManager=n.V,exports.useShoreField=n.j,exports.wallGroupToPlacementEntries=e.zn,exports.wallToPlacementEntry=e.Bn,exports.wallTransformToEdge=e.Vn,exports.worldToBuildingCell=e.Hn,exports.zigZag=e.Un;
package/dist/building.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { $t as e, An as t, Bn as n, Cn as r, Dn as i, En as a, Fn as o, Hn as s, Ht as c, In as l, Ln as u, Mn as d, Nn as f, On as p, Pn as m, Qt as h, Rn as g, Sn as _, Tn as v, Un as y, Ut as b, Vn as x, Vt as S, Wt as C, Xt as w, Yt as T, Zt as E, _n as D, an as O, bn as k, cn as A, dn as j, en as M, fn as N, gn as P, hn as F, in as I, jn as L, kn as R, ln as z, mn as B, nn as V, on as H, pn as U, rn as W, sn as G, tn as K, un as q, vn as J, wn as Y, xn as X, yn as Z, zn as Q } from "./useClicker-DZrb1I0b.js";
2
2
  import { $, B as ee, Ct as te, Dt as ne, Et as re, F as ie, G as ae, H as oe, I as se, J as ce, K as le, L as ue, Q as de, R as fe, Tt as pe, U as me, V as he, W as ge, X as _e, Y as ve, Z as ye, _t as be, at as xe, ct as Se, dt as Ce, et as we, ft as Te, gt as Ee, ht as De, it as Oe, lt as ke, mt as Ae, nt as je, ot as Me, pt as Ne, q as Pe, rt as Fe, st as Ie, tt as Le, ut as Re, wt as ze, z as Be } from "./WorldProps-CQrtF4CO.js";
3
- import { A as Ve, B as He, C as Ue, D as We, E as Ge, G as Ke, H as qe, I as Je, J as Ye, K as Xe, L as Ze, M as Qe, O as $e, R as et, S as tt, T as nt, U as rt, V as it, W as at, Y as ot, Z as st, _ as ct, a as lt, b as ut, c as dt, d as ft, f as pt, g as mt, h as ht, i as gt, it as _t, j as vt, l as yt, m as bt, n as xt, nt as St, o as Ct, p as wt, q as Tt, r as Et, rt as Dt, s as Ot, t as kt, tt as At, u as jt, v as Mt, w as Nt, x as Pt, y as Ft, z as It } from "./plugin-KFnkRLsd.js";
3
+ import { A as Ve, B as He, C as Ue, D as We, E as Ge, G as Ke, H as qe, I as Je, J as Ye, K as Xe, L as Ze, M as Qe, O as $e, R as et, S as tt, T as nt, U as rt, V as it, W as at, Y as ot, Z as st, _ as ct, a as lt, b as ut, c as dt, d as ft, f as pt, g as mt, h as ht, i as gt, it as _t, j as vt, l as yt, m as bt, n as xt, nt as St, o as Ct, p as wt, q as Tt, r as Et, rt as Dt, s as Ot, t as kt, tt as At, u as jt, v as Mt, w as Nt, x as Pt, y as Ft, z as It } from "./plugin-Dsf9EwPP.js";
4
4
  export { T as BUILDING_BASIC_OBJECT_OPTIONS, w as BUILDING_FLAG_STYLE_OPTIONS, E as BUILDING_PLACED_OBJECT_OPTIONS, S as BUILDING_STORE_SERVICE, h as BUILDING_TILE_GROUP_DRAG_TYPE, e as BUILDING_TILE_OBJECT_OPTIONS, M as BUILDING_TILE_PRESETS, K as BUILDING_TILE_PRESET_DRAG_TYPE, V as BUILDING_TILE_SHAPE_OPTIONS, W as BUILDING_TREE_COLOR_PRESETS, I as BUILDING_TREE_OPTIONS, O as BUILDING_WALL_KIND_OPTIONS, H as BUILDING_WALL_PRESETS, G as BUILDING_WEATHER_EFFECT_OPTIONS, A as BUILDING_WORLD_SURFACE_OPTIONS, rt as Billboard, Xe as BlockSystem, ht as BuildingController, pt as BuildingGpuCullingDriver, bt as BuildingGpuMirrorDriver, wt as BuildingGpuUploadDriver, jt as BuildingIndirectArgsUploadDriver, ft as BuildingIndirectDrawDriver, At as BuildingNavigationObstacleDriver, ct as BuildingRenderStateDriver, Pt as BuildingSystem, Ot as BuildingUI, mt as BuildingVisibilityDriver, kt as DEFAULT_BUILDING_GRID_EXTENSION_ID, Dt as DEFAULT_BUILDING_OBJECT_CATALOG, xt as DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID, Et as DEFAULT_BUILDING_SAVE_EXTENSION_ID, gt as DEFAULT_BUILDING_STORE_SERVICE_ID, Fe as DRAW_CLUSTER_BILLBOARD, Oe as DRAW_CLUSTER_BLOCK, xe as DRAW_CLUSTER_COUNT, ye as DRAW_CLUSTER_DESCRIPTORS, Me as DRAW_CLUSTER_FIRE, Ie as DRAW_CLUSTER_FLAG, Se as DRAW_CLUSTER_GRASS, ke as DRAW_CLUSTER_MODEL, Re as DRAW_CLUSTER_SAKURA, Ce as DRAW_CLUSTER_SAND, Te as DRAW_CLUSTER_SNOWFIELD, Ne as DRAW_CLUSTER_TILE, Ae as DRAW_CLUSTER_WALL, De as DRAW_CLUSTER_WATER, z as FLAG_STYLE_META, qe as Fire, le as GPU_META_STRIDE, Pe as GPU_SPATIAL_STRIDE, Ye as GpuBatchBridge, $e as Grass, It as GrassDriver, He as GrassManagerProvider, at as GridHelper, de as INDIRECT_DRAW_STRIDE, Tt as MaterialManager, Ze as Sakura, et as SakuraBatch, Ge as Sand, We as SandBatch, Je as Snow, Nt as Snowfield, nt as SnowfieldBatch, Ue as TileSystem, tt as WallSystem, Ve as Water, St as applyBuildingNavigationObstacles, q as blockToPlacementEntry, ce as buildBuildingGpuMirror, $ as buildBuildingIndirectDrawMirror, j as buildingCellToWorld, N as buildingGridAdapter, U as buildingGroupsToPlacementEntries, B as buildingPlacementAdapter, lt as buildingPlugin, F as cellToTilePosition, P as createBlockFootprint, te as createBuildingCullingStore, ve as createBuildingGpuUploadPlan, we as createBuildingIndirectDrawUploadPlan, D as createBuildingPlacementEngine, Ct as createBuildingPlugin, fe as createBuildingRenderStore, yt as createBuildingScopeId, c as createBuildingStore, ie as createBuildingVisibilityStore, dt as createCustomMeshId, he as createEmptyBuildingGpuUploadResources, Le as createEmptyBuildingIndirectDrawMirror, _e as createEmptyGpuMirror, re as createGrassManager, Qe as createShoreField, Mt as createTerrainBlockMaterial, J as createTileFootprint, st as createTileSampler, oe as destroyBuildingGpuUploadResources, Z as edgeKey, k as edgeSideToWallRotation, X as edgeToWallTransform, Ft as findTerrainBlockMaterial, _ as getBlockSupportHeight, r as getBuildingSupportHeight, _t as getDefaultBuildingObject, Ee as getDrawClusterForSnapshotEntry, ne as getGrassManager, je as getIndirectInstanceCount, Y as getTileSupportHeight, Ke as getWallMaterialKey, me as getWebGPUDeviceFromRenderer, v as hasTileCollision, a as hasWallCollision, i as indexAabb, p as normalizeQuarterTurnRotation, R as pair, be as parseBuildingGpuVisibilityFlags, t as queryAabbIds, L as snapBuildingPosition, ot as supportsGpuInstanceBatches, ge as syncBuildingGpuBuffers, ae as syncBuildingIndirectArgsBuffer, d as tileFootprintKeys, f as tileGroupToPlacementEntries, m as tileHalfSize, o as tileOverlaps, l as tilePositionToCell, u as tileToPlacementEntry, g as unindexId, ut as useBuildingEditor, ze as useBuildingGpuCullingStore, pe as useBuildingGpuCullingStoreApi, Be as useBuildingRenderStateStore, ee as useBuildingRenderStateStoreApi, b as useBuildingStore, C as useBuildingStoreApi, se as useBuildingVisibilityStore, ue as useBuildingVisibilityStoreApi, it as useGrassManager, vt as useShoreField, Q as wallGroupToPlacementEntries, n as wallToPlacementEntry, x as wallTransformToEdge, s as worldToBuildingCell, y as zigZag };
@@ -6,14 +6,23 @@ export type WallBatch = {
6
6
  walls: WallConfig[];
7
7
  materials: THREE.Material[];
8
8
  };
9
+ /**
10
+ * Boxes, each moved to its `position`, as one geometry of three groups: every box's four edge faces, then the fronts
11
+ * (+z), then the backs (−z). `getWallMaterials` gives all edges one material, so a batch draws three times a pass
12
+ * (shadow passes too) instead of six times per box.
13
+ */
14
+ export declare function createWallPartsGeometry(boxes: readonly {
15
+ size: readonly [number, number, number];
16
+ position?: readonly [number, number, number];
17
+ }[]): THREE.BufferGeometry;
9
18
  /** A wall centered on its own box; each instance moves it to `wallBox(wall)`. */
10
- export declare function createWallGeometry(): THREE.BoxGeometry;
19
+ export declare function createWallGeometry(): THREE.BufferGeometry;
11
20
  export declare function getWallMaterialKey(wall: WallConfig): string;
12
21
  export declare function getWallMaterials(manager: MaterialManager, meshes: Map<string, MeshConfig>, wall: WallConfig, wallGroups: Map<string, WallGroupConfig>, fallbackWallGroup: WallGroupConfig): THREE.Material[];
13
- /** Six identical face materials draw as one material: one draw instead of one per BoxGeometry group. */
22
+ /** Six identical face materials draw as one material: one draw instead of one per geometry group. */
14
23
  export declare function faceMaterial(materials: THREE.Material[]): THREE.Material | THREE.Material[];
15
24
  export declare function WallBatchMesh({ batch, geometry, onWallClick, }: {
16
25
  batch: WallBatch;
17
- geometry: THREE.BoxGeometry;
26
+ geometry: THREE.BufferGeometry;
18
27
  onWallClick?: (wallId: string) => void;
19
28
  }): import("react").JSX.Element;
@@ -6,14 +6,23 @@ export type WallBatch = {
6
6
  walls: WallConfig[];
7
7
  materials: THREE.Material[];
8
8
  };
9
+ /**
10
+ * Boxes, each moved to its `position`, as one geometry of three groups: every box's four edge faces, then the fronts
11
+ * (+z), then the backs (−z). `getWallMaterials` gives all edges one material, so a batch draws three times a pass
12
+ * (shadow passes too) instead of six times per box.
13
+ */
14
+ export declare function createWallPartsGeometry(boxes: readonly {
15
+ size: readonly [number, number, number];
16
+ position?: readonly [number, number, number];
17
+ }[]): THREE.BufferGeometry;
9
18
  /** A wall centered on its own box; each instance moves it to `wallBox(wall)`. */
10
- export declare function createWallGeometry(): THREE.BoxGeometry;
19
+ export declare function createWallGeometry(): THREE.BufferGeometry;
11
20
  export declare function getWallMaterialKey(wall: WallConfig): string;
12
21
  export declare function getWallMaterials(manager: MaterialManager, meshes: Map<string, MeshConfig>, wall: WallConfig, wallGroups: Map<string, WallGroupConfig>, fallbackWallGroup: WallGroupConfig): THREE.Material[];
13
- /** Six identical face materials draw as one material: one draw instead of one per BoxGeometry group. */
22
+ /** Six identical face materials draw as one material: one draw instead of one per geometry group. */
14
23
  export declare function faceMaterial(materials: THREE.Material[]): THREE.Material | THREE.Material[];
15
24
  export declare function WallBatchMesh({ batch, geometry, onWallClick, }: {
16
25
  batch: WallBatch;
17
- geometry: THREE.BoxGeometry;
26
+ geometry: THREE.BufferGeometry;
18
27
  onWallClick?: (wallId: string) => void;
19
28
  }): import("react").JSX.Element;
@@ -2,19 +2,23 @@ import * as THREE from 'three';
2
2
  import type { MaterialManager } from '../../core/MaterialManager.cjs';
3
3
  import { type WallPiece } from '../../model/footprint.cjs';
4
4
  import type { MeshConfig, WallConfig, WallGroupConfig } from '../../types/index.cjs';
5
- /** Every wall with the same piece of the same shape and material: one InstancedMesh of that piece. */
5
+ /**
6
+ * Every wall of one kind whose pieces of one role (a window's four frame bars, a door's leaf) share a material: one
7
+ * InstancedMesh drawing all those pieces as one geometry.
8
+ */
6
9
  export type WallPieceBatch = {
7
10
  key: string;
8
- piece: WallPiece;
11
+ role: WallPiece['role'];
12
+ pieces: readonly WallPiece[];
9
13
  walls: WallConfig[];
10
14
  material: THREE.Material | THREE.Material[];
11
15
  };
12
- /** The frames, glass and doors of the non-solid walls, grouped by piece and material. */
16
+ /** The frames, glass and doors of the non-solid walls, grouped by kind, role and material. */
13
17
  export declare function buildWallPieceBatches(walls: readonly {
14
18
  wall: WallConfig;
15
19
  group: WallGroupConfig;
16
20
  }[], wallGroups: Map<string, WallGroupConfig>, meshes: Map<string, MeshConfig>, manager: MaterialManager): WallPieceBatch[];
17
- /** One piece of many walls, each placed where the wall stands. A click selects the wall of the piece hit. */
21
+ /** The pieces of many walls, each set placed where its wall stands. A click selects the wall of the piece hit. */
18
22
  export declare function WallPieceBatchMesh({ batch, onWallClick }: {
19
23
  batch: WallPieceBatch;
20
24
  onWallClick?: (wallId: string) => void;
@@ -2,19 +2,23 @@ import * as THREE from 'three';
2
2
  import type { MaterialManager } from '../../core/MaterialManager.js';
3
3
  import { type WallPiece } from '../../model/footprint.js';
4
4
  import type { MeshConfig, WallConfig, WallGroupConfig } from '../../types/index.js';
5
- /** Every wall with the same piece of the same shape and material: one InstancedMesh of that piece. */
5
+ /**
6
+ * Every wall of one kind whose pieces of one role (a window's four frame bars, a door's leaf) share a material: one
7
+ * InstancedMesh drawing all those pieces as one geometry.
8
+ */
6
9
  export type WallPieceBatch = {
7
10
  key: string;
8
- piece: WallPiece;
11
+ role: WallPiece['role'];
12
+ pieces: readonly WallPiece[];
9
13
  walls: WallConfig[];
10
14
  material: THREE.Material | THREE.Material[];
11
15
  };
12
- /** The frames, glass and doors of the non-solid walls, grouped by piece and material. */
16
+ /** The frames, glass and doors of the non-solid walls, grouped by kind, role and material. */
13
17
  export declare function buildWallPieceBatches(walls: readonly {
14
18
  wall: WallConfig;
15
19
  group: WallGroupConfig;
16
20
  }[], wallGroups: Map<string, WallGroupConfig>, meshes: Map<string, MeshConfig>, manager: MaterialManager): WallPieceBatch[];
17
- /** One piece of many walls, each placed where the wall stands. A click selects the wall of the piece hit. */
21
+ /** The pieces of many walls, each set placed where its wall stands. A click selects the wall of the piece hit. */
18
22
  export declare function WallPieceBatchMesh({ batch, onWallClick }: {
19
23
  batch: WallPieceBatch;
20
24
  onWallClick?: (wallId: string) => void;
@@ -10,4 +10,9 @@ export declare function reuseByKey<T extends Keyed>(next: readonly T[], previous
10
10
  export declare function useReusedByKey<T extends Keyed>(next: readonly T[], same: (a: T, b: T) => boolean): T[];
11
11
  /** Same length and the same objects in the same order. */
12
12
  export declare function sameItems(a: readonly unknown[], b: readonly unknown[]): boolean;
13
+ /**
14
+ * `items`, or the array last returned when it holds the same objects in the same order: a filter over a store list
15
+ * that an edit elsewhere rebuilt keeps its identity, and so do the memos keyed on it.
16
+ */
17
+ export declare function useStableItems<T>(items: readonly T[]): readonly T[];
13
18
  export {};
@@ -10,4 +10,9 @@ export declare function reuseByKey<T extends Keyed>(next: readonly T[], previous
10
10
  export declare function useReusedByKey<T extends Keyed>(next: readonly T[], same: (a: T, b: T) => boolean): T[];
11
11
  /** Same length and the same objects in the same order. */
12
12
  export declare function sameItems(a: readonly unknown[], b: readonly unknown[]): boolean;
13
+ /**
14
+ * `items`, or the array last returned when it holds the same objects in the same order: a filter over a store list
15
+ * that an edit elsewhere rebuilt keeps its identity, and so do the memos keyed on it.
16
+ */
17
+ export declare function useStableItems<T>(items: readonly T[]): readonly T[];
13
18
  export {};
@@ -0,0 +1,29 @@
1
+ import type { Box3, BufferAttribute, BufferGeometry, InterleavedBufferAttribute } from 'three';
2
+ type Positions = BufferAttribute | InterleavedBufferAttribute;
3
+ /** Triangles a static geometry needs before a sweep looks them up by cell instead of walking every one. */
4
+ export declare const TRIANGLE_GRID_MIN = 512;
5
+ /**
6
+ * The triangles of one geometry bucketed by a grid over its local XZ bounds, so a sweep tests only the triangles under
7
+ * its path: a merged cell of props or a ground cover holds tens of thousands, of which a camera path crosses a few.
8
+ */
9
+ export type TriangleGrid = {
10
+ minX: number;
11
+ minZ: number;
12
+ cell: number;
13
+ cols: number;
14
+ rows: number;
15
+ /** Cell `c` holds `items[starts[c]]` up to `items[starts[c + 1]]`. */
16
+ starts: Uint32Array;
17
+ /** Index offsets of each triangle's first corner. */
18
+ items: Uint32Array;
19
+ /** The query that last saw each triangle, so one lying in several cells is tested once. */
20
+ seen: Uint32Array;
21
+ stamp: number;
22
+ positionVersion: number;
23
+ indexVersion: number;
24
+ };
25
+ /** The geometry's grid, built on first use and again when its positions or index change. */
26
+ export declare function triangleGrid(geometry: BufferGeometry, positions: Positions, index: BufferAttribute | null): TriangleGrid;
27
+ /** Calls `visit` with the first-corner offset of each triangle in `[start, end)` whose cells meet `box` (local XZ). */
28
+ export declare function visitGridTriangles(grid: TriangleGrid, box: Box3, start: number, end: number, visit: (offset: number) => void): void;
29
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { Box3, BufferAttribute, BufferGeometry, InterleavedBufferAttribute } from 'three';
2
+ type Positions = BufferAttribute | InterleavedBufferAttribute;
3
+ /** Triangles a static geometry needs before a sweep looks them up by cell instead of walking every one. */
4
+ export declare const TRIANGLE_GRID_MIN = 512;
5
+ /**
6
+ * The triangles of one geometry bucketed by a grid over its local XZ bounds, so a sweep tests only the triangles under
7
+ * its path: a merged cell of props or a ground cover holds tens of thousands, of which a camera path crosses a few.
8
+ */
9
+ export type TriangleGrid = {
10
+ minX: number;
11
+ minZ: number;
12
+ cell: number;
13
+ cols: number;
14
+ rows: number;
15
+ /** Cell `c` holds `items[starts[c]]` up to `items[starts[c + 1]]`. */
16
+ starts: Uint32Array;
17
+ /** Index offsets of each triangle's first corner. */
18
+ items: Uint32Array;
19
+ /** The query that last saw each triangle, so one lying in several cells is tested once. */
20
+ seen: Uint32Array;
21
+ stamp: number;
22
+ positionVersion: number;
23
+ indexVersion: number;
24
+ };
25
+ /** The geometry's grid, built on first use and again when its positions or index change. */
26
+ export declare function triangleGrid(geometry: BufferGeometry, positions: Positions, index: BufferAttribute | null): TriangleGrid;
27
+ /** Calls `visit` with the first-corner offset of each triangle in `[start, end)` whose cells meet `box` (local XZ). */
28
+ export declare function visitGridTriangles(grid: TriangleGrid, box: Box3, start: number, end: number, visit: (offset: number) => void): void;
29
+ export {};
@@ -1,4 +1,5 @@
1
1
  export { RemotePlayer } from './RemotePlayer.cjs';
2
+ export { RemotePlayers, type RemotePlayersProps } from './RemotePlayers.cjs';
2
3
  export * from './ConnectionForm.cjs';
3
4
  export * from './PlayerInfoOverlay.cjs';
4
5
  export * from './MultiplayerCanvas.cjs';
@@ -1,4 +1,5 @@
1
1
  export { RemotePlayer } from './RemotePlayer.js';
2
+ export { RemotePlayers, type RemotePlayersProps } from './RemotePlayers.js';
2
3
  export * from './ConnectionForm.js';
3
4
  export * from './PlayerInfoOverlay.js';
4
5
  export * from './MultiplayerCanvas.js';
@@ -17,8 +17,8 @@ export type IdleFrameRateProps = {
17
17
  };
18
18
  /**
19
19
  * Draws every display frame while the scene changes and `fps` frames a second once `after` seconds pass without a
20
- * change. Input, a moving camera and systems that call the canvas scheduler's `markActivity` (walking NPCs) count as
21
- * changes. It paces the canvas itself (`frameloop="never"` while mounted), so frame requests from elsewhere, such as
20
+ * change. Input (a gamepad too), a moving camera and systems that call the canvas scheduler's `markActivity` (walking
21
+ * NPCs) count as changes. It paces the canvas itself (`frameloop="never"` while mounted), so frame requests from elsewhere, such as
22
22
  * physics bodies that never sleep, do not keep an idle canvas at full rate. Simulation keeps its own clock
23
23
  * (`WorldPhysics`).
24
24
  */
@@ -17,8 +17,8 @@ export type IdleFrameRateProps = {
17
17
  };
18
18
  /**
19
19
  * Draws every display frame while the scene changes and `fps` frames a second once `after` seconds pass without a
20
- * change. Input, a moving camera and systems that call the canvas scheduler's `markActivity` (walking NPCs) count as
21
- * changes. It paces the canvas itself (`frameloop="never"` while mounted), so frame requests from elsewhere, such as
20
+ * change. Input (a gamepad too), a moving camera and systems that call the canvas scheduler's `markActivity` (walking
21
+ * NPCs) count as changes. It paces the canvas itself (`frameloop="never"` while mounted), so frame requests from elsewhere, such as
22
22
  * physics bodies that never sleep, do not keep an idle canvas at full rate. Simulation keeps its own clock
23
23
  * (`WorldPhysics`).
24
24
  */
@@ -12,14 +12,10 @@ type TargetedRenderer = {
12
12
  getMRT(): unknown;
13
13
  setMRT(mrt: unknown): void;
14
14
  };
15
- /**
16
- * Where a pass draws the scene (postprocessing): its render target and MRT outputs, and how deep in nested renders it
17
- * draws (a pass inside the output render draws at depth 1). Together they select the pipelines the scene is drawn with.
18
- */
15
+ /** Where a pass draws the scene (postprocessing): its render target and MRT outputs select the scene's pipelines. */
19
16
  export type SceneRenderTarget = {
20
17
  renderTarget: unknown;
21
18
  mrt: unknown;
22
- depth: number;
23
19
  };
24
20
  /** The target each renderer draws the scene into; a gate compiles again when it changes. */
25
21
  export declare const sceneTargets: WeakMap<object, SceneRenderTarget>;
@@ -30,7 +26,7 @@ export declare function canCompileAsync(renderer: unknown): renderer is AsyncCom
30
26
  export declare function hideUntilCompiled(root: Object3D): () => void;
31
27
  /**
32
28
  * Starts an async compile of `root` with `scene`'s lights while it is visible and unculled for that one call: for the
33
- * target the scene is drawn into and for the shadow cascades, which draw it one render deeper.
29
+ * target the scene is drawn into and for the shadow cascades.
34
30
  */
35
31
  export declare function compileSubtreeAsync(renderer: AsyncCompiler, root: Object3D, camera: Camera, scene: Scene): Promise<unknown>;
36
32
  /**
@@ -41,7 +37,10 @@ export declare function compileSubtreeAsync(renderer: AsyncCompiler, root: Objec
41
37
  * once `alive` turns false.
42
38
  */
43
39
  export declare function compileInSlices(renderer: AsyncCompiler, root: Object3D, camera: Camera, scene: Scene, alive?: () => boolean): Promise<void>;
44
- /** Compiles the whole scene for where it is drawn and its shadows; null when it cannot compile ahead. */
40
+ /**
41
+ * Compiles the whole scene for where it is drawn and its shadows, a drawable at a time so their pipelines build side
42
+ * by side; null when it cannot compile ahead.
43
+ */
45
44
  export declare function compileSceneAsync(renderer: unknown, scene: Scene, camera: Camera): Promise<unknown> | null;
46
45
  export declare function countCompile(delta: number): void;
47
46
  /** Gates still compiling their content ahead of its first draw, on every canvas; load progress waits for them. */
@@ -12,14 +12,10 @@ type TargetedRenderer = {
12
12
  getMRT(): unknown;
13
13
  setMRT(mrt: unknown): void;
14
14
  };
15
- /**
16
- * Where a pass draws the scene (postprocessing): its render target and MRT outputs, and how deep in nested renders it
17
- * draws (a pass inside the output render draws at depth 1). Together they select the pipelines the scene is drawn with.
18
- */
15
+ /** Where a pass draws the scene (postprocessing): its render target and MRT outputs select the scene's pipelines. */
19
16
  export type SceneRenderTarget = {
20
17
  renderTarget: unknown;
21
18
  mrt: unknown;
22
- depth: number;
23
19
  };
24
20
  /** The target each renderer draws the scene into; a gate compiles again when it changes. */
25
21
  export declare const sceneTargets: WeakMap<object, SceneRenderTarget>;
@@ -30,7 +26,7 @@ export declare function canCompileAsync(renderer: unknown): renderer is AsyncCom
30
26
  export declare function hideUntilCompiled(root: Object3D): () => void;
31
27
  /**
32
28
  * Starts an async compile of `root` with `scene`'s lights while it is visible and unculled for that one call: for the
33
- * target the scene is drawn into and for the shadow cascades, which draw it one render deeper.
29
+ * target the scene is drawn into and for the shadow cascades.
34
30
  */
35
31
  export declare function compileSubtreeAsync(renderer: AsyncCompiler, root: Object3D, camera: Camera, scene: Scene): Promise<unknown>;
36
32
  /**
@@ -41,7 +37,10 @@ export declare function compileSubtreeAsync(renderer: AsyncCompiler, root: Objec
41
37
  * once `alive` turns false.
42
38
  */
43
39
  export declare function compileInSlices(renderer: AsyncCompiler, root: Object3D, camera: Camera, scene: Scene, alive?: () => boolean): Promise<void>;
44
- /** Compiles the whole scene for where it is drawn and its shadows; null when it cannot compile ahead. */
40
+ /**
41
+ * Compiles the whole scene for where it is drawn and its shadows, a drawable at a time so their pipelines build side
42
+ * by side; null when it cannot compile ahead.
43
+ */
45
44
  export declare function compileSceneAsync(renderer: unknown, scene: Scene, camera: Camera): Promise<unknown> | null;
46
45
  export declare function countCompile(delta: number): void;
47
46
  /** Gates still compiling their content ahead of its first draw, on every canvas; load progress waits for them. */
package/dist/editor.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useClicker-0Ln5ZSz0.cjs"),t=require("./shell-Cuw1RbCu.cjs"),n=require("./WorldProps-L3Izutxz.cjs"),r=require("./plugin-epk5BZCz.cjs"),i=require("./loader-shJVRMj9.cjs");exports.ANIMATION_PANEL_DEFAULT_CLASSES=t.Qt,exports.ANIMATION_PANEL_DEFAULT_LABELS=t.$t,exports.ANIMATION_PANEL_DEFAULT_TABS=t.en,exports.AnimationPanel=t.tn,exports.BUILDING_BASIC_OBJECT_OPTIONS=e.Yt,exports.BUILDING_FLAG_STYLE_OPTIONS=e.Xt,exports.BUILDING_PLACED_OBJECT_OPTIONS=e.Zt,exports.BUILDING_STORE_SERVICE=e.Vt,exports.BUILDING_TILE_GROUP_DRAG_TYPE=e.Qt,exports.BUILDING_TILE_OBJECT_OPTIONS=e.$t,exports.BUILDING_TILE_PRESETS=e.en,exports.BUILDING_TILE_PRESET_DRAG_TYPE=e.tn,exports.BUILDING_TILE_SHAPE_OPTIONS=e.nn,exports.BUILDING_TREE_COLOR_PRESETS=e.rn,exports.BUILDING_TREE_OPTIONS=e.in,exports.BUILDING_WALL_KIND_OPTIONS=e.an,exports.BUILDING_WALL_PRESETS=e.on,exports.BUILDING_WEATHER_EFFECT_OPTIONS=e.sn,exports.BUILDING_WORLD_SURFACE_OPTIONS=e.cn,exports.Billboard=r.U,exports.BlockSystem=r.K,exports.BuildingController=r.h,exports.BuildingGpuCullingDriver=r.f,exports.BuildingGpuMirrorDriver=r.m,exports.BuildingGpuUploadDriver=r.p,exports.BuildingIndirectArgsUploadDriver=r.u,exports.BuildingIndirectDrawDriver=r.d,exports.BuildingNavigationObstacleDriver=r.tt,exports.BuildingPanel=t.O,exports.BuildingRenderStateDriver=r._,exports.BuildingSystem=r.x,exports.BuildingUI=r.s,exports.BuildingVisibilityDriver=r.g,exports.CAMERA_PANEL_DEFAULT_CLASSES=t.an,exports.CAMERA_PANEL_DEFAULT_LABELS=t.on,exports.CAMERA_PANEL_DEFAULT_TABS=t.sn,exports.CAMERA_SETTINGS_DEFAULT_CLASSES=t.Cn,exports.CAMERA_SETTINGS_DEFAULT_LABELS=t.wn,exports.CAMERA_SETTINGS_DEFAULT_SECTIONS=t.Tn,exports.CONTENT_SCHEMA_VERSION=i.o,exports.CameraPanel=t.cn,exports.CameraSettingsTab=t.Sn,exports.CinematicPanel=t.E,exports.CommandPalette=t.En,exports.DEFAULT_BUILDING_GRID_EXTENSION_ID=r.t,exports.DEFAULT_BUILDING_OBJECT_CATALOG=r.rt,exports.DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID=r.n,exports.DEFAULT_BUILDING_SAVE_EXTENSION_ID=r.r,exports.DEFAULT_BUILDING_STORE_SERVICE_ID=r.i,exports.DEFAULT_EDITOR_SHORTCUTS=t.On,exports.DRAW_CLUSTER_BILLBOARD=n.rt,exports.DRAW_CLUSTER_BLOCK=n.it,exports.DRAW_CLUSTER_COUNT=n.at,exports.DRAW_CLUSTER_DESCRIPTORS=n.Z,exports.DRAW_CLUSTER_FIRE=n.ot,exports.DRAW_CLUSTER_FLAG=n.st,exports.DRAW_CLUSTER_GRASS=n.ct,exports.DRAW_CLUSTER_MODEL=n.lt,exports.DRAW_CLUSTER_SAKURA=n.ut,exports.DRAW_CLUSTER_SAND=n.dt,exports.DRAW_CLUSTER_SNOWFIELD=n.ft,exports.DRAW_CLUSTER_TILE=n.pt,exports.DRAW_CLUSTER_WALL=n.mt,exports.DRAW_CLUSTER_WATER=n.ht,exports.EDITOR_PANEL_COMPONENT_KIND=t.Hn,exports.EMPTY_EDITOR_SELECTION=t.u,exports.Editor=t.C,exports.EditorLayout=t.w,exports.FLAG_STYLE_META=e.ln,exports.Fire=r.H,exports.GPU_META_STRIDE=n.K,exports.GPU_SPATIAL_STRIDE=n.q,exports.GameplayEventPanel=t.D,exports.GpuBatchBridge=r.J,exports.Grass=r.O,exports.GrassDriver=r.z,exports.GrassManagerProvider=r.B,exports.GridHelper=r.W,exports.HierarchyPanel=t.Wt,exports.HttpContentBundleSource=i.t,exports.INDIRECT_DRAW_STRIDE=n.Q,exports.InspectorPanel=t.F,exports.MOTION_PANEL_DEFAULT_CLASSES=t.Kt,exports.MOTION_PANEL_DEFAULT_LABELS=t.qt,exports.MOTION_PANEL_DEFAULT_TABS=t.Jt,exports.MaterialManager=r.q,exports.MotionPanel=t.Yt,exports.PROJECT_ASSETS_PANEL_DEFAULT_CLASSES=t.j,exports.PROJECT_ASSETS_PANEL_DEFAULT_KIND_OPTIONS=t.M,exports.PROJECT_ASSETS_PANEL_DEFAULT_LABELS=t.N,exports.PROJECT_ASSETS_PANEL_DEFAULT_TABS=t.P,exports.PerformancePanel=t.Gt,exports.ProjectAssetsPanel=t.A,exports.ResizablePanel=t.S,exports.Sakura=r.L,exports.SakuraBatch=r.R,exports.Sand=r.E,exports.SandBatch=r.D,exports.SceneObjectTransformGizmo=t.v,exports.Snow=r.I,exports.Snowfield=r.w,exports.SnowfieldBatch=r.T,exports.StudioPanel=t.T,exports.TileSystem=r.C,exports.VehiclePanel=t.k,exports.WallSystem=r.S,exports.Water=r.A,exports.applyBuildingNavigationObstacles=r.nt,exports.applySceneTransform=t.y,exports.blockToPlacementEntry=e.un,exports.buildBuildingGpuMirror=n.J,exports.buildBuildingIndirectDrawMirror=n.$,exports.buildingCellToWorld=e.dn,exports.buildingGridAdapter=e.fn,exports.buildingGroupsToPlacementEntries=e.pn,exports.buildingPlacementAdapter=e.mn,exports.buildingPlugin=r.a,exports.cellToTilePosition=e.hn,exports.clearEditorSelection=t.d,exports.createBlockFootprint=e.gn,exports.createBuildingCullingStore=n.Ct,exports.createBuildingGpuUploadPlan=n.Y,exports.createBuildingIndirectDrawUploadPlan=n.et,exports.createBuildingPlacementEngine=e._n,exports.createBuildingPlugin=r.o,exports.createBuildingRenderStore=n.R,exports.createBuildingScopeId=r.l,exports.createBuildingStore=e.Ht,exports.createBuildingVisibilityStore=n.F,exports.createContentBundleFromSaveSystem=i.a,exports.createCustomMeshId=r.c,exports.createEditorCommandStack=t.t,exports.createEditorPlayModeController=t.a,exports.createEditorSaveStatus=t.Pn,exports.createEditorSelectionState=t.f,exports.createEditorShell=t.n,exports.createEditorShortcutRegistry=t.kn,exports.createEditorSlice=t.c,exports.createEditorTransaction=t.r,exports.createEmptyBuildingGpuUploadResources=n.V,exports.createEmptyBuildingIndirectDrawMirror=n.tt,exports.createEmptyGpuMirror=n.X,exports.createGrassManager=n.Et,exports.createSceneObjectEditorCommands=t.i,exports.createShoreField=r.M,exports.createTerrainBlockMaterial=r.v,exports.createTileFootprint=e.vn,exports.createTileSampler=r.Z,exports.destroyBuildingGpuUploadResources=n.H,exports.edgeKey=e.yn,exports.edgeSideToWallRotation=e.bn,exports.edgeToWallTransform=e.xn,exports.editorSlice=t.l,exports.findTerrainBlockMaterial=r.y,exports.formatEditorShortcut=t.An,exports.getActiveSceneObject=t.p,exports.getBlockSupportHeight=e.Sn,exports.getBuildingSupportHeight=e.Cn,exports.getDefaultBuildingObject=r.it,exports.getDrawClusterForSnapshotEntry=n.gt,exports.getEditorSaveStatusLabel=t.Fn,exports.getGrassManager=n.Dt,exports.getIndirectInstanceCount=n.nt,exports.getNextAutosaveAt=t.In,exports.getTileSupportHeight=e.wn,exports.getWallMaterialKey=r.G,exports.getWebGPUDeviceFromRenderer=n.U,exports.hasTileCollision=e.Tn,exports.hasWallCollision=e.En,exports.indexAabb=e.Dn,exports.isEditableShortcutTarget=t.jn,exports.isEditorPanelComponentExtension=t.Un,exports.isSceneObjectSelected=t.m,exports.loadContentBundleFromManifest=i.n,exports.markEditorDirty=t.Ln,exports.markEditorSaveError=t.Rn,exports.markEditorSaved=t.zn,exports.markEditorSaving=t.Bn,exports.matchesEditorShortcut=t.Mn,exports.normalizeQuarterTurnRotation=e.On,exports.object3DToSceneTransform=t.b,exports.pair=e.kn,exports.parseBuildingGpuVisibilityFlags=n._t,exports.queryAabbIds=e.An,exports.resolveEditorPanelComponentExtensions=t.Wn,exports.selectSceneObject=t.h,exports.selectSceneObjectRange=t.g,exports.setSceneObjectHover=t._,exports.shouldRunEditorAutosave=t.Vn,exports.snapBuildingPosition=e.jn,exports.snapSceneTransform=t.x,exports.supportsGpuInstanceBatches=r.Y,exports.syncBuildingGpuBuffers=n.W,exports.syncBuildingIndirectArgsBuffer=n.G,exports.tileFootprintKeys=e.Mn,exports.tileGroupToPlacementEntries=e.Nn,exports.tileHalfSize=e.Pn,exports.tileOverlaps=e.Fn,exports.tilePositionToCell=e.In,exports.tileToPlacementEntry=e.Ln,exports.unindexId=e.Rn,exports.useBuildingEditor=r.b,exports.useBuildingGpuCullingStore=n.wt,exports.useBuildingGpuCullingStoreApi=n.Tt,exports.useBuildingRenderStateStore=n.z,exports.useBuildingRenderStateStoreApi=n.B,exports.useBuildingStore=e.Ut,exports.useBuildingStoreApi=e.Wt,exports.useBuildingVisibilityStore=n.I,exports.useBuildingVisibilityStoreApi=n.L,exports.useEditor=t.o,exports.useEditorAutosave=t.Nn,exports.useEditorShortcuts=t.Dn,exports.useEditorStore=t.s,exports.useGrassManager=r.V,exports.useShoreField=r.j,exports.validateContentBundle=i.r,exports.validateContentBundleManifest=i.i,exports.wallGroupToPlacementEntries=e.zn,exports.wallToPlacementEntry=e.Bn,exports.wallTransformToEdge=e.Vn,exports.worldToBuildingCell=e.Hn,exports.zigZag=e.Un;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useClicker-0Ln5ZSz0.cjs"),t=require("./shell-BRQStYy9.cjs"),n=require("./WorldProps-L3Izutxz.cjs"),r=require("./plugin-BUKo4q0N.cjs"),i=require("./loader-shJVRMj9.cjs");exports.ANIMATION_PANEL_DEFAULT_CLASSES=t.en,exports.ANIMATION_PANEL_DEFAULT_LABELS=t.tn,exports.ANIMATION_PANEL_DEFAULT_TABS=t.nn,exports.AnimationPanel=t.rn,exports.BUILDING_BASIC_OBJECT_OPTIONS=e.Yt,exports.BUILDING_FLAG_STYLE_OPTIONS=e.Xt,exports.BUILDING_PLACED_OBJECT_OPTIONS=e.Zt,exports.BUILDING_STORE_SERVICE=e.Vt,exports.BUILDING_TILE_GROUP_DRAG_TYPE=e.Qt,exports.BUILDING_TILE_OBJECT_OPTIONS=e.$t,exports.BUILDING_TILE_PRESETS=e.en,exports.BUILDING_TILE_PRESET_DRAG_TYPE=e.tn,exports.BUILDING_TILE_SHAPE_OPTIONS=e.nn,exports.BUILDING_TREE_COLOR_PRESETS=e.rn,exports.BUILDING_TREE_OPTIONS=e.in,exports.BUILDING_WALL_KIND_OPTIONS=e.an,exports.BUILDING_WALL_PRESETS=e.on,exports.BUILDING_WEATHER_EFFECT_OPTIONS=e.sn,exports.BUILDING_WORLD_SURFACE_OPTIONS=e.cn,exports.Billboard=r.U,exports.BlockSystem=r.K,exports.BuildingController=r.h,exports.BuildingGpuCullingDriver=r.f,exports.BuildingGpuMirrorDriver=r.m,exports.BuildingGpuUploadDriver=r.p,exports.BuildingIndirectArgsUploadDriver=r.u,exports.BuildingIndirectDrawDriver=r.d,exports.BuildingNavigationObstacleDriver=r.tt,exports.BuildingPanel=t.O,exports.BuildingRenderStateDriver=r._,exports.BuildingSystem=r.x,exports.BuildingUI=r.s,exports.BuildingVisibilityDriver=r.g,exports.CAMERA_PANEL_DEFAULT_CLASSES=t.sn,exports.CAMERA_PANEL_DEFAULT_LABELS=t.cn,exports.CAMERA_PANEL_DEFAULT_TABS=t.ln,exports.CAMERA_SETTINGS_DEFAULT_CLASSES=t.Tn,exports.CAMERA_SETTINGS_DEFAULT_LABELS=t.En,exports.CAMERA_SETTINGS_DEFAULT_SECTIONS=t.Dn,exports.CONTENT_SCHEMA_VERSION=i.o,exports.CameraPanel=t.un,exports.CameraSettingsTab=t.wn,exports.CinematicPanel=t.E,exports.CommandPalette=t.On,exports.DEFAULT_BUILDING_GRID_EXTENSION_ID=r.t,exports.DEFAULT_BUILDING_OBJECT_CATALOG=r.rt,exports.DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID=r.n,exports.DEFAULT_BUILDING_SAVE_EXTENSION_ID=r.r,exports.DEFAULT_BUILDING_STORE_SERVICE_ID=r.i,exports.DEFAULT_EDITOR_SHORTCUTS=t.An,exports.DRAW_CLUSTER_BILLBOARD=n.rt,exports.DRAW_CLUSTER_BLOCK=n.it,exports.DRAW_CLUSTER_COUNT=n.at,exports.DRAW_CLUSTER_DESCRIPTORS=n.Z,exports.DRAW_CLUSTER_FIRE=n.ot,exports.DRAW_CLUSTER_FLAG=n.st,exports.DRAW_CLUSTER_GRASS=n.ct,exports.DRAW_CLUSTER_MODEL=n.lt,exports.DRAW_CLUSTER_SAKURA=n.ut,exports.DRAW_CLUSTER_SAND=n.dt,exports.DRAW_CLUSTER_SNOWFIELD=n.ft,exports.DRAW_CLUSTER_TILE=n.pt,exports.DRAW_CLUSTER_WALL=n.mt,exports.DRAW_CLUSTER_WATER=n.ht,exports.EDITOR_PANEL_COMPONENT_KIND=t.Wn,exports.EMPTY_EDITOR_SELECTION=t.u,exports.Editor=t.C,exports.EditorLayout=t.w,exports.FLAG_STYLE_META=e.ln,exports.Fire=r.H,exports.GPU_META_STRIDE=n.K,exports.GPU_SPATIAL_STRIDE=n.q,exports.GameplayEventPanel=t.D,exports.GpuBatchBridge=r.J,exports.Grass=r.O,exports.GrassDriver=r.z,exports.GrassManagerProvider=r.B,exports.GridHelper=r.W,exports.HierarchyPanel=t.Kt,exports.HttpContentBundleSource=i.t,exports.INDIRECT_DRAW_STRIDE=n.Q,exports.InspectorPanel=t.L,exports.MOTION_PANEL_DEFAULT_CLASSES=t.Jt,exports.MOTION_PANEL_DEFAULT_LABELS=t.Yt,exports.MOTION_PANEL_DEFAULT_TABS=t.Xt,exports.MaterialManager=r.q,exports.MotionPanel=t.Zt,exports.PROJECT_ASSETS_PANEL_DEFAULT_CLASSES=t.N,exports.PROJECT_ASSETS_PANEL_DEFAULT_KIND_OPTIONS=t.P,exports.PROJECT_ASSETS_PANEL_DEFAULT_LABELS=t.F,exports.PROJECT_ASSETS_PANEL_DEFAULT_TABS=t.I,exports.PerformancePanel=t.qt,exports.ProjectAssetsPanel=t.M,exports.ResizablePanel=t.S,exports.Sakura=r.L,exports.SakuraBatch=r.R,exports.Sand=r.E,exports.SandBatch=r.D,exports.SceneObjectTransformGizmo=t.v,exports.Snow=r.I,exports.Snowfield=r.w,exports.SnowfieldBatch=r.T,exports.StudioPanel=t.T,exports.TileSystem=r.C,exports.VehiclePanel=t.j,exports.WallSystem=r.S,exports.Water=r.A,exports.applyBuildingNavigationObstacles=r.nt,exports.applySceneTransform=t.y,exports.blockToPlacementEntry=e.un,exports.buildBuildingGpuMirror=n.J,exports.buildBuildingIndirectDrawMirror=n.$,exports.buildingCellToWorld=e.dn,exports.buildingGridAdapter=e.fn,exports.buildingGroupsToPlacementEntries=e.pn,exports.buildingPlacementAdapter=e.mn,exports.buildingPlugin=r.a,exports.cellToTilePosition=e.hn,exports.clearEditorSelection=t.d,exports.createBlockFootprint=e.gn,exports.createBuildingCullingStore=n.Ct,exports.createBuildingGpuUploadPlan=n.Y,exports.createBuildingIndirectDrawUploadPlan=n.et,exports.createBuildingPlacementEngine=e._n,exports.createBuildingPlugin=r.o,exports.createBuildingRenderStore=n.R,exports.createBuildingScopeId=r.l,exports.createBuildingStore=e.Ht,exports.createBuildingVisibilityStore=n.F,exports.createContentBundleFromSaveSystem=i.a,exports.createCustomMeshId=r.c,exports.createEditorCommandStack=t.t,exports.createEditorPlayModeController=t.a,exports.createEditorSaveStatus=t.In,exports.createEditorSelectionState=t.f,exports.createEditorShell=t.n,exports.createEditorShortcutRegistry=t.jn,exports.createEditorSlice=t.c,exports.createEditorTransaction=t.r,exports.createEmptyBuildingGpuUploadResources=n.V,exports.createEmptyBuildingIndirectDrawMirror=n.tt,exports.createEmptyGpuMirror=n.X,exports.createGrassManager=n.Et,exports.createSceneObjectEditorCommands=t.i,exports.createShoreField=r.M,exports.createTerrainBlockMaterial=r.v,exports.createTileFootprint=e.vn,exports.createTileSampler=r.Z,exports.destroyBuildingGpuUploadResources=n.H,exports.edgeKey=e.yn,exports.edgeSideToWallRotation=e.bn,exports.edgeToWallTransform=e.xn,exports.editorSlice=t.l,exports.findTerrainBlockMaterial=r.y,exports.formatEditorShortcut=t.Mn,exports.getActiveSceneObject=t.p,exports.getBlockSupportHeight=e.Sn,exports.getBuildingSupportHeight=e.Cn,exports.getDefaultBuildingObject=r.it,exports.getDrawClusterForSnapshotEntry=n.gt,exports.getEditorSaveStatusLabel=t.Ln,exports.getGrassManager=n.Dt,exports.getIndirectInstanceCount=n.nt,exports.getNextAutosaveAt=t.Rn,exports.getTileSupportHeight=e.wn,exports.getWallMaterialKey=r.G,exports.getWebGPUDeviceFromRenderer=n.U,exports.hasTileCollision=e.Tn,exports.hasWallCollision=e.En,exports.indexAabb=e.Dn,exports.isEditableShortcutTarget=t.Nn,exports.isEditorPanelComponentExtension=t.Gn,exports.isSceneObjectSelected=t.m,exports.loadContentBundleFromManifest=i.n,exports.markEditorDirty=t.zn,exports.markEditorSaveError=t.Bn,exports.markEditorSaved=t.Vn,exports.markEditorSaving=t.Hn,exports.matchesEditorShortcut=t.Pn,exports.normalizeQuarterTurnRotation=e.On,exports.object3DToSceneTransform=t.b,exports.pair=e.kn,exports.parseBuildingGpuVisibilityFlags=n._t,exports.queryAabbIds=e.An,exports.resolveEditorPanelComponentExtensions=t.Kn,exports.selectSceneObject=t.h,exports.selectSceneObjectRange=t.g,exports.setSceneObjectHover=t._,exports.shouldRunEditorAutosave=t.Un,exports.snapBuildingPosition=e.jn,exports.snapSceneTransform=t.x,exports.supportsGpuInstanceBatches=r.Y,exports.syncBuildingGpuBuffers=n.W,exports.syncBuildingIndirectArgsBuffer=n.G,exports.tileFootprintKeys=e.Mn,exports.tileGroupToPlacementEntries=e.Nn,exports.tileHalfSize=e.Pn,exports.tileOverlaps=e.Fn,exports.tilePositionToCell=e.In,exports.tileToPlacementEntry=e.Ln,exports.unindexId=e.Rn,exports.useBuildingEditor=r.b,exports.useBuildingGpuCullingStore=n.wt,exports.useBuildingGpuCullingStoreApi=n.Tt,exports.useBuildingRenderStateStore=n.z,exports.useBuildingRenderStateStoreApi=n.B,exports.useBuildingStore=e.Ut,exports.useBuildingStoreApi=e.Wt,exports.useBuildingVisibilityStore=n.I,exports.useBuildingVisibilityStoreApi=n.L,exports.useEditor=t.o,exports.useEditorAutosave=t.Fn,exports.useEditorShortcuts=t.kn,exports.useEditorStore=t.s,exports.useGrassManager=r.V,exports.useShoreField=r.j,exports.validateContentBundle=i.r,exports.validateContentBundleManifest=i.i,exports.wallGroupToPlacementEntries=e.zn,exports.wallToPlacementEntry=e.Bn,exports.wallTransformToEdge=e.Vn,exports.worldToBuildingCell=e.Hn,exports.zigZag=e.Un;
package/dist/editor.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $t as e, An as t, Bn as n, Cn as r, Dn as i, En as a, Fn as o, Hn as s, Ht as c, In as l, Ln as u, Mn as d, Nn as f, On as p, Pn as m, Qt as h, Rn as g, Sn as _, Tn as v, Un as y, Ut as b, Vn as x, Vt as S, Wt as C, Xt as w, Yt as T, Zt as E, _n as D, an as O, bn as k, cn as A, dn as j, en as M, fn as N, gn as P, hn as F, in as I, jn as L, kn as R, ln as z, mn as B, nn as V, on as H, pn as U, rn as W, sn as G, tn as K, un as q, vn as J, wn as Y, xn as X, yn as Z, zn as Q } from "./useClicker-DZrb1I0b.js";
2
- import { $t as $, A as ee, An as te, Bn as ne, C as re, Cn as ie, D as ae, Dn as oe, E as se, En as ce, F as le, Fn as ue, Gt as de, Hn as fe, In as pe, Jt as me, Kt as he, Ln as ge, M as _e, Mn as ve, N as ye, Nn as be, O as xe, On as Se, P as Ce, Pn as we, Qt as Te, Rn as Ee, S as De, Sn as Oe, T as ke, Tn as Ae, Un as je, Vn as Me, Wn as Ne, Wt as Pe, Yt as Fe, _ as Ie, a as Le, an as Re, b as ze, c as Be, cn as Ve, d as He, en as Ue, f as We, g as Ge, h as Ke, i as qe, j as Je, jn as Ye, k as Xe, kn as Ze, l as Qe, m as $e, n as et, o as tt, on as nt, p as rt, qt as it, r as at, s as ot, sn as st, t as ct, tn as lt, u as ut, v as dt, w as ft, wn as pt, x as mt, y as ht, zn as gt } from "./shell-69YWpmhQ.js";
2
+ import { An as $, Bn as ee, C as te, D as ne, Dn as re, E as ie, En as ae, F as oe, Fn as se, Gn as ce, Hn as le, I as ue, In as de, Jt as fe, Kn as pe, Kt as me, L as he, Ln as ge, M as _e, Mn as ve, N as ye, Nn as be, O as xe, On as Se, P as Ce, Pn as we, Rn as Te, S as Ee, T as De, Tn as Oe, Un as ke, Vn as Ae, Wn as je, Xt as Me, Yt as Ne, Zt as Pe, _ as Fe, a as Ie, b as Le, c as Re, cn as ze, d as Be, en as Ve, f as He, g as Ue, h as We, i as Ge, j as Ke, jn as qe, kn as Je, l as Ye, ln as Xe, m as Ze, n as Qe, nn as $e, o as et, p as tt, qt as nt, r as rt, rn as it, s as at, sn as ot, t as st, tn as ct, u as lt, un as ut, v as dt, w as ft, wn as pt, x as mt, y as ht, zn as gt } from "./shell-aiiC8SLL.js";
3
3
  import { $ as _t, B as vt, Ct as yt, Dt as bt, Et as xt, F as St, G as Ct, H as wt, I as Tt, J as Et, K as Dt, L as Ot, Q as kt, R as At, Tt as jt, U as Mt, V as Nt, W as Pt, X as Ft, Y as It, Z as Lt, _t as Rt, at as zt, ct as Bt, dt as Vt, et as Ht, ft as Ut, gt as Wt, ht as Gt, it as Kt, lt as qt, mt as Jt, nt as Yt, ot as Xt, pt as Zt, q as Qt, rt as $t, st as en, tt as tn, ut as nn, wt as rn, z as an } from "./WorldProps-CQrtF4CO.js";
4
- import { A as on, B as sn, C as cn, D as ln, E as un, G as dn, H as fn, I as pn, J as mn, K as hn, L as gn, M as _n, O as vn, R as yn, S as bn, T as xn, U as Sn, V as Cn, W as wn, Y as Tn, Z as En, _ as Dn, a as On, b as kn, c as An, d as jn, f as Mn, g as Nn, h as Pn, i as Fn, it as In, j as Ln, l as Rn, m as zn, n as Bn, nt as Vn, o as Hn, p as Un, q as Wn, r as Gn, rt as Kn, s as qn, t as Jn, tt as Yn, u as Xn, v as Zn, w as Qn, x as $n, y as er, z as tr } from "./plugin-KFnkRLsd.js";
4
+ import { A as on, B as sn, C as cn, D as ln, E as un, G as dn, H as fn, I as pn, J as mn, K as hn, L as gn, M as _n, O as vn, R as yn, S as bn, T as xn, U as Sn, V as Cn, W as wn, Y as Tn, Z as En, _ as Dn, a as On, b as kn, c as An, d as jn, f as Mn, g as Nn, h as Pn, i as Fn, it as In, j as Ln, l as Rn, m as zn, n as Bn, nt as Vn, o as Hn, p as Un, q as Wn, r as Gn, rt as Kn, s as qn, t as Jn, tt as Yn, u as Xn, v as Zn, w as Qn, x as $n, y as er, z as tr } from "./plugin-Dsf9EwPP.js";
5
5
  import { a as nr, i as rr, n as ir, o as ar, r as or, t as sr } from "./loader-ILIhPMOR.js";
6
- export { Te as ANIMATION_PANEL_DEFAULT_CLASSES, $ as ANIMATION_PANEL_DEFAULT_LABELS, Ue as ANIMATION_PANEL_DEFAULT_TABS, lt as AnimationPanel, T as BUILDING_BASIC_OBJECT_OPTIONS, w as BUILDING_FLAG_STYLE_OPTIONS, E as BUILDING_PLACED_OBJECT_OPTIONS, S as BUILDING_STORE_SERVICE, h as BUILDING_TILE_GROUP_DRAG_TYPE, e as BUILDING_TILE_OBJECT_OPTIONS, M as BUILDING_TILE_PRESETS, K as BUILDING_TILE_PRESET_DRAG_TYPE, V as BUILDING_TILE_SHAPE_OPTIONS, W as BUILDING_TREE_COLOR_PRESETS, I as BUILDING_TREE_OPTIONS, O as BUILDING_WALL_KIND_OPTIONS, H as BUILDING_WALL_PRESETS, G as BUILDING_WEATHER_EFFECT_OPTIONS, A as BUILDING_WORLD_SURFACE_OPTIONS, Sn as Billboard, hn as BlockSystem, Pn as BuildingController, Mn as BuildingGpuCullingDriver, zn as BuildingGpuMirrorDriver, Un as BuildingGpuUploadDriver, Xn as BuildingIndirectArgsUploadDriver, jn as BuildingIndirectDrawDriver, Yn as BuildingNavigationObstacleDriver, xe as BuildingPanel, Dn as BuildingRenderStateDriver, $n as BuildingSystem, qn as BuildingUI, Nn as BuildingVisibilityDriver, Re as CAMERA_PANEL_DEFAULT_CLASSES, nt as CAMERA_PANEL_DEFAULT_LABELS, st as CAMERA_PANEL_DEFAULT_TABS, ie as CAMERA_SETTINGS_DEFAULT_CLASSES, pt as CAMERA_SETTINGS_DEFAULT_LABELS, Ae as CAMERA_SETTINGS_DEFAULT_SECTIONS, ar as CONTENT_SCHEMA_VERSION, Ve as CameraPanel, Oe as CameraSettingsTab, se as CinematicPanel, ce as CommandPalette, Jn as DEFAULT_BUILDING_GRID_EXTENSION_ID, Kn as DEFAULT_BUILDING_OBJECT_CATALOG, Bn as DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID, Gn as DEFAULT_BUILDING_SAVE_EXTENSION_ID, Fn as DEFAULT_BUILDING_STORE_SERVICE_ID, Se as DEFAULT_EDITOR_SHORTCUTS, $t as DRAW_CLUSTER_BILLBOARD, Kt as DRAW_CLUSTER_BLOCK, zt as DRAW_CLUSTER_COUNT, Lt as DRAW_CLUSTER_DESCRIPTORS, Xt as DRAW_CLUSTER_FIRE, en as DRAW_CLUSTER_FLAG, Bt as DRAW_CLUSTER_GRASS, qt as DRAW_CLUSTER_MODEL, nn as DRAW_CLUSTER_SAKURA, Vt as DRAW_CLUSTER_SAND, Ut as DRAW_CLUSTER_SNOWFIELD, Zt as DRAW_CLUSTER_TILE, Jt as DRAW_CLUSTER_WALL, Gt as DRAW_CLUSTER_WATER, fe as EDITOR_PANEL_COMPONENT_KIND, ut as EMPTY_EDITOR_SELECTION, re as Editor, ft as EditorLayout, z as FLAG_STYLE_META, fn as Fire, Dt as GPU_META_STRIDE, Qt as GPU_SPATIAL_STRIDE, ae as GameplayEventPanel, mn as GpuBatchBridge, vn as Grass, tr as GrassDriver, sn as GrassManagerProvider, wn as GridHelper, Pe as HierarchyPanel, sr as HttpContentBundleSource, kt as INDIRECT_DRAW_STRIDE, le as InspectorPanel, he as MOTION_PANEL_DEFAULT_CLASSES, it as MOTION_PANEL_DEFAULT_LABELS, me as MOTION_PANEL_DEFAULT_TABS, Wn as MaterialManager, Fe as MotionPanel, Je as PROJECT_ASSETS_PANEL_DEFAULT_CLASSES, _e as PROJECT_ASSETS_PANEL_DEFAULT_KIND_OPTIONS, ye as PROJECT_ASSETS_PANEL_DEFAULT_LABELS, Ce as PROJECT_ASSETS_PANEL_DEFAULT_TABS, de as PerformancePanel, ee as ProjectAssetsPanel, De as ResizablePanel, gn as Sakura, yn as SakuraBatch, un as Sand, ln as SandBatch, dt as SceneObjectTransformGizmo, pn as Snow, Qn as Snowfield, xn as SnowfieldBatch, ke as StudioPanel, cn as TileSystem, Xe as VehiclePanel, bn as WallSystem, on as Water, Vn as applyBuildingNavigationObstacles, ht as applySceneTransform, q as blockToPlacementEntry, Et as buildBuildingGpuMirror, _t as buildBuildingIndirectDrawMirror, j as buildingCellToWorld, N as buildingGridAdapter, U as buildingGroupsToPlacementEntries, B as buildingPlacementAdapter, On as buildingPlugin, F as cellToTilePosition, He as clearEditorSelection, P as createBlockFootprint, yt as createBuildingCullingStore, It as createBuildingGpuUploadPlan, Ht as createBuildingIndirectDrawUploadPlan, D as createBuildingPlacementEngine, Hn as createBuildingPlugin, At as createBuildingRenderStore, Rn as createBuildingScopeId, c as createBuildingStore, St as createBuildingVisibilityStore, nr as createContentBundleFromSaveSystem, An as createCustomMeshId, ct as createEditorCommandStack, Le as createEditorPlayModeController, we as createEditorSaveStatus, We as createEditorSelectionState, et as createEditorShell, Ze as createEditorShortcutRegistry, Be as createEditorSlice, at as createEditorTransaction, Nt as createEmptyBuildingGpuUploadResources, tn as createEmptyBuildingIndirectDrawMirror, Ft as createEmptyGpuMirror, xt as createGrassManager, qe as createSceneObjectEditorCommands, _n as createShoreField, Zn as createTerrainBlockMaterial, J as createTileFootprint, En as createTileSampler, wt as destroyBuildingGpuUploadResources, Z as edgeKey, k as edgeSideToWallRotation, X as edgeToWallTransform, Qe as editorSlice, er as findTerrainBlockMaterial, te as formatEditorShortcut, rt as getActiveSceneObject, _ as getBlockSupportHeight, r as getBuildingSupportHeight, In as getDefaultBuildingObject, Wt as getDrawClusterForSnapshotEntry, ue as getEditorSaveStatusLabel, bt as getGrassManager, Yt as getIndirectInstanceCount, pe as getNextAutosaveAt, Y as getTileSupportHeight, dn as getWallMaterialKey, Mt as getWebGPUDeviceFromRenderer, v as hasTileCollision, a as hasWallCollision, i as indexAabb, Ye as isEditableShortcutTarget, je as isEditorPanelComponentExtension, $e as isSceneObjectSelected, ir as loadContentBundleFromManifest, ge as markEditorDirty, Ee as markEditorSaveError, gt as markEditorSaved, ne as markEditorSaving, ve as matchesEditorShortcut, p as normalizeQuarterTurnRotation, ze as object3DToSceneTransform, R as pair, Rt as parseBuildingGpuVisibilityFlags, t as queryAabbIds, Ne as resolveEditorPanelComponentExtensions, Ke as selectSceneObject, Ge as selectSceneObjectRange, Ie as setSceneObjectHover, Me as shouldRunEditorAutosave, L as snapBuildingPosition, mt as snapSceneTransform, Tn as supportsGpuInstanceBatches, Pt as syncBuildingGpuBuffers, Ct as syncBuildingIndirectArgsBuffer, d as tileFootprintKeys, f as tileGroupToPlacementEntries, m as tileHalfSize, o as tileOverlaps, l as tilePositionToCell, u as tileToPlacementEntry, g as unindexId, kn as useBuildingEditor, rn as useBuildingGpuCullingStore, jt as useBuildingGpuCullingStoreApi, an as useBuildingRenderStateStore, vt as useBuildingRenderStateStoreApi, b as useBuildingStore, C as useBuildingStoreApi, Tt as useBuildingVisibilityStore, Ot as useBuildingVisibilityStoreApi, tt as useEditor, be as useEditorAutosave, oe as useEditorShortcuts, ot as useEditorStore, Cn as useGrassManager, Ln as useShoreField, or as validateContentBundle, rr as validateContentBundleManifest, Q as wallGroupToPlacementEntries, n as wallToPlacementEntry, x as wallTransformToEdge, s as worldToBuildingCell, y as zigZag };
6
+ export { Ve as ANIMATION_PANEL_DEFAULT_CLASSES, ct as ANIMATION_PANEL_DEFAULT_LABELS, $e as ANIMATION_PANEL_DEFAULT_TABS, it as AnimationPanel, T as BUILDING_BASIC_OBJECT_OPTIONS, w as BUILDING_FLAG_STYLE_OPTIONS, E as BUILDING_PLACED_OBJECT_OPTIONS, S as BUILDING_STORE_SERVICE, h as BUILDING_TILE_GROUP_DRAG_TYPE, e as BUILDING_TILE_OBJECT_OPTIONS, M as BUILDING_TILE_PRESETS, K as BUILDING_TILE_PRESET_DRAG_TYPE, V as BUILDING_TILE_SHAPE_OPTIONS, W as BUILDING_TREE_COLOR_PRESETS, I as BUILDING_TREE_OPTIONS, O as BUILDING_WALL_KIND_OPTIONS, H as BUILDING_WALL_PRESETS, G as BUILDING_WEATHER_EFFECT_OPTIONS, A as BUILDING_WORLD_SURFACE_OPTIONS, Sn as Billboard, hn as BlockSystem, Pn as BuildingController, Mn as BuildingGpuCullingDriver, zn as BuildingGpuMirrorDriver, Un as BuildingGpuUploadDriver, Xn as BuildingIndirectArgsUploadDriver, jn as BuildingIndirectDrawDriver, Yn as BuildingNavigationObstacleDriver, xe as BuildingPanel, Dn as BuildingRenderStateDriver, $n as BuildingSystem, qn as BuildingUI, Nn as BuildingVisibilityDriver, ot as CAMERA_PANEL_DEFAULT_CLASSES, ze as CAMERA_PANEL_DEFAULT_LABELS, Xe as CAMERA_PANEL_DEFAULT_TABS, Oe as CAMERA_SETTINGS_DEFAULT_CLASSES, ae as CAMERA_SETTINGS_DEFAULT_LABELS, re as CAMERA_SETTINGS_DEFAULT_SECTIONS, ar as CONTENT_SCHEMA_VERSION, ut as CameraPanel, pt as CameraSettingsTab, ie as CinematicPanel, Se as CommandPalette, Jn as DEFAULT_BUILDING_GRID_EXTENSION_ID, Kn as DEFAULT_BUILDING_OBJECT_CATALOG, Bn as DEFAULT_BUILDING_PLACEMENT_EXTENSION_ID, Gn as DEFAULT_BUILDING_SAVE_EXTENSION_ID, Fn as DEFAULT_BUILDING_STORE_SERVICE_ID, $ as DEFAULT_EDITOR_SHORTCUTS, $t as DRAW_CLUSTER_BILLBOARD, Kt as DRAW_CLUSTER_BLOCK, zt as DRAW_CLUSTER_COUNT, Lt as DRAW_CLUSTER_DESCRIPTORS, Xt as DRAW_CLUSTER_FIRE, en as DRAW_CLUSTER_FLAG, Bt as DRAW_CLUSTER_GRASS, qt as DRAW_CLUSTER_MODEL, nn as DRAW_CLUSTER_SAKURA, Vt as DRAW_CLUSTER_SAND, Ut as DRAW_CLUSTER_SNOWFIELD, Zt as DRAW_CLUSTER_TILE, Jt as DRAW_CLUSTER_WALL, Gt as DRAW_CLUSTER_WATER, je as EDITOR_PANEL_COMPONENT_KIND, lt as EMPTY_EDITOR_SELECTION, te as Editor, ft as EditorLayout, z as FLAG_STYLE_META, fn as Fire, Dt as GPU_META_STRIDE, Qt as GPU_SPATIAL_STRIDE, ne as GameplayEventPanel, mn as GpuBatchBridge, vn as Grass, tr as GrassDriver, sn as GrassManagerProvider, wn as GridHelper, me as HierarchyPanel, sr as HttpContentBundleSource, kt as INDIRECT_DRAW_STRIDE, he as InspectorPanel, fe as MOTION_PANEL_DEFAULT_CLASSES, Ne as MOTION_PANEL_DEFAULT_LABELS, Me as MOTION_PANEL_DEFAULT_TABS, Wn as MaterialManager, Pe as MotionPanel, ye as PROJECT_ASSETS_PANEL_DEFAULT_CLASSES, Ce as PROJECT_ASSETS_PANEL_DEFAULT_KIND_OPTIONS, oe as PROJECT_ASSETS_PANEL_DEFAULT_LABELS, ue as PROJECT_ASSETS_PANEL_DEFAULT_TABS, nt as PerformancePanel, _e as ProjectAssetsPanel, Ee as ResizablePanel, gn as Sakura, yn as SakuraBatch, un as Sand, ln as SandBatch, dt as SceneObjectTransformGizmo, pn as Snow, Qn as Snowfield, xn as SnowfieldBatch, De as StudioPanel, cn as TileSystem, Ke as VehiclePanel, bn as WallSystem, on as Water, Vn as applyBuildingNavigationObstacles, ht as applySceneTransform, q as blockToPlacementEntry, Et as buildBuildingGpuMirror, _t as buildBuildingIndirectDrawMirror, j as buildingCellToWorld, N as buildingGridAdapter, U as buildingGroupsToPlacementEntries, B as buildingPlacementAdapter, On as buildingPlugin, F as cellToTilePosition, Be as clearEditorSelection, P as createBlockFootprint, yt as createBuildingCullingStore, It as createBuildingGpuUploadPlan, Ht as createBuildingIndirectDrawUploadPlan, D as createBuildingPlacementEngine, Hn as createBuildingPlugin, At as createBuildingRenderStore, Rn as createBuildingScopeId, c as createBuildingStore, St as createBuildingVisibilityStore, nr as createContentBundleFromSaveSystem, An as createCustomMeshId, st as createEditorCommandStack, Ie as createEditorPlayModeController, de as createEditorSaveStatus, He as createEditorSelectionState, Qe as createEditorShell, qe as createEditorShortcutRegistry, Re as createEditorSlice, rt as createEditorTransaction, Nt as createEmptyBuildingGpuUploadResources, tn as createEmptyBuildingIndirectDrawMirror, Ft as createEmptyGpuMirror, xt as createGrassManager, Ge as createSceneObjectEditorCommands, _n as createShoreField, Zn as createTerrainBlockMaterial, J as createTileFootprint, En as createTileSampler, wt as destroyBuildingGpuUploadResources, Z as edgeKey, k as edgeSideToWallRotation, X as edgeToWallTransform, Ye as editorSlice, er as findTerrainBlockMaterial, ve as formatEditorShortcut, tt as getActiveSceneObject, _ as getBlockSupportHeight, r as getBuildingSupportHeight, In as getDefaultBuildingObject, Wt as getDrawClusterForSnapshotEntry, ge as getEditorSaveStatusLabel, bt as getGrassManager, Yt as getIndirectInstanceCount, Te as getNextAutosaveAt, Y as getTileSupportHeight, dn as getWallMaterialKey, Mt as getWebGPUDeviceFromRenderer, v as hasTileCollision, a as hasWallCollision, i as indexAabb, be as isEditableShortcutTarget, ce as isEditorPanelComponentExtension, Ze as isSceneObjectSelected, ir as loadContentBundleFromManifest, gt as markEditorDirty, ee as markEditorSaveError, Ae as markEditorSaved, le as markEditorSaving, we as matchesEditorShortcut, p as normalizeQuarterTurnRotation, Le as object3DToSceneTransform, R as pair, Rt as parseBuildingGpuVisibilityFlags, t as queryAabbIds, pe as resolveEditorPanelComponentExtensions, We as selectSceneObject, Ue as selectSceneObjectRange, Fe as setSceneObjectHover, ke as shouldRunEditorAutosave, L as snapBuildingPosition, mt as snapSceneTransform, Tn as supportsGpuInstanceBatches, Pt as syncBuildingGpuBuffers, Ct as syncBuildingIndirectArgsBuffer, d as tileFootprintKeys, f as tileGroupToPlacementEntries, m as tileHalfSize, o as tileOverlaps, l as tilePositionToCell, u as tileToPlacementEntry, g as unindexId, kn as useBuildingEditor, rn as useBuildingGpuCullingStore, jt as useBuildingGpuCullingStoreApi, an as useBuildingRenderStateStore, vt as useBuildingRenderStateStoreApi, b as useBuildingStore, C as useBuildingStoreApi, Tt as useBuildingVisibilityStore, Ot as useBuildingVisibilityStoreApi, et as useEditor, se as useEditorAutosave, Je as useEditorShortcuts, at as useEditorStore, Cn as useGrassManager, Ln as useShoreField, or as validateContentBundle, rr as validateContentBundleManifest, Q as wallGroupToPlacementEntries, n as wallToPlacementEntry, x as wallTransformToEdge, s as worldToBuildingCell, y as zigZag };
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-Chgba0Kb.cjs"),t=require("./shell-BRQStYy9.cjs");let n=require("react");n=e.n(n,1);let r=require("react/jsx-runtime"),i=require("@xyflow/react");var a=240,o=130,s={"node.a11yDescription.default":`Enter 또는 스페이스 키로 노드를 선택하세요. Delete 키로 삭제하고 Escape 키로 선택을 해제합니다.`,"node.a11yDescription.keyboardDisabled":`Enter 또는 스페이스 키로 노드를 선택하고 방향키로 이동하세요. Delete 키로 삭제하고 Escape 키로 선택을 해제합니다.`,"node.a11yDescription.ariaLiveMessage":({x:e,y:t})=>`선택한 노드를 이동했습니다. 위치: 가로 ${e}, 세로 ${t}`,"edge.a11yDescription.default":`Enter 또는 스페이스 키로 연결을 선택하세요. Delete 키로 삭제하고 Escape 키로 선택을 해제합니다.`,"handle.ariaLabel":`노드 연결점`,"controls.ariaLabel":`행동 그래프 조작`,"controls.zoomIn.ariaLabel":`그래프 확대`,"controls.zoomOut.ariaLabel":`그래프 축소`,"controls.fitView.ariaLabel":`그래프 전체 보기`,"controls.interactive.ariaLabel":`그래프 조작 잠금 전환`,"minimap.ariaLabel":`행동 그래프 미니맵`},c={borderRadius:10,border:`1px solid #3b4258`,padding:`8px 10px`,color:`#e5e7eb`,background:`#182033`,minWidth:140,textAlign:`center`,fontSize:12,fontWeight:600},l={start:{background:`#1b2f2a`,borderColor:`#2f6d5b`},condition:{background:`#2d2435`,borderColor:`#6b4f81`},action:{background:`#1f2b44`,borderColor:`#4366a9`}},u={next:`#8b9bb4`,true:`#34d399`,false:`#f87171`},d=(e,n)=>e.nodes.map((e,r)=>{let i=r%4,s=Math.floor(r/4);return{id:e.id,position:{x:i*a,y:s*o},data:{label:t.k(e)},draggable:!0,deletable:e.type!==`start`,style:{...c,...l[e.type],...n===e.id?{boxShadow:`0 0 0 2px #60a5fa`}:{}}}}),f=(e,n)=>e.edges.map(e=>{let r=e.branch??`next`;return{id:e.id,source:e.source,target:e.target,label:t.A(r),animated:n===e.id,markerEnd:{type:i.MarkerType.ArrowClosed,color:u[r]},style:{stroke:u[r],strokeWidth:n===e.id?2.5:1.6},labelStyle:{fill:`#d1d5db`,fontSize:11,fontWeight:700},labelBgStyle:{fill:`#111827`,fillOpacity:.85},labelBgPadding:[4,2],labelBgBorderRadius:4}});function p({blueprint:e,selectedNodeId:t,selectedEdgeId:a,onSelectNode:o,onSelectEdge:c,onDelete:l}){let u=n.default.useMemo(()=>d(e,t),[e,t]),p=n.default.useMemo(()=>f(e,a),[e,a]),[m,h,g]=(0,i.useNodesState)(u),[_,v,y]=(0,i.useEdgesState)(p);n.default.useEffect(()=>{h(e=>{let t=new Map(e.map(e=>[e.id,e.position]));return u.map(e=>{let n=t.get(e.id);return n?{...e,position:n}:e})})},[u,h]),n.default.useEffect(()=>{v(p)},[p,v]);let b=n.default.useCallback((e,t)=>{o(t.id)},[o]),x=n.default.useCallback((e,t)=>{c(t.id),o(t.source)},[c,o]);return(0,r.jsxs)(i.ReactFlow,{nodes:m,edges:_,onNodesChange:g,onEdgesChange:y,onNodeClick:b,onEdgeClick:x,onDelete:({nodes:e,edges:t})=>l(e.map(e=>e.id),t.map(e=>e.id)),deleteKeyCode:[`Backspace`,`Delete`],fitView:!0,fitViewOptions:{padding:.2},minZoom:.2,maxZoom:2,colorMode:`dark`,ariaLabelConfig:s,proOptions:{hideAttribution:!0},children:[(0,r.jsx)(i.MiniMap,{zoomable:!0,pannable:!0,nodeColor:`#64748b`}),(0,r.jsx)(i.Controls,{}),(0,r.jsx)(i.Background,{gap:20,size:1,color:`#334155`})]})}exports.BrainFlow=p;