@zylem/game-lib 0.9.7 → 0.9.9

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 (56) hide show
  1. package/dist/api/game-lib.api.json +179 -219
  2. package/dist/api/game-lib.api.md +11 -22
  3. package/dist/api/game-lib.d.ts +63 -114
  4. package/dist/api/game-lib.typedoc.json +70214 -61081
  5. package/dist/audio.js +1 -1
  6. package/dist/bridge.d.ts +14 -2
  7. package/dist/bridge.js +1 -1
  8. package/dist/catalog.js +1 -1
  9. package/dist/chunk-26EJFYDX.js +1 -0
  10. package/dist/chunk-2NO4YCLR.js +1 -0
  11. package/dist/{chunk-63T3K5EQ.js → chunk-3LXDHDJB.js} +1 -1
  12. package/dist/{chunk-CVKEWWIH.js → chunk-5NQGXW75.js} +1 -1
  13. package/dist/chunk-5WRFDAZN.js +1 -0
  14. package/dist/{chunk-OCQ7A5IK.js → chunk-B6GDESCB.js} +1 -1
  15. package/dist/chunk-BJYXY2FB.js +1 -0
  16. package/dist/{chunk-AJSIVGDX.js → chunk-CI7A5N6G.js} +1 -1
  17. package/dist/chunk-GQXYD2JG.js +1 -0
  18. package/dist/{chunk-SD7EHS4W.js → chunk-ICJ2E2OV.js} +1 -1
  19. package/dist/chunk-JUA5KNND.js +24 -0
  20. package/dist/chunk-SIRFF4DY.js +1 -0
  21. package/dist/chunk-T6O2SGH5.js +1 -0
  22. package/dist/{chunk-IHGRFR4H.js → chunk-UNCP6V7I.js} +1 -1
  23. package/dist/chunk-VUTKEMIE.js +1 -0
  24. package/dist/{chunk-MJ7RGE47.js → chunk-YFXNZ2RS.js} +1 -1
  25. package/dist/chunk-YW2GTHCV.js +19 -0
  26. package/dist/{chunk-DYD7MDWO.js → chunk-YWH5HQDT.js} +1 -1
  27. package/dist/cinematics.d.ts +1 -2
  28. package/dist/core.d.ts +13 -12
  29. package/dist/core.js +1 -1
  30. package/dist/{debug-state-BgX5Q0Ff.d.ts → debug-state-JRneI6c2.d.ts} +1 -1
  31. package/dist/debug.d.ts +23 -2
  32. package/dist/debug.js +1 -1
  33. package/dist/entity.js +1 -1
  34. package/dist/fbx-loader-SDI6QYTS.js +1 -0
  35. package/dist/game-default-FRKFJOJX.js +1 -0
  36. package/dist/{game-CmkhPP-9.d.ts → game-uQd7k6-m.d.ts} +1 -1
  37. package/dist/gaussian-splat-loader-ACFJKCCL.js +1 -0
  38. package/dist/geometry-mesh-loader-XDJV77TU.js +1 -0
  39. package/dist/graphics.js +1 -1
  40. package/dist/obj-loader-SI5RVY24.js +1 -0
  41. package/dist/placement.js +1 -1
  42. package/dist/public.d.ts +4 -5
  43. package/dist/public.js +1 -1
  44. package/dist/sog-loader-BZFMQ3ZB.js +1 -0
  45. package/dist/{stage-CCGJh9TD.d.ts → stage-Dez16Gxm.d.ts} +10 -9
  46. package/dist/usd-loader-PCBATNPM.js +1 -0
  47. package/dist/web-components.d.ts +3 -4
  48. package/package.json +6 -3
  49. package/dist/chunk-47HAZZWF.js +0 -1
  50. package/dist/chunk-JJEYLGD2.js +0 -24
  51. package/dist/chunk-KL7NGD76.js +0 -1
  52. package/dist/chunk-M2FZ224T.js +0 -1
  53. package/dist/chunk-Q22Z4PBD.js +0 -19
  54. package/dist/chunk-UKNMIHAP.js +0 -1
  55. package/dist/game-default-LAGMEHNQ.js +0 -1
  56. package/dist/level-types-D10LiOcn.d.ts +0 -91
@@ -1 +1 @@
1
- import{a as V,b as A,c as M,d as R}from"./chunk-IHGRFR4H.js";import{D as c,F as b,b as G,c as xt,d as Ot,e as St,f as wt,g as vt,h as Ct,r as p,s as f}from"./chunk-AJSIVGDX.js";import{l as bt}from"./chunk-Q22Z4PBD.js";import{a as yt,b as Y,c as gt,d as ft,g as U,h as j,i as z}from"./chunk-7WRQ2UAN.js";import{BoxGeometry as Qt,CapsuleGeometry as te,ConeGeometry as Pt,CylinderGeometry as ee,Mesh as _,MeshStandardMaterial as ie,SphereGeometry as oe}from"three";function D(e,t=Symbol("mesh")){if(e.material||e.color){let i=new bt;if(i.build({...e.material,color:e.color??e.material?.color},t),i.materials.length>0)return i.materials}return[new ie]}function Z(e,t){if(t.position){let i=j(t.position,gt);e.position.set(i.x,i.y,i.z)}return e.castShadow=!0,e.receiveShadow=!0,e}function Mt(e={}){let t=j(e.size,ft),i=new Qt(t.x,t.y,t.z),o=D(e);return Z(new _(i,o.at(-1)),e)}function Rt(e={}){let t=new oe(e.radius??1),i=D(e);return Z(new _(t,i.at(-1)),e)}function _t(e={}){let t=new Pt(e.radius??1,e.height??2,e.radialSegments??32),i=D(e);return Z(new _(t,i.at(-1)),e)}function Dt(e={}){let t=new Pt(e.radius??1,e.height??2,4),i=D(e);return Z(new _(t,i.at(-1)),e)}function Zt(e={}){let t=new ee(e.radiusTop??1,e.radiusBottom??1,e.height??2,e.radialSegments??32),i=D(e);return Z(new _(t,i.at(-1)),e)}function Tt(e={}){let t=new te(e.radius??.5,e.length??1,e.capSegments??10,e.radialSegments??20),i=D(e);return Z(new _(t,i.at(-1)),e)}import{Vector3 as le}from"three";import{MeshStandardMaterial as ne,MeshBasicMaterial as se,MeshPhongMaterial as re}from"three";function ae(e){return e&&typeof e.getDebugInfo=="function"}var m=class{entity;constructor(t){this.entity=t}getPositionString(){if(this.entity.mesh){let{x:n,y:s,z:l}=this.entity.mesh.position;return`${n.toFixed(2)}, ${s.toFixed(2)}, ${l.toFixed(2)}`}let{x:t,y:i,z:o}=this.entity.options.position||{x:0,y:0,z:0};return`${t.toFixed(2)}, ${i.toFixed(2)}, ${o.toFixed(2)}`}getRotationString(){if(this.entity.mesh){let{x:s,y:l,z:r}=this.entity.mesh.rotation,a=u=>(u*180/Math.PI).toFixed(1);return`${a(s)}\xB0, ${a(l)}\xB0, ${a(r)}\xB0`}let{x:t,y:i,z:o}=this.entity.options.rotation||{x:0,y:0,z:0},n=s=>(s*180/Math.PI).toFixed(1);return`${n(t)}\xB0, ${n(i)}\xB0, ${n(o)}\xB0`}getMaterialInfo(){if(!this.entity.mesh||!this.entity.mesh.material)return{type:"none"};let t=Array.isArray(this.entity.mesh.material)?this.entity.mesh.material[0]:this.entity.mesh.material,i={type:t.type};return(t instanceof ne||t instanceof se||t instanceof re)&&(i.color=`#${t.color.getHexString()}`,i.opacity=t.opacity,i.transparent=t.transparent),"roughness"in t&&(i.roughness=t.roughness),"metalness"in t&&(i.metalness=t.metalness),i}getPhysicsInfo(){if(!this.entity.body)return null;let t={type:this.entity.body.bodyType(),mass:this.entity.body.mass(),isEnabled:this.entity.body.isEnabled(),isSleeping:this.entity.body.isSleeping()},i=this.entity.body.linvel();return t.velocity=`${i.x.toFixed(2)}, ${i.y.toFixed(2)}, ${i.z.toFixed(2)}`,t}buildDebugInfo(){let t={name:this.entity.name||this.entity.uuid,uuid:this.entity.uuid,position:this.getPositionString(),rotation:this.getRotationString(),material:this.getMaterialInfo()},i=this.getPhysicsInfo();if(i&&(t.physics=i),ae(this.entity)){let o=this.entity.getDebugInfo();return{...t,...o}}return t}};var Et={...p,size:new le(1,1,1)},ce=Symbol("Box"),q=class e extends c{static type=ce;constructor(t){super(),this.options={...Et,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),{x:o,y:n,z:s}=this.options.size??{x:1,y:1,z:1};return{...i,type:String(e.type),size:`${o}, ${n}, ${s}`}}};function he(...e){let t=f(e,Et),i=new q(t);return i.add(Mt({size:t.size,material:t.material,color:t.color}),xt({size:t.size,static:t.collision?.static,sensor:t.collision?.sensor,canSleep:t.collision?.canSleep,ccdEnabled:t.collision?.ccdEnabled,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>he(o??{}))}var zt={...p,radius:1},me=Symbol("Sphere"),J=class e extends c{static type=me;constructor(t){super(),this.options={...zt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1;return{...i,type:String(e.type),radius:o.toFixed(2)}}};function pe(...e){let t=f(e,zt),i=new J(t);return i.add(Rt({radius:t.radius,material:t.material,color:t.color}),Ot({radius:t.radius,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>pe(o??{}))}var It={...p,radius:1,height:2,radialSegments:32},ue=Symbol("Cone"),K=class e extends c{static type=ue;constructor(t){super(),this.options={...It,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1,n=this.options.height??2;return{...i,type:String(e.type),radius:o.toFixed(2),height:n.toFixed(2)}}};function de(...e){let t=f(e,It),i=new K(t);return i.add(_t({radius:t.radius,height:t.height,radialSegments:t.radialSegments,material:t.material,color:t.color}),St({radius:t.radius,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>de(o??{}))}var Bt={...p,radius:1,height:2},ye=Symbol("Pyramid"),Q=class e extends c{static type=ye;constructor(t){super(),this.options={...Bt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1,n=this.options.height??2;return{...i,type:String(e.type),radius:o.toFixed(2),height:n.toFixed(2)}}};function ge(...e){let t=f(e,Bt),i=new Q(t);return i.add(Dt({radius:t.radius,height:t.height,material:t.material,color:t.color}),wt({radius:t.radius,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>ge(o??{}))}var Lt={...p,radiusTop:1,radiusBottom:1,height:2,radialSegments:32},fe=Symbol("Cylinder"),tt=class e extends c{static type=fe;constructor(t){super(),this.options={...Lt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radiusTop??1,n=this.options.radiusBottom??1,s=this.options.height??2;return{...i,type:String(e.type),radiusTop:o.toFixed(2),radiusBottom:n.toFixed(2),height:s.toFixed(2)}}};function be(...e){let t=f(e,Lt),i=new tt(t);return i.add(Zt({radiusTop:t.radiusTop,radiusBottom:t.radiusBottom,height:t.height,radialSegments:t.radialSegments,material:t.material,color:t.color}),vt({radiusTop:t.radiusTop,radiusBottom:t.radiusBottom,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>be(o??{}))}var kt={...p,radius:.5,length:1,capSegments:10,radialSegments:20},xe=Symbol("Pill"),et=class e extends c{static type=xe;constructor(t){super(),this.options={...kt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??.5,n=this.options.length??1;return{...i,type:String(e.type),radius:o.toFixed(2),length:n.toFixed(2)}}};function Oe(...e){let t=f(e,kt),i=new et(t);return i.add(Tt({radius:t.radius,length:t.length,capSegments:t.capSegments,radialSegments:t.radialSegments,material:t.material,color:t.color}),Ct({radius:t.radius,length:t.length,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>Oe(o??{}))}import{Group as Se,RingGeometry as we}from"three";var Ft={...p,innerRadius:0,outerRadius:1,thetaSegments:32},it=class extends V{collider(t){let i=t.outerRadius??1;return{shape:{type:"cylinder",halfHeight:.1/2,radius:i}}}},ot=class extends A{build(t){let i=t.innerRadius??0,o=t.outerRadius??1,n=t.thetaSegments??32,s=new we(i,o,n);return s.rotateX(-Math.PI/2),s}},nt=class extends M{createEntity(t){return new I(t)}build(){let t=super.build();return t.mesh&&!t.group&&(t.group=new Se,t.group.add(t.mesh)),t}},ve=Symbol("Disk"),I=class e extends c{static type=ve;constructor(t){super(),this.options={...Ft,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.innerRadius??0,n=this.options.outerRadius??1;return{...i,type:String(e.type),innerRadius:o.toFixed(2),outerRadius:n.toFixed(2)}}};function Ce(...e){return R({args:e,defaultConfig:Ft,EntityClass:I,BuilderClass:nt,MeshBuilderClass:ot,CollisionBuilderClass:it,entityType:I.type,cloneFactory:t=>Ce(t??{})})}import{PlaneGeometry as Me,Vector2 as Gt,Vector3 as Vt}from"three";import{BufferGeometry as Pe,Float32BufferAttribute as st}from"three";var H=class e extends Pe{constructor(t=1,i=1,o=1,n=1){super(),this.type="XZPlaneGeometry",this.parameters={width:t,height:i,widthSegments:o,heightSegments:n};let s=t/2,l=i/2,r=Math.floor(o),a=Math.floor(n),u=r+1,v=a+1,w=t/r,g=i/a,d=[],x=[],O=[],T=[];for(let y=0;y<v;y++){let h=y*g-l;for(let S=0;S<u;S++){let P=S*w-s;x.push(P,0,h),O.push(0,1,0),T.push(S/r),T.push(1-y/a)}}for(let y=0;y<a;y++)for(let h=0;h<r;h++){let S=h+u*y,P=h+u*(y+1),E=h+1+u*(y+1),C=h+1+u*y;d.push(S,P,C),d.push(P,E,C)}this.setIndex(d),this.setAttribute("position",new st(x,3)),this.setAttribute("normal",new st(O,3)),this.setAttribute("uv",new st(T,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.widthSegments,t.heightSegments)}};var N=4,At={...p,tile:new Gt(10,10),repeat:new Gt(1,1),collision:{static:!0},subdivisions:N,randomizeHeight:!1,heightScale:1};function Ht(e){let t=e.subdivisions??N,i=e.heightMap2D,o=e.heightMap,n=e.subdivisionsX??t,s=e.subdivisionsZ??t;return i&&i.length>0&&i[0]?.length>0?(s=i.length-1,n=i[0].length-1):o&&o.length>0&&(n=o.length-1),{subdivisionsX:n,subdivisionsZ:s}}var rt=class extends V{collider(t){let i=z(t.tile,Y),{subdivisionsX:o,subdivisionsZ:n}=Ht(t),s=new Vt(i.x,1,i.y),l=t._builders?.meshBuilder?.heightData??new Float32Array((o+1)*(n+1));return{shape:{type:"heightfield",rows:o,cols:n,heights:l,scale:[s.x,1,s.z]}}}},at=class extends A{heightData=new Float32Array;columnsRows=new Map;subdivisionsX=N;subdivisionsZ=N;build(t){let i=z(t.tile,Y),{subdivisionsX:o,subdivisionsZ:n}=Ht(t);this.subdivisionsX=o,this.subdivisionsZ=n;let s=new Vt(i.x,1,i.y),l=t.heightScale??1,r=new H(s.x,s.z,o,n),a=new Me(s.x,s.z,o,n),u=o>0?s.x/o:1,v=n>0?s.z/n:1,w=r.attributes.position.array,g=a.attributes.position.array,d=new Map,x=t.heightMap2D,O=t.heightMap,T=t.randomizeHeight??!1,y=(h,S)=>h<0?0:h>S?S:h;for(let h=0;h<g.length;h+=3){let S=g[h],P=g[h+1],E=y(Math.round((S+s.x/2)/u),o),C=y(Math.round((s.z/2-P)/v),n),F=0;if(x){let dt=x[C];dt&&(F=dt[E]??0)}else O&&O.length>0?F=O[E]??0:T&&(F=Math.random()*4);let X=F*l;g[h+2]=X,w[h+1]=X,d.get(C)||d.set(C,new Map),d.get(C).set(E,X)}return this.columnsRows=d,r}postBuild(){let t=[];for(let i=0;i<=this.subdivisionsX;++i)for(let o=0;o<=this.subdivisionsZ;++o){let n=this.columnsRows.get(o);t.push(n?.get(i)??0)}this.heightData=new Float32Array(t)}},lt=class extends M{createEntity(t){return new B(t)}},Re=Symbol("Plane"),B=class extends c{static type=Re;constructor(t){super(),this.options=G(At,t)}};function _e(...e){return R({args:e,defaultConfig:At,EntityClass:B,BuilderClass:lt,MeshBuilderClass:at,CollisionBuilderClass:rt,entityType:B.type,cloneFactory:t=>_e(t??{})})}import{Color as Xt,Group as Ze,Sprite as Te,SpriteMaterial as Ee,CanvasTexture as Yt,LinearFilter as $,Vector2 as mt,ClampToEdgeWrapping as Ut,ShaderMaterial as jt,Mesh as ze,PlaneGeometry as Ie,Vector3 as qt}from"three";var Nt={"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},center:{x:.5,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1}};function ct(e){return Nt[e]??Nt["top-left"]}function $t(e,t,i){let o=ct(e);return{x:o.x*i.width+t.x,y:o.y*i.height+t.y}}function ht(e){return{width:Math.max(1,e?.screenResolution?.x??1),height:Math.max(1,e?.screenResolution?.y??1)}}function De(e,t){let i=e.zoom||1;if(e.isPerspectiveCamera){let o=e,n=Math.tan(o.fov*Math.PI/180/2)*t/i;return{halfWidth:n*o.aspect,halfHeight:n}}if(e.isOrthographicCamera){let o=e;return{halfWidth:(o.right-o.left)/2/i,halfHeight:(o.top-o.bottom)/2/i}}return{halfWidth:1,halfHeight:1}}function Wt(e){let t=Math.max(.001,e.zDistance),{halfWidth:i,halfHeight:o}=De(e.camera,t),n=o*2/e.viewport.height,s=Math.max(1e-4,e.size.width*n),l=Math.max(1e-4,e.size.height*n),r=e.point.x/e.viewport.width*2-1,a=1-e.point.y/e.viewport.height*2;return{position:{x:r*i+(.5-e.pivot.x)*s,y:a*o+(e.pivot.y-.5)*l,z:-t},scale:{x:s,y:l}}}var W={position:void 0,width:120,height:48,fillColor:"#FFFFFF",strokeColor:null,strokeWidth:0,radius:0,padding:0,shape:"rect",image:null,stickToViewport:!0,screenPosition:new mt(24,24),zDistance:1},pt=class extends M{createEntity(t){return new L(t)}},Be=Symbol("Rect"),L=class e extends c{static type=Be;_sprite=null;_mesh=null;_texture=null;_canvas=null;_ctx=null;_cameraRef=null;_lastCanvasW=0;_lastCanvasH=0;_image=null;_imageSource=null;constructor(t){super(),this.options=G(W,t),this.options.screenPosition=z(this.options.screenPosition,W.screenPosition),this.group=new Ze,this.createSprite(),this.prependSetup(this.rectSetup.bind(this)),this.prependUpdate(this.rectUpdate.bind(this))}createSprite(){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._texture=new Yt(this._canvas),this._texture.minFilter=$,this._texture.magFilter=$;let t=new Ee({map:this._texture,transparent:!0,depthTest:!1,depthWrite:!1,alphaTest:.01});this._sprite=new Te(t),this.group?.add(this._sprite),this.loadImage(),this.redrawRect()}loadImage(){let t=this.options.image||null;if(t===this._imageSource||(this._imageSource=t,this._image=null,!t))return;let i=new Image;i.crossOrigin="anonymous",i.onload=()=>{this._imageSource===t&&(this._image=i,this.redrawRect())},i.src=t}redrawRect(){if(!this._canvas||!this._ctx)return;let t=Math.max(2,Math.floor(this.options.width??120)),i=Math.max(2,Math.floor(this.options.height??48)),o=this.options.padding??0,n=this.options.strokeWidth??0,s=t+o*2+n,l=i+o*2+n,r=Math.max(2,s),a=Math.max(2,l),u=r!==this._lastCanvasW||a!==this._lastCanvasH;this._canvas.width=r,this._canvas.height=a,this._lastCanvasW=r,this._lastCanvasH=a,this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let v=Math.max(0,this.options.radius??0),w=Math.floor(o+n/2),g=Math.floor(o+n/2),d=Math.floor(t),x=Math.floor(i);if(this._ctx.beginPath(),this.options.shape==="ellipse"?this._ctx.ellipse(w+d/2,g+x/2,d/2,x/2,0,0,Math.PI*2):v>0?this.roundedRectPath(this._ctx,w,g,d,x,v):this._ctx.rect(w,g,d,x),this.options.fillColor&&(this._ctx.fillStyle=this.toCssColor(this.options.fillColor),this._ctx.fill()),this._image&&(this._ctx.save(),this._ctx.clip(),this._ctx.drawImage(this._image,w,g,d,x),this._ctx.restore()),this.options.strokeColor&&n>0&&(this._ctx.lineWidth=n,this._ctx.strokeStyle=this.toCssColor(this.options.strokeColor),this._ctx.stroke()),this._texture){if(u&&(this._texture.dispose(),this._texture=new Yt(this._canvas),this._texture.minFilter=$,this._texture.magFilter=$,this._texture.wrapS=Ut,this._texture.wrapT=Ut,this._sprite&&this._sprite.material instanceof jt)){let O=this._sprite.material;O.uniforms?.tDiffuse&&(O.uniforms.tDiffuse.value=this._texture),O.uniforms?.iResolution&&O.uniforms.iResolution.value.set(this._canvas.width,this._canvas.height,1)}this._texture.image=this._canvas,this._texture.needsUpdate=!0,this._sprite&&this._sprite.material&&(this._sprite.material.map=this._texture,this._sprite.material.needsUpdate=!0)}}getWidth(){return this.options.width??0}getHeight(){return this.options.height??0}roundedRectPath(t,i,o,n,s,l){let r=Math.min(l,Math.floor(Math.min(n,s)/2));t.moveTo(i+r,o),t.lineTo(i+n-r,o),t.quadraticCurveTo(i+n,o,i+n,o+r),t.lineTo(i+n,o+s-r),t.quadraticCurveTo(i+n,o+s,i+n-r,o+s),t.lineTo(i+r,o+s),t.quadraticCurveTo(i,o+s,i,o+s-r),t.lineTo(i,o+r),t.quadraticCurveTo(i,o,i+r,o)}toCssColor(t){return typeof t=="string"?t:`#${(t instanceof Xt?t:new Xt(t)).getHexString()}`}rectSetup(t){if(this._cameraRef=t.camera,this.options.stickToViewport&&this._cameraRef&&this._cameraRef.camera.add(this.group),this.materials?.length&&this._sprite){let i=this.materials[0];i instanceof jt&&(i.transparent=!0,i.depthTest=!1,i.depthWrite=!1,this._texture&&(i.uniforms?.tDiffuse&&(i.uniforms.tDiffuse.value=this._texture),i.uniforms?.iResolution&&this._canvas&&i.uniforms.iResolution.value.set(this._canvas.width,this._canvas.height,1)),this._mesh=new ze(new Ie(1,1),i),this.group?.add(this._mesh),this._sprite.visible=!1)}}rectUpdate(t){if(this._sprite){if(this._cameraRef&&this.options.bounds){let i=this.computeScreenBoundsFromOptions(this.options.bounds);if(i){let{x:o,y:n,width:s,height:l}=i,r=Math.max(2,Math.floor(s)),a=Math.max(2,Math.floor(l)),u=r!==(this.options.width??0)||a!==(this.options.height??0);this.options.screenPosition=new mt(Math.floor(o),Math.floor(n)),this.options.width=r,this.options.height=a,this.options.anchor=new mt(0,0),u&&this.redrawRect()}}this.options.stickToViewport&&this._cameraRef&&this.updateStickyTransform()}}screenPoint(t){let i=U(this.options.screenPosition,W.screenPosition);return this.options.screenAnchor&&!this.options.bounds?$t(this.options.screenAnchor,i,t):i}pivot(){if(this.options.anchor!=null){let t=U(this.options.anchor,yt);return{x:Math.min(100,Math.max(0,t.x))/100,y:Math.min(100,Math.max(0,t.y))/100}}return this.options.screenAnchor?ct(this.options.screenAnchor):{x:0,y:0}}updateStickyTransform(){if(!this._sprite||!this._cameraRef||!this._canvas)return;let t=ht(this._cameraRef),i=Wt({camera:this._cameraRef.camera,viewport:t,point:this.screenPoint(t),pivot:this.pivot(),size:{width:this._canvas.width,height:this._canvas.height},zDistance:this.options.zDistance??1});this._sprite.scale.set(i.scale.x,i.scale.y,1),this._mesh&&this._mesh.scale.set(i.scale.x,i.scale.y,1),this.group?.position.set(i.position.x,i.position.y,i.position.z)}worldToScreen(t){if(!this._cameraRef)return{x:0,y:0};let i=this._cameraRef.camera,{width:o,height:n}=ht(this._cameraRef),s=t.clone().project(i),l=(s.x+1)/2*o,r=(1-s.y)/2*n;return{x:l,y:r}}computeScreenBoundsFromOptions(t){if(!this._cameraRef)return null;if(t.screen)return{...t.screen};if(t.world){let{left:i,right:o,top:n,bottom:s,z:l=0}=t.world,r=this.worldToScreen(new qt(i,n,l)),a=this.worldToScreen(new qt(o,s,l)),u=Math.min(r.x,a.x),v=Math.min(r.y,a.y),w=Math.abs(a.x-r.x),g=Math.abs(a.y-r.y);return{x:u,y:v,width:w,height:g}}return null}updateRect(t){this.options={...this.options,...t},this.loadImage(),this.redrawRect(),this.options.stickToViewport&&this._cameraRef&&this.updateStickyTransform()}buildInfo(){return{...new m(this).buildDebugInfo(),type:String(e.type),width:this.options.width??0,height:this.options.height??0,shape:this.options.shape??"rect",sticky:this.options.stickToViewport}}};function Le(...e){return R({args:e,defaultConfig:{...W},EntityClass:L,BuilderClass:pt,entityType:L.type,cloneFactory:t=>Le(t??{})})}import{AmbientLight as ke,DirectionalLight as Fe,Group as Ge,HemisphereLight as Ve,Object3D as Ae,PointLight as He,SpotLight as Ne}from"three";var $e=Symbol("Light"),We={x:0,y:0,z:0},k=16777215,Xe={mapSize:2048,near:.1,far:500,bias:0,radius:1,left:-100,right:100,top:100,bottom:-100},Ye={mapSize:1024,near:.1,far:500,bias:0,radius:1},ut=class extends c{static type=$e;light=null;lightTarget=null;constructor(t){super(),this.options={...t}}create(){super.create();let t=new Ge,{light:i,target:o}=Ue(this.options);return t.add(i),o&&t.add(o),this.group=t,this.light=i,this.lightTarget=o,this}_cleanup(t){this.light?.shadow?.map?.dispose?.(),this.light=null,this.lightTarget=null,super._cleanup(t)}};function Ue(e){switch(e.type){case"ambient":return{light:je(e),target:null};case"hemisphere":return{light:qe(e),target:null};case"directional":return Je(e);case"point":return{light:Ke(e),target:null};case"spot":return Qe(e)}}function je(e){let t=new ke(e.color??k,e.intensity??1);return e.name&&(t.name=e.name),t}function qe(e){let t=e.skyColor??e.color??k,i=e.groundColor??0,o=new Ve(t,i,e.intensity??1);return e.name&&(o.name=e.name),o}function Je(e){let t=new Fe(e.color??k,e.intensity??1);e.name&&(t.name=e.name),ti(t,e.castShadow??!1,e.shadow);let i=Jt(e.position,e.target);return i&&(t.target=i),{light:t,target:i}}function Ke(e){let t=new He(e.color??k,e.intensity??1,e.distance,e.decay);return e.name&&(t.name=e.name),Kt(t,e.castShadow??!1,e.shadow),t}function Qe(e){let t=new Ne(e.color??k,e.intensity??1,e.distance,e.angle,e.penumbra,e.decay);e.name&&(t.name=e.name),Kt(t,e.castShadow??!1,e.shadow);let i=Jt(e.position,e.target);return i&&(t.target=i),{light:t,target:i}}function Jt(e,t){if(!t)return null;let i=e??We,o=new Ae;return o.position.set(t.x-i.x,t.y-i.y,t.z-i.z),o}function ti(e,t,i){if(!t){e.castShadow=!1;return}e.castShadow=!0;let o={...Xe,...i??{}};e.shadow.mapSize.set(o.mapSize,o.mapSize),e.shadow.camera.near=o.near,e.shadow.camera.far=o.far,e.shadow.camera.left=o.left,e.shadow.camera.right=o.right,e.shadow.camera.top=o.top,e.shadow.camera.bottom=o.bottom,e.shadow.bias=o.bias,e.shadow.radius=o.radius,e.shadow.camera.updateProjectionMatrix()}function Kt(e,t,i){if(!t){e.castShadow=!1;return}e.castShadow=!0;let o={...Ye,...i??{}};e.shadow.mapSize.set(o.mapSize,o.mapSize),e.shadow.camera.near=o.near,e.shadow.camera.far=o.far,e.shadow.bias=o.bias,e.shadow.radius=o.radius,e.shadow.camera.updateProjectionMatrix()}function Fo(e){return new ut(e)}export{m as a,Mt as b,Rt as c,_t as d,Dt as e,Zt as f,Tt as g,ce as h,q as i,he as j,me as k,J as l,pe as m,ue as n,K as o,de as p,ye as q,Q as r,ge as s,fe as t,tt as u,be as v,xe as w,et as x,Oe as y,ve as z,I as A,Ce as B,Re as C,B as D,_e as E,ct as F,$t as G,ht as H,Wt as I,Be as J,L as K,Le as L,$e as M,ut as N,Fo as O};
1
+ import{a as V,b as A,c as M,d as R}from"./chunk-UNCP6V7I.js";import{D as c,F as b,b as G,c as xt,d as Ot,e as St,f as wt,g as vt,h as Ct,r as p,s as f}from"./chunk-CI7A5N6G.js";import{k as bt}from"./chunk-YW2GTHCV.js";import{a as yt,b as Y,c as gt,d as ft,g as U,h as j,i as z}from"./chunk-7WRQ2UAN.js";import{BoxGeometry as Qt,CapsuleGeometry as te,ConeGeometry as Pt,CylinderGeometry as ee,Mesh as _,MeshStandardMaterial as ie,SphereGeometry as oe}from"three";function D(e,t=Symbol("mesh")){if(e.material||e.color){let i=new bt;if(i.build({...e.material,color:e.color??e.material?.color},t),i.materials.length>0)return i.materials}return[new ie]}function Z(e,t){if(t.position){let i=j(t.position,gt);e.position.set(i.x,i.y,i.z)}return e.castShadow=!0,e.receiveShadow=!0,e}function Mt(e={}){let t=j(e.size,ft),i=new Qt(t.x,t.y,t.z),o=D(e);return Z(new _(i,o.at(-1)),e)}function Rt(e={}){let t=new oe(e.radius??1),i=D(e);return Z(new _(t,i.at(-1)),e)}function _t(e={}){let t=new Pt(e.radius??1,e.height??2,e.radialSegments??32),i=D(e);return Z(new _(t,i.at(-1)),e)}function Dt(e={}){let t=new Pt(e.radius??1,e.height??2,4),i=D(e);return Z(new _(t,i.at(-1)),e)}function Zt(e={}){let t=new ee(e.radiusTop??1,e.radiusBottom??1,e.height??2,e.radialSegments??32),i=D(e);return Z(new _(t,i.at(-1)),e)}function Tt(e={}){let t=new te(e.radius??.5,e.length??1,e.capSegments??10,e.radialSegments??20),i=D(e);return Z(new _(t,i.at(-1)),e)}import{Vector3 as le}from"three";import{MeshStandardMaterial as ne,MeshBasicMaterial as se,MeshPhongMaterial as re}from"three";function ae(e){return e&&typeof e.getDebugInfo=="function"}var m=class{entity;constructor(t){this.entity=t}getPositionString(){if(this.entity.mesh){let{x:n,y:s,z:l}=this.entity.mesh.position;return`${n.toFixed(2)}, ${s.toFixed(2)}, ${l.toFixed(2)}`}let{x:t,y:i,z:o}=this.entity.options.position||{x:0,y:0,z:0};return`${t.toFixed(2)}, ${i.toFixed(2)}, ${o.toFixed(2)}`}getRotationString(){if(this.entity.mesh){let{x:s,y:l,z:r}=this.entity.mesh.rotation,a=u=>(u*180/Math.PI).toFixed(1);return`${a(s)}\xB0, ${a(l)}\xB0, ${a(r)}\xB0`}let{x:t,y:i,z:o}=this.entity.options.rotation||{x:0,y:0,z:0},n=s=>(s*180/Math.PI).toFixed(1);return`${n(t)}\xB0, ${n(i)}\xB0, ${n(o)}\xB0`}getMaterialInfo(){if(!this.entity.mesh||!this.entity.mesh.material)return{type:"none"};let t=Array.isArray(this.entity.mesh.material)?this.entity.mesh.material[0]:this.entity.mesh.material,i={type:t.type};return(t instanceof ne||t instanceof se||t instanceof re)&&(i.color=`#${t.color.getHexString()}`,i.opacity=t.opacity,i.transparent=t.transparent),"roughness"in t&&(i.roughness=t.roughness),"metalness"in t&&(i.metalness=t.metalness),i}getPhysicsInfo(){if(!this.entity.body)return null;let t={type:this.entity.body.bodyType(),mass:this.entity.body.mass(),isEnabled:this.entity.body.isEnabled(),isSleeping:this.entity.body.isSleeping()},i=this.entity.body.linvel();return t.velocity=`${i.x.toFixed(2)}, ${i.y.toFixed(2)}, ${i.z.toFixed(2)}`,t}buildDebugInfo(){let t={name:this.entity.name||this.entity.uuid,uuid:this.entity.uuid,position:this.getPositionString(),rotation:this.getRotationString(),material:this.getMaterialInfo()},i=this.getPhysicsInfo();if(i&&(t.physics=i),ae(this.entity)){let o=this.entity.getDebugInfo();return{...t,...o}}return t}};var Et={...p,size:new le(1,1,1)},ce=Symbol("Box"),q=class e extends c{static type=ce;constructor(t){super(),this.options={...Et,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),{x:o,y:n,z:s}=this.options.size??{x:1,y:1,z:1};return{...i,type:String(e.type),size:`${o}, ${n}, ${s}`}}};function he(...e){let t=f(e,Et),i=new q(t);return i.add(Mt({size:t.size,material:t.material,color:t.color}),xt({size:t.size,static:t.collision?.static,sensor:t.collision?.sensor,canSleep:t.collision?.canSleep,ccdEnabled:t.collision?.ccdEnabled,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>he(o??{}))}var zt={...p,radius:1},me=Symbol("Sphere"),J=class e extends c{static type=me;constructor(t){super(),this.options={...zt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1;return{...i,type:String(e.type),radius:o.toFixed(2)}}};function pe(...e){let t=f(e,zt),i=new J(t);return i.add(Rt({radius:t.radius,material:t.material,color:t.color}),Ot({radius:t.radius,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>pe(o??{}))}var It={...p,radius:1,height:2,radialSegments:32},ue=Symbol("Cone"),K=class e extends c{static type=ue;constructor(t){super(),this.options={...It,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1,n=this.options.height??2;return{...i,type:String(e.type),radius:o.toFixed(2),height:n.toFixed(2)}}};function de(...e){let t=f(e,It),i=new K(t);return i.add(_t({radius:t.radius,height:t.height,radialSegments:t.radialSegments,material:t.material,color:t.color}),St({radius:t.radius,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>de(o??{}))}var Bt={...p,radius:1,height:2},ye=Symbol("Pyramid"),Q=class e extends c{static type=ye;constructor(t){super(),this.options={...Bt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??1,n=this.options.height??2;return{...i,type:String(e.type),radius:o.toFixed(2),height:n.toFixed(2)}}};function ge(...e){let t=f(e,Bt),i=new Q(t);return i.add(Dt({radius:t.radius,height:t.height,material:t.material,color:t.color}),wt({radius:t.radius,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>ge(o??{}))}var Lt={...p,radiusTop:1,radiusBottom:1,height:2,radialSegments:32},fe=Symbol("Cylinder"),tt=class e extends c{static type=fe;constructor(t){super(),this.options={...Lt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radiusTop??1,n=this.options.radiusBottom??1,s=this.options.height??2;return{...i,type:String(e.type),radiusTop:o.toFixed(2),radiusBottom:n.toFixed(2),height:s.toFixed(2)}}};function be(...e){let t=f(e,Lt),i=new tt(t);return i.add(Zt({radiusTop:t.radiusTop,radiusBottom:t.radiusBottom,height:t.height,radialSegments:t.radialSegments,material:t.material,color:t.color}),vt({radiusTop:t.radiusTop,radiusBottom:t.radiusBottom,height:t.height,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>be(o??{}))}var kt={...p,radius:.5,length:1,capSegments:10,radialSegments:20},xe=Symbol("Pill"),et=class e extends c{static type=xe;constructor(t){super(),this.options={...kt,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.radius??.5,n=this.options.length??1;return{...i,type:String(e.type),radius:o.toFixed(2),length:n.toFixed(2)}}};function Oe(...e){let t=f(e,kt),i=new et(t);return i.add(Tt({radius:t.radius,length:t.length,capSegments:t.capSegments,radialSegments:t.radialSegments,material:t.material,color:t.color}),Ct({radius:t.radius,length:t.length,static:t.collision?.static,sensor:t.collision?.sensor,gravityScale:t.collision?.gravityScale,lockRotations:t.collision?.lockRotations,lockTranslations:t.collision?.lockTranslations,collisionType:t.collisionType,collisionFilter:t.collisionFilter})),b(i,o=>Oe(o??{}))}import{Group as Se,RingGeometry as we}from"three";var Ft={...p,innerRadius:0,outerRadius:1,thetaSegments:32},it=class extends V{collider(t){let i=t.outerRadius??1;return{shape:{type:"cylinder",halfHeight:.1/2,radius:i}}}},ot=class extends A{build(t){let i=t.innerRadius??0,o=t.outerRadius??1,n=t.thetaSegments??32,s=new we(i,o,n);return s.rotateX(-Math.PI/2),s}},nt=class extends M{createEntity(t){return new I(t)}build(){let t=super.build();return t.mesh&&!t.group&&(t.group=new Se,t.group.add(t.mesh)),t}},ve=Symbol("Disk"),I=class e extends c{static type=ve;constructor(t){super(),this.options={...Ft,...t}}buildInfo(){let i=new m(this).buildDebugInfo(),o=this.options.innerRadius??0,n=this.options.outerRadius??1;return{...i,type:String(e.type),innerRadius:o.toFixed(2),outerRadius:n.toFixed(2)}}};function Ce(...e){return R({args:e,defaultConfig:Ft,EntityClass:I,BuilderClass:nt,MeshBuilderClass:ot,CollisionBuilderClass:it,entityType:I.type,cloneFactory:t=>Ce(t??{})})}import{PlaneGeometry as Me,Vector2 as Gt,Vector3 as Vt}from"three";import{BufferGeometry as Pe,Float32BufferAttribute as st}from"three";var H=class e extends Pe{constructor(t=1,i=1,o=1,n=1){super(),this.type="XZPlaneGeometry",this.parameters={width:t,height:i,widthSegments:o,heightSegments:n};let s=t/2,l=i/2,r=Math.floor(o),a=Math.floor(n),u=r+1,v=a+1,w=t/r,g=i/a,d=[],x=[],O=[],T=[];for(let y=0;y<v;y++){let h=y*g-l;for(let S=0;S<u;S++){let P=S*w-s;x.push(P,0,h),O.push(0,1,0),T.push(S/r),T.push(1-y/a)}}for(let y=0;y<a;y++)for(let h=0;h<r;h++){let S=h+u*y,P=h+u*(y+1),E=h+1+u*(y+1),C=h+1+u*y;d.push(S,P,C),d.push(P,E,C)}this.setIndex(d),this.setAttribute("position",new st(x,3)),this.setAttribute("normal",new st(O,3)),this.setAttribute("uv",new st(T,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.widthSegments,t.heightSegments)}};var N=4,At={...p,tile:new Gt(10,10),repeat:new Gt(1,1),collision:{static:!0},subdivisions:N,randomizeHeight:!1,heightScale:1};function Ht(e){let t=e.subdivisions??N,i=e.heightMap2D,o=e.heightMap,n=e.subdivisionsX??t,s=e.subdivisionsZ??t;return i&&i.length>0&&i[0]?.length>0?(s=i.length-1,n=i[0].length-1):o&&o.length>0&&(n=o.length-1),{subdivisionsX:n,subdivisionsZ:s}}var rt=class extends V{collider(t){let i=z(t.tile,Y),{subdivisionsX:o,subdivisionsZ:n}=Ht(t),s=new Vt(i.x,1,i.y),l=t._builders?.meshBuilder?.heightData??new Float32Array((o+1)*(n+1));return{shape:{type:"heightfield",rows:o,cols:n,heights:l,scale:[s.x,1,s.z]}}}},at=class extends A{heightData=new Float32Array;columnsRows=new Map;subdivisionsX=N;subdivisionsZ=N;build(t){let i=z(t.tile,Y),{subdivisionsX:o,subdivisionsZ:n}=Ht(t);this.subdivisionsX=o,this.subdivisionsZ=n;let s=new Vt(i.x,1,i.y),l=t.heightScale??1,r=new H(s.x,s.z,o,n),a=new Me(s.x,s.z,o,n),u=o>0?s.x/o:1,v=n>0?s.z/n:1,w=r.attributes.position.array,g=a.attributes.position.array,d=new Map,x=t.heightMap2D,O=t.heightMap,T=t.randomizeHeight??!1,y=(h,S)=>h<0?0:h>S?S:h;for(let h=0;h<g.length;h+=3){let S=g[h],P=g[h+1],E=y(Math.round((S+s.x/2)/u),o),C=y(Math.round((s.z/2-P)/v),n),F=0;if(x){let dt=x[C];dt&&(F=dt[E]??0)}else O&&O.length>0?F=O[E]??0:T&&(F=Math.random()*4);let X=F*l;g[h+2]=X,w[h+1]=X,d.get(C)||d.set(C,new Map),d.get(C).set(E,X)}return this.columnsRows=d,r}postBuild(){let t=[];for(let i=0;i<=this.subdivisionsX;++i)for(let o=0;o<=this.subdivisionsZ;++o){let n=this.columnsRows.get(o);t.push(n?.get(i)??0)}this.heightData=new Float32Array(t)}},lt=class extends M{createEntity(t){return new B(t)}},Re=Symbol("Plane"),B=class extends c{static type=Re;constructor(t){super(),this.options=G(At,t)}};function _e(...e){return R({args:e,defaultConfig:At,EntityClass:B,BuilderClass:lt,MeshBuilderClass:at,CollisionBuilderClass:rt,entityType:B.type,cloneFactory:t=>_e(t??{})})}import{Color as Xt,Group as Ze,Sprite as Te,SpriteMaterial as Ee,CanvasTexture as Yt,LinearFilter as $,Vector2 as mt,ClampToEdgeWrapping as Ut,ShaderMaterial as jt,Mesh as ze,PlaneGeometry as Ie,Vector3 as qt}from"three";var Nt={"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},center:{x:.5,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1}};function ct(e){return Nt[e]??Nt["top-left"]}function $t(e,t,i){let o=ct(e);return{x:o.x*i.width+t.x,y:o.y*i.height+t.y}}function ht(e){return{width:Math.max(1,e?.screenResolution?.x??1),height:Math.max(1,e?.screenResolution?.y??1)}}function De(e,t){let i=e.zoom||1;if(e.isPerspectiveCamera){let o=e,n=Math.tan(o.fov*Math.PI/180/2)*t/i;return{halfWidth:n*o.aspect,halfHeight:n}}if(e.isOrthographicCamera){let o=e;return{halfWidth:(o.right-o.left)/2/i,halfHeight:(o.top-o.bottom)/2/i}}return{halfWidth:1,halfHeight:1}}function Wt(e){let t=Math.max(.001,e.zDistance),{halfWidth:i,halfHeight:o}=De(e.camera,t),n=o*2/e.viewport.height,s=Math.max(1e-4,e.size.width*n),l=Math.max(1e-4,e.size.height*n),r=e.point.x/e.viewport.width*2-1,a=1-e.point.y/e.viewport.height*2;return{position:{x:r*i+(.5-e.pivot.x)*s,y:a*o+(e.pivot.y-.5)*l,z:-t},scale:{x:s,y:l}}}var W={position:void 0,width:120,height:48,fillColor:"#FFFFFF",strokeColor:null,strokeWidth:0,radius:0,padding:0,shape:"rect",image:null,stickToViewport:!0,screenPosition:new mt(24,24),zDistance:1},pt=class extends M{createEntity(t){return new L(t)}},Be=Symbol("Rect"),L=class e extends c{static type=Be;_sprite=null;_mesh=null;_texture=null;_canvas=null;_ctx=null;_cameraRef=null;_lastCanvasW=0;_lastCanvasH=0;_image=null;_imageSource=null;constructor(t){super(),this.options=G(W,t),this.options.screenPosition=z(this.options.screenPosition,W.screenPosition),this.group=new Ze,this.createSprite(),this.prependSetup(this.rectSetup.bind(this)),this.prependUpdate(this.rectUpdate.bind(this))}createSprite(){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._texture=new Yt(this._canvas),this._texture.minFilter=$,this._texture.magFilter=$;let t=new Ee({map:this._texture,transparent:!0,depthTest:!1,depthWrite:!1,alphaTest:.01});this._sprite=new Te(t),this.group?.add(this._sprite),this.loadImage(),this.redrawRect()}loadImage(){let t=this.options.image||null;if(t===this._imageSource||(this._imageSource=t,this._image=null,!t))return;let i=new Image;i.crossOrigin="anonymous",i.onload=()=>{this._imageSource===t&&(this._image=i,this.redrawRect())},i.src=t}redrawRect(){if(!this._canvas||!this._ctx)return;let t=Math.max(2,Math.floor(this.options.width??120)),i=Math.max(2,Math.floor(this.options.height??48)),o=this.options.padding??0,n=this.options.strokeWidth??0,s=t+o*2+n,l=i+o*2+n,r=Math.max(2,s),a=Math.max(2,l),u=r!==this._lastCanvasW||a!==this._lastCanvasH;this._canvas.width=r,this._canvas.height=a,this._lastCanvasW=r,this._lastCanvasH=a,this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let v=Math.max(0,this.options.radius??0),w=Math.floor(o+n/2),g=Math.floor(o+n/2),d=Math.floor(t),x=Math.floor(i);if(this._ctx.beginPath(),this.options.shape==="ellipse"?this._ctx.ellipse(w+d/2,g+x/2,d/2,x/2,0,0,Math.PI*2):v>0?this.roundedRectPath(this._ctx,w,g,d,x,v):this._ctx.rect(w,g,d,x),this.options.fillColor&&(this._ctx.fillStyle=this.toCssColor(this.options.fillColor),this._ctx.fill()),this._image&&(this._ctx.save(),this._ctx.clip(),this._ctx.drawImage(this._image,w,g,d,x),this._ctx.restore()),this.options.strokeColor&&n>0&&(this._ctx.lineWidth=n,this._ctx.strokeStyle=this.toCssColor(this.options.strokeColor),this._ctx.stroke()),this._texture){if(u&&(this._texture.dispose(),this._texture=new Yt(this._canvas),this._texture.minFilter=$,this._texture.magFilter=$,this._texture.wrapS=Ut,this._texture.wrapT=Ut,this._sprite&&this._sprite.material instanceof jt)){let O=this._sprite.material;O.uniforms?.tDiffuse&&(O.uniforms.tDiffuse.value=this._texture),O.uniforms?.iResolution&&O.uniforms.iResolution.value.set(this._canvas.width,this._canvas.height,1)}this._texture.image=this._canvas,this._texture.needsUpdate=!0,this._sprite&&this._sprite.material&&(this._sprite.material.map=this._texture,this._sprite.material.needsUpdate=!0)}}getWidth(){return this.options.width??0}getHeight(){return this.options.height??0}roundedRectPath(t,i,o,n,s,l){let r=Math.min(l,Math.floor(Math.min(n,s)/2));t.moveTo(i+r,o),t.lineTo(i+n-r,o),t.quadraticCurveTo(i+n,o,i+n,o+r),t.lineTo(i+n,o+s-r),t.quadraticCurveTo(i+n,o+s,i+n-r,o+s),t.lineTo(i+r,o+s),t.quadraticCurveTo(i,o+s,i,o+s-r),t.lineTo(i,o+r),t.quadraticCurveTo(i,o,i+r,o)}toCssColor(t){return typeof t=="string"?t:`#${(t instanceof Xt?t:new Xt(t)).getHexString()}`}rectSetup(t){if(this._cameraRef=t.camera,this.options.stickToViewport&&this._cameraRef&&this._cameraRef.camera.add(this.group),this.materials?.length&&this._sprite){let i=this.materials[0];i instanceof jt&&(i.transparent=!0,i.depthTest=!1,i.depthWrite=!1,this._texture&&(i.uniforms?.tDiffuse&&(i.uniforms.tDiffuse.value=this._texture),i.uniforms?.iResolution&&this._canvas&&i.uniforms.iResolution.value.set(this._canvas.width,this._canvas.height,1)),this._mesh=new ze(new Ie(1,1),i),this.group?.add(this._mesh),this._sprite.visible=!1)}}rectUpdate(t){if(this._sprite){if(this._cameraRef&&this.options.bounds){let i=this.computeScreenBoundsFromOptions(this.options.bounds);if(i){let{x:o,y:n,width:s,height:l}=i,r=Math.max(2,Math.floor(s)),a=Math.max(2,Math.floor(l)),u=r!==(this.options.width??0)||a!==(this.options.height??0);this.options.screenPosition=new mt(Math.floor(o),Math.floor(n)),this.options.width=r,this.options.height=a,this.options.anchor=new mt(0,0),u&&this.redrawRect()}}this.options.stickToViewport&&this._cameraRef&&this.updateStickyTransform()}}screenPoint(t){let i=U(this.options.screenPosition,W.screenPosition);return this.options.screenAnchor&&!this.options.bounds?$t(this.options.screenAnchor,i,t):i}pivot(){if(this.options.anchor!=null){let t=U(this.options.anchor,yt);return{x:Math.min(100,Math.max(0,t.x))/100,y:Math.min(100,Math.max(0,t.y))/100}}return this.options.screenAnchor?ct(this.options.screenAnchor):{x:0,y:0}}updateStickyTransform(){if(!this._sprite||!this._cameraRef||!this._canvas)return;let t=ht(this._cameraRef),i=Wt({camera:this._cameraRef.camera,viewport:t,point:this.screenPoint(t),pivot:this.pivot(),size:{width:this._canvas.width,height:this._canvas.height},zDistance:this.options.zDistance??1});this._sprite.scale.set(i.scale.x,i.scale.y,1),this._mesh&&this._mesh.scale.set(i.scale.x,i.scale.y,1),this.group?.position.set(i.position.x,i.position.y,i.position.z)}worldToScreen(t){if(!this._cameraRef)return{x:0,y:0};let i=this._cameraRef.camera,{width:o,height:n}=ht(this._cameraRef),s=t.clone().project(i),l=(s.x+1)/2*o,r=(1-s.y)/2*n;return{x:l,y:r}}computeScreenBoundsFromOptions(t){if(!this._cameraRef)return null;if(t.screen)return{...t.screen};if(t.world){let{left:i,right:o,top:n,bottom:s,z:l=0}=t.world,r=this.worldToScreen(new qt(i,n,l)),a=this.worldToScreen(new qt(o,s,l)),u=Math.min(r.x,a.x),v=Math.min(r.y,a.y),w=Math.abs(a.x-r.x),g=Math.abs(a.y-r.y);return{x:u,y:v,width:w,height:g}}return null}updateRect(t){this.options={...this.options,...t},this.loadImage(),this.redrawRect(),this.options.stickToViewport&&this._cameraRef&&this.updateStickyTransform()}buildInfo(){return{...new m(this).buildDebugInfo(),type:String(e.type),width:this.options.width??0,height:this.options.height??0,shape:this.options.shape??"rect",sticky:this.options.stickToViewport}}};function Le(...e){return R({args:e,defaultConfig:{...W},EntityClass:L,BuilderClass:pt,entityType:L.type,cloneFactory:t=>Le(t??{})})}import{AmbientLight as ke,DirectionalLight as Fe,Group as Ge,HemisphereLight as Ve,Object3D as Ae,PointLight as He,SpotLight as Ne}from"three";var $e=Symbol("Light"),We={x:0,y:0,z:0},k=16777215,Xe={mapSize:2048,near:.1,far:500,bias:0,radius:1,left:-100,right:100,top:100,bottom:-100},Ye={mapSize:1024,near:.1,far:500,bias:0,radius:1},ut=class extends c{static type=$e;light=null;lightTarget=null;constructor(t){super(),this.options={...t}}create(){super.create();let t=new Ge,{light:i,target:o}=Ue(this.options);return t.add(i),o&&t.add(o),this.group=t,this.light=i,this.lightTarget=o,this}_cleanup(t){this.light?.shadow?.map?.dispose?.(),this.light=null,this.lightTarget=null,super._cleanup(t)}};function Ue(e){switch(e.type){case"ambient":return{light:je(e),target:null};case"hemisphere":return{light:qe(e),target:null};case"directional":return Je(e);case"point":return{light:Ke(e),target:null};case"spot":return Qe(e)}}function je(e){let t=new ke(e.color??k,e.intensity??1);return e.name&&(t.name=e.name),t}function qe(e){let t=e.skyColor??e.color??k,i=e.groundColor??0,o=new Ve(t,i,e.intensity??1);return e.name&&(o.name=e.name),o}function Je(e){let t=new Fe(e.color??k,e.intensity??1);e.name&&(t.name=e.name),ti(t,e.castShadow??!1,e.shadow);let i=Jt(e.position,e.target);return i&&(t.target=i),{light:t,target:i}}function Ke(e){let t=new He(e.color??k,e.intensity??1,e.distance,e.decay);return e.name&&(t.name=e.name),Kt(t,e.castShadow??!1,e.shadow),t}function Qe(e){let t=new Ne(e.color??k,e.intensity??1,e.distance,e.angle,e.penumbra,e.decay);e.name&&(t.name=e.name),Kt(t,e.castShadow??!1,e.shadow);let i=Jt(e.position,e.target);return i&&(t.target=i),{light:t,target:i}}function Jt(e,t){if(!t)return null;let i=e??We,o=new Ae;return o.position.set(t.x-i.x,t.y-i.y,t.z-i.z),o}function ti(e,t,i){if(!t){e.castShadow=!1;return}e.castShadow=!0;let o={...Xe,...i??{}};e.shadow.mapSize.set(o.mapSize,o.mapSize),e.shadow.camera.near=o.near,e.shadow.camera.far=o.far,e.shadow.camera.left=o.left,e.shadow.camera.right=o.right,e.shadow.camera.top=o.top,e.shadow.camera.bottom=o.bottom,e.shadow.bias=o.bias,e.shadow.radius=o.radius,e.shadow.camera.updateProjectionMatrix()}function Kt(e,t,i){if(!t){e.castShadow=!1;return}e.castShadow=!0;let o={...Ye,...i??{}};e.shadow.mapSize.set(o.mapSize,o.mapSize),e.shadow.camera.near=o.near,e.shadow.camera.far=o.far,e.shadow.bias=o.bias,e.shadow.radius=o.radius,e.shadow.camera.updateProjectionMatrix()}function Fo(e){return new ut(e)}export{m as a,Mt as b,Rt as c,_t as d,Dt as e,Zt as f,Tt as g,ce as h,q as i,he as j,me as k,J as l,pe as m,ue as n,K as o,de as p,ye as q,Q as r,ge as s,fe as t,tt as u,be as v,xe as w,et as x,Oe as y,ve as z,I as A,Ce as B,Re as C,B as D,_e as E,ct as F,$t as G,ht as H,Wt as I,Be as J,L as K,Le as L,$e as M,ut as N,Fo as O};
@@ -2,7 +2,7 @@ import { k as CutsceneEasing, V as Vec3Def, h as CutsceneScene, n as CameraShot,
2
2
  export { A as AudioItemSchema, q as AudioTrack, l as CameraKeyframe, c as CameraKeyframeSchema, m as CameraPoseDef, d as CameraShotSchema, j as CutsceneCameraKind, b as CutsceneCameraSchema, C as CutsceneDefinitionSchema, u as CutsceneEvent, e as CutsceneEventSchema, a as CutsceneSceneSchema, r as CutsceneTrack, f as CutsceneTrackSchema, D as DollyPathSchema, E as EventItemSchema, p as EventTrack, S as SceneTransitionSchema, t as ShotBlend } from './cutscene-definition-C479fkei.js';
3
3
  import { f as CameraBehavior, d as CameraContext, C as CameraPose, l as ZylemCamera } from './zylem-camera-BA3VPFlS.js';
4
4
  import { Z as ZylemTransitionShader } from './stage-transition-CmGpV4tc.js';
5
- import { Z as ZylemStage, q as Stage } from './stage-CCGJh9TD.js';
5
+ import { Z as ZylemStage, q as Stage } from './stage-Dez16Gxm.js';
6
6
  import { g as SongDefinition } from './song-definition-rEKksP0B.js';
7
7
  import { CutsceneStatusPayload, CutsceneViewPayload, CutsceneLoadPayload, CameraPosePayload } from '@zylem/bridge';
8
8
  import '@sinclair/typebox';
@@ -25,7 +25,6 @@ import '@zylem/behaviors/particle-emitter';
25
25
  import 'three/addons/lines/webgpu/Line2.js';
26
26
  import './game-interfaces-vF5sRi1n.js';
27
27
  import './placement-session-BNQoL7Jb.js';
28
- import './level-types-D10LiOcn.js';
29
28
  import './transform-gizmo-DappLQ9w.js';
30
29
 
31
30
  /**
package/dist/core.d.ts CHANGED
@@ -1,12 +1,11 @@
1
- import { S as StageStateInterface } from './game-CmkhPP-9.js';
2
- export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-CmkhPP-9.js';
1
+ import { S as StageStateInterface } from './game-uQd7k6-m.js';
2
+ export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-uQd7k6-m.js';
3
3
  export { G as GameInputConfig, a as GameInputPlayerConfig, K as KeyboardMapping, M as MouseConfig, b as MouseMapping, V as VirtualTouchButtonConfig, d as VirtualTouchButtonSlot, c as VirtualTouchButtonsConfig, e as VirtualTouchConfig, f as VirtualTouchJoystickConfig, g as VirtualTouchJoysticksConfig, h as VirtualTouchPosition, i as VirtualTouchStyle, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
4
- import { q as Stage, C as CameraWrapper } from './stage-CCGJh9TD.js';
5
- export { e as CameraManager, d as CameraOptions, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-CCGJh9TD.js';
6
- import { LevelBuffer, LevelEntry } from '@zylem/bridge';
7
- export { LevelBuffer } from '@zylem/bridge';
4
+ import { q as Stage, C as CameraWrapper } from './stage-Dez16Gxm.js';
5
+ export { e as CameraManager, d as CameraOptions, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-Dez16Gxm.js';
6
+ import { LevelBuffer, LevelEntry, LevelDocument } from '@zylem/bridge';
7
+ export { LevelBuffer, LevelDocument } from '@zylem/bridge';
8
8
  import { B as BaseNode, N as NodeInterface } from './base-node-idopiSw5.js';
9
- import { L as LevelDocument } from './level-types-D10LiOcn.js';
10
9
  import { Vector2 } from 'three';
11
10
  import { G as GameEntity, d as GameEntityOptions } from './entity-CY75JJSw.js';
12
11
  export { A as ArmPlacementOptions, P as PlacementSession } from './placement-session-BNQoL7Jb.js';
@@ -84,10 +83,12 @@ declare function streamLevelOnStage(stage: LevelStage, buffer: LevelBuffer, opti
84
83
  /**
85
84
  * The stage's picture of the level document.
86
85
  *
87
- * The editor owns the file. This session draws it, reports finished gestures,
88
- * and on play swaps the brush faces for one static body of convex hulls.
89
- * Nothing it creates is a normal stage entity except play-mode trigger zones,
90
- * and those are marked editor-owned so they are not published back.
86
+ * The editor owns the file. This session draws it, routes level pointer
87
+ * gestures to the tools, reports what they finish, and on play swaps the
88
+ * brush faces for one merged mesh and one static body of convex hulls per
89
+ * sector. Nothing it creates is a normal stage entity except play-mode
90
+ * trigger zones, and those are marked editor-owned so they are not published
91
+ * back.
91
92
  */
92
93
 
93
94
  /** The document currently previewed or playing, for hosts that spawn from markers. */
@@ -401,4 +402,4 @@ declare function isManagedRenderEntity(entity: {
401
402
  */
402
403
  type Vect3 = Vec3;
403
404
 
404
- export { CameraBehavior, type CameraFeedOptions, CameraWrapper, type FollowTargetOptions, LevelDocument, type LevelStage, type PlatformAxisMode, type PlatformAxisModes, type PlatformFollowOptions, type RenderCategory, STAGE_STATE_CHANGE, SetupContext, StageBlueprint, StageEntity, StageManager, type StageStateChangeEvent, type StrategyPanBehavior, type StrategyPanInput, type StrategyPanOptions, type StrategyPointer, type StreamLevelOptions, type StreamLevelResult, UpdateContext, Vec3, Vec3Input, type Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, getActiveLevelDocument, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel };
405
+ export { CameraBehavior, type CameraFeedOptions, CameraWrapper, type FollowTargetOptions, type LevelStage, type PlatformAxisMode, type PlatformAxisModes, type PlatformFollowOptions, type RenderCategory, STAGE_STATE_CHANGE, SetupContext, StageBlueprint, StageEntity, StageManager, type StageStateChangeEvent, type StrategyPanBehavior, type StrategyPanInput, type StrategyPanOptions, type StrategyPointer, type StreamLevelOptions, type StreamLevelResult, UpdateContext, Vec3, Vec3Input, type Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, getActiveLevelDocument, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel };
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as M,g as N,h as O,i as P,j as Q,k as R,l as S,m as T,n as U,o as V,p as W,q as X,r as Y}from"./chunk-JJEYLGD2.js";import{a,c as q,d as r,e as s,f as t,g as u,h as v,i as w,j as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J,x as K,z as L}from"./chunk-UKNMIHAP.js";import{e as g}from"./chunk-KL7NGD76.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-BH53MBAZ.js";import"./chunk-PCFF4LLO.js";import"./chunk-UG22Z42P.js";import"./chunk-Y5IU6IA5.js";import"./chunk-OCQ7A5IK.js";import"./chunk-47HAZZWF.js";import"./chunk-273CUPEO.js";import"./chunk-UM5VNQPY.js";import"./chunk-SD7EHS4W.js";import"./chunk-2HSR5XDQ.js";import"./chunk-2XMG3NJS.js";import{a as p}from"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-D2PATZCC.js";import"./chunk-63T3K5EQ.js";import"./chunk-M2FZ224T.js";import"./chunk-DYD7MDWO.js";import"./chunk-IHGRFR4H.js";import"./chunk-AJSIVGDX.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-Q22Z4PBD.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-4QLJUQSJ.js";import{a as h,b as i,c as j,d as k,g as l,h as m,i as n,j as o}from"./chunk-7WRQ2UAN.js";import"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{b as AspectRatio,G as CameraManager,y as CameraPipeline,H as CameraWrapper,B as FirstPersonPerspective,A as Fixed2DPerspective,O as Game,C as IsometricPerspective,x as Perspectives,t as RenderBundleManager,u as RenderStrategyManager,S as STAGE_STATE_CHANGE,E as SecondPersonPerspective,N as StageManager,z as ThirdPersonPerspective,D as TopDownPerspective,i as VEC2_ONE,h as VEC2_ZERO,k as VEC3_ONE,j as VEC3_ZERO,I as createCamera,V as createFollowTarget,P as createGame,F as createPerspective,W as createPlatformFollow,L as createStage,X as createStrategyPan,p as crossfadeTransitionShader,U as dispatchStageState,R as entitySpawner,f as gameConfig,v as getActiveLevelDocument,c as getDisplayAspect,d as getPresetResolution,T as initStageStateDispatcher,s as isManagedRenderEntity,a as isWebGPUSupported,l as normalizeVec2,m as normalizeVec3,e as parseResolution,q as resolveRenderCategory,Y as setCameraFeed,w as setStageFrameProfilerEnabled,J as stageConfig,M as stageState,g as streamLevel,Q as streamLevelOnStage,n as toThreeVector2,o as toThreeVector3,r as usesManagedRenderPath,K as vessel};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as M,g as N,h as O,i as P,j as Q,k as R,l as S,m as T,n as U,o as V,p as W,q as X,r as Y}from"./chunk-JUA5KNND.js";import{a,c as q,d as r,e as s,f as t,g as u,h as v,i as w,j as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J,x as K,z as L}from"./chunk-VUTKEMIE.js";import{e as g}from"./chunk-26EJFYDX.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-BH53MBAZ.js";import"./chunk-PCFF4LLO.js";import"./chunk-UG22Z42P.js";import"./chunk-Y5IU6IA5.js";import"./chunk-B6GDESCB.js";import"./chunk-SIRFF4DY.js";import"./chunk-273CUPEO.js";import"./chunk-UM5VNQPY.js";import"./chunk-ICJ2E2OV.js";import"./chunk-2HSR5XDQ.js";import"./chunk-2XMG3NJS.js";import{a as p}from"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-D2PATZCC.js";import"./chunk-3LXDHDJB.js";import"./chunk-BJYXY2FB.js";import"./chunk-YWH5HQDT.js";import"./chunk-UNCP6V7I.js";import"./chunk-CI7A5N6G.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-4QLJUQSJ.js";import{a as h,b as i,c as j,d as k,g as l,h as m,i as n,j as o}from"./chunk-7WRQ2UAN.js";import"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{b as AspectRatio,G as CameraManager,y as CameraPipeline,H as CameraWrapper,B as FirstPersonPerspective,A as Fixed2DPerspective,O as Game,C as IsometricPerspective,x as Perspectives,t as RenderBundleManager,u as RenderStrategyManager,S as STAGE_STATE_CHANGE,E as SecondPersonPerspective,N as StageManager,z as ThirdPersonPerspective,D as TopDownPerspective,i as VEC2_ONE,h as VEC2_ZERO,k as VEC3_ONE,j as VEC3_ZERO,I as createCamera,V as createFollowTarget,P as createGame,F as createPerspective,W as createPlatformFollow,L as createStage,X as createStrategyPan,p as crossfadeTransitionShader,U as dispatchStageState,R as entitySpawner,f as gameConfig,v as getActiveLevelDocument,c as getDisplayAspect,d as getPresetResolution,T as initStageStateDispatcher,s as isManagedRenderEntity,a as isWebGPUSupported,l as normalizeVec2,m as normalizeVec3,e as parseResolution,q as resolveRenderCategory,Y as setCameraFeed,w as setStageFrameProfilerEnabled,J as stageConfig,M as stageState,g as streamLevel,Q as streamLevelOnStage,n as toThreeVector2,o as toThreeVector3,r as usesManagedRenderPath,K as vessel};
@@ -1,6 +1,6 @@
1
1
  import { G as GameEntity } from './entity-CY75JJSw.js';
2
2
 
3
- type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | 'vertex' | 'none';
3
+ type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | 'shear' | 'none';
4
4
  /** Tools that manipulate a selected entity's transform via the gizmo. */
5
5
  declare const TRANSFORM_TOOLS: readonly ["translate", "rotate", "scale"];
6
6
  type TransformTool = (typeof TRANSFORM_TOOLS)[number];
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-BgX5Q0Ff.js';
1
+ export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-JRneI6c2.js';
2
2
  export { G as GizmoAxis, a as GizmoDelta, b as GizmoMode, d as GizmoRay, T as TransformGizmo, c as closestAxisValue, i as intersectPlane } from './transform-gizmo-DappLQ9w.js';
3
3
  import { Scene, Object3D, Vector3 } from 'three';
4
4
  import { c as Vec3 } from './vector-D3eDzvcA.js';
@@ -16,13 +16,25 @@ import './events.js';
16
16
  import 'mitt';
17
17
 
18
18
  /**
19
- * The y=0 construction plane, drawn so the snap lattice is legible.
19
+ * The construction plane, drawn so the snap lattice is legible. It lies on
20
+ * y=0 unless a level draw lays it on the draw plane.
20
21
  *
21
22
  * Two overlaid grids: fine lines at the translation snap increment, and heavier
22
23
  * lines every metre. Without the coarse pass a 0.25 grid over any useful area
23
24
  * reads as flat grey noise.
24
25
  */
25
26
 
27
+ interface GridPoint {
28
+ x: number;
29
+ y: number;
30
+ z: number;
31
+ }
32
+ /** A plane as a draw frame names it: a point on it, its in-plane `u`, and its normal. */
33
+ interface GridPlane {
34
+ origin: GridPoint;
35
+ u: GridPoint;
36
+ normal: GridPoint;
37
+ }
26
38
  declare class ConstructionGrid {
27
39
  private group;
28
40
  private scene;
@@ -35,8 +47,17 @@ declare class ConstructionGrid {
35
47
  setIncrement(increment: number): void;
36
48
  setVisible(visible: boolean): void;
37
49
  get visible(): boolean;
50
+ /**
51
+ * Lay the grid on a plane, or back on y=0 with `null`.
52
+ *
53
+ * The plane's `u` runs along the grid's X. The grid centres on the lines
54
+ * nearest `focus`, shifted by whole cells, so it stays on the world lattice.
55
+ */
56
+ setPlane(plane: GridPlane | null, focus?: GridPoint): void;
38
57
  dispose(): void;
39
58
  private rebuild;
59
+ /** The shortest shift that is whole fine steps and whole metres, so neither set of lines moves. */
60
+ private wholeCell;
40
61
  private clearHelpers;
41
62
  }
42
63
 
package/dist/debug.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-OCQ7A5IK.js";import{c as P,d as Q,e as R,f as S}from"./chunk-47HAZZWF.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-273CUPEO.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-UM5VNQPY.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{P as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,S as TransformGizmo,Q as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,R as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
1
+ import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-B6GDESCB.js";import{c as P,d as Q,e as R,f as S}from"./chunk-SIRFF4DY.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-273CUPEO.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-UM5VNQPY.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{S as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,R as TransformGizmo,P as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,Q as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
package/dist/entity.js CHANGED
@@ -1 +1 @@
1
- import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-CVKEWWIH.js";import{a as ba,b as ca,c as da,d as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,l as la}from"./chunk-63T3K5EQ.js";import{a as X,b as Y,c as Z,d as _,e as $,f as aa}from"./chunk-M2FZ224T.js";import{A as J,B as K,C as L,D as M,E as N,J as R,K as S,L as T,M as U,N as V,O as W,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r,k as s,l as t,m as u,n as v,o as w,p as x,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as I}from"./chunk-DYD7MDWO.js";import{d as H,e as O,f as P,g as Q}from"./chunk-IHGRFR4H.js";import{E as i,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h}from"./chunk-AJSIVGDX.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-Q22Z4PBD.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{X as ACTOR_TYPE,p as BOX_TYPE,v as CONE_TYPE,B as CYLINDER_TYPE,I as DISK_TYPE,_ as FOG_TYPE,U as LIGHT_TYPE,ha as LINE_TYPE,ma as PARTICLE_SYSTEM_TYPE,E as PILL_TYPE,L as PLANE_TYPE,y as PYRAMID_TYPE,R as RECT_TYPE,s as SPHERE_TYPE,ea as SPRITE_TYPE,ba as TEXT_TYPE,O as ZONE_TYPE,Y as ZylemActor,q as ZylemBox,w as ZylemCone,C as ZylemCylinder,J as ZylemDisk,$ as ZylemFog,V as ZylemLight,ja as ZylemLine,na as ZylemParticleSystem,F as ZylemPill,M as ZylemPlane,z as ZylemPyramid,S as ZylemRect,t as ZylemSphere,fa as ZylemSprite,ca as ZylemText,P as ZylemZone,a as boxCollision,j as boxMesh,c as coneCollision,l as coneMesh,i as create,Z as createActor,r as createBox,x as createCone,pa as createCooldownIcon,D as createCylinder,K as createDisk,H as createEntity,la as createEntityFactory,aa as createFog,W as createLight,ka as createLine,oa as createParticleSystem,G as createPill,N as createPlane,A as createPyramid,T as createRect,u as createSphere,ga as createSprite,da as createText,Q as createZone,e as cylinderCollision,n as cylinderMesh,qa as destroy,ia as pickZylemLine,f as pillCollision,o as pillMesh,g as planeCollision,d as pyramidCollision,m as pyramidMesh,b as sphereCollision,k as sphereMesh,h as zoneCollision};
1
+ import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-5NQGXW75.js";import{a as ba,b as ca,c as da,d as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,l as la}from"./chunk-3LXDHDJB.js";import{a as X,b as Y,c as Z,d as _,e as $,f as aa}from"./chunk-BJYXY2FB.js";import{A as J,B as K,C as L,D as M,E as N,J as R,K as S,L as T,M as U,N as V,O as W,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r,k as s,l as t,m as u,n as v,o as w,p as x,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as I}from"./chunk-YWH5HQDT.js";import{d as H,e as O,f as P,g as Q}from"./chunk-UNCP6V7I.js";import{E as i,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h}from"./chunk-CI7A5N6G.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{X as ACTOR_TYPE,p as BOX_TYPE,v as CONE_TYPE,B as CYLINDER_TYPE,I as DISK_TYPE,_ as FOG_TYPE,U as LIGHT_TYPE,ha as LINE_TYPE,ma as PARTICLE_SYSTEM_TYPE,E as PILL_TYPE,L as PLANE_TYPE,y as PYRAMID_TYPE,R as RECT_TYPE,s as SPHERE_TYPE,ea as SPRITE_TYPE,ba as TEXT_TYPE,O as ZONE_TYPE,Y as ZylemActor,q as ZylemBox,w as ZylemCone,C as ZylemCylinder,J as ZylemDisk,$ as ZylemFog,V as ZylemLight,ja as ZylemLine,na as ZylemParticleSystem,F as ZylemPill,M as ZylemPlane,z as ZylemPyramid,S as ZylemRect,t as ZylemSphere,fa as ZylemSprite,ca as ZylemText,P as ZylemZone,a as boxCollision,j as boxMesh,c as coneCollision,l as coneMesh,i as create,Z as createActor,r as createBox,x as createCone,pa as createCooldownIcon,D as createCylinder,K as createDisk,H as createEntity,la as createEntityFactory,aa as createFog,W as createLight,ka as createLine,oa as createParticleSystem,G as createPill,N as createPlane,A as createPyramid,T as createRect,u as createSphere,ga as createSprite,da as createText,Q as createZone,e as cylinderCollision,n as cylinderMesh,qa as destroy,ia as pickZylemLine,f as pillCollision,o as pillMesh,g as planeCollision,d as pyramidCollision,m as pyramidMesh,b as sphereCollision,k as sphereMesh,h as zoneCollision};
@@ -0,0 +1 @@
1
+ import{h as s,k as i}from"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";import{FBXLoader as c}from"three/addons/loaders/FBXLoader.js";function l(r,o){if(!o?.applyUnitScale)return;let e=r.userData?.unitScaleFactor;typeof e!="number"||!Number.isFinite(e)||e===1||r.scale.multiplyScalar(e)}var d=class{loader;constructor(){this.loader=new c}isSupported(o){return i(o)==="fbx"}async load(o,e){return e?.useAsyncFetch?this.loadWithAsyncFetch(o,e):this.loadMainThread(o,e)}async loadWithAsyncFetch(o,e){try{let a=await fetch(o);if(!a.ok)throw new Error(`Failed to fetch ${o}: ${a.status} ${a.statusText}`);let n=await a.arrayBuffer(),t=this.loader.parse(n,o);return l(t,e),{object:t,animations:t.animations||[]}}catch(a){return console.error(`Async fetch FBX load failed for ${o}, falling back to loader.load():`,a),this.loadMainThread(o,e)}}async loadMainThread(o,e){return new Promise((a,n)=>{this.loader.load(o,t=>{l(t,e),a({object:t,animations:t.animations||[]})},t=>{e?.onProgress&&t.lengthComputable&&e.onProgress(t.loaded/t.total)},t=>n(t))})}clone(o){return{object:s(o.object),animations:o.animations?.map(e=>e.clone())}}};export{d as FBXLoaderAdapter};
@@ -0,0 +1 @@
1
+ import{z as e}from"./chunk-VUTKEMIE.js";import"./chunk-26EJFYDX.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-BH53MBAZ.js";import"./chunk-UG22Z42P.js";import"./chunk-Y5IU6IA5.js";import"./chunk-SIRFF4DY.js";import"./chunk-273CUPEO.js";import"./chunk-UM5VNQPY.js";import"./chunk-2HSR5XDQ.js";import"./chunk-D2PATZCC.js";import"./chunk-BJYXY2FB.js";import"./chunk-UNCP6V7I.js";import"./chunk-CI7A5N6G.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";import{proxy as t}from"valtio/vanilla";var s=()=>({id:"zylem",globals:{},stages:[e()],debug:!1,time:0,input:void 0}),a=t({...s()});function o(){return{id:a.id??"zylem",globals:a.globals??{},stages:a.stages??[e()],debug:a.debug,time:a.time,input:a.input}}export{o as getGameDefaultConfig};
@@ -1,7 +1,7 @@
1
1
  import { e as InputPlayerNumber, f as InputProvider, I as Inputs, a as SetupContext, U as UpdateContext, D as DestroyContext, m as IGame, h as SetupFunction, g as UpdateFunction, j as DestroyFunction, S as StageNavigationOptions } from './base-node-life-cycle-BK9xebT9.js';
2
2
  import { G as GameInputConfig, B as BaseGlobals, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
3
3
  import { B as BaseNode } from './base-node-idopiSw5.js';
4
- import { B as BaseEntityInterface, q as Stage } from './stage-CCGJh9TD.js';
4
+ import { B as BaseEntityInterface, q as Stage } from './stage-Dez16Gxm.js';
5
5
  import { E as GameEntityLifeCycle } from './entity-CY75JJSw.js';
6
6
  import { Color, Vector3 } from 'three';
7
7
  import { d as Vec3Components } from './vector-D3eDzvcA.js';
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-GQXYD2JG.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";export{c as GaussianSplatAdapter,a as createGaussianSplatResult,b as parseGaussianBuffer};
@@ -0,0 +1 @@
1
+ import{b as n}from"./chunk-2NO4YCLR.js";import{h as a,k as s}from"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";import{Mesh as u,MeshStandardMaterial as p,Points as f,PointsMaterial as m}from"three";import{STLLoader as c}from"three/addons/loaders/STLLoader.js";import{PLYLoader as M}from"three/addons/loaders/PLYLoader.js";function h(e,o){o?.upAxis==="z"&&(e.rotation.x=-Math.PI/2)}function i(e){let o=!!e.hasColors||!!e.getAttribute("color"),t=typeof e.alpha=="number"?e.alpha:1;return new p({vertexColors:o,opacity:t,transparent:t<1})}function L(e){return e.groups.length>1?e.groups.map(()=>i(e)):i(e)}function d(e,o,t){let r=t==="points"?new f(e,new m({size:1,vertexColors:!!e.getAttribute("color")})):new u(e,L(e));return h(r,o),{object:r,animations:[]}}function x(e,o){let t=new c().parse(e);return d(t,o,"mesh")}function A(e,o){let t=new M().parse(e);!t.getAttribute("normal")&&t.getIndex()&&t.computeVertexNormals();let r=t.getIndex()?"mesh":"points";return d(t,o,r)}var l=class{isSupported(o){let t=s(o);return t==="stl"||t==="ply"}async load(o,t){let r=await n(o,t);return s(o)==="stl"?x(r,t):A(r,t)}clone(o){return{object:a(o.object),animations:[]}}};export{l as GeometryMeshAdapter,d as meshResultFromGeometry,A as parseMeshPlyBuffer,x as parseStlBuffer};
package/dist/graphics.js CHANGED
@@ -1 +1 @@
1
- import{a as p,b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,l as A,m as B,n as C,o as D,p as E,q as F,r as G,s as H,t as I,u as J,v as K,w as L}from"./chunk-4DAITCJS.js";import{a as o}from"./chunk-7GYFZKK7.js";import{c as a,d as b,h as c,i as d,j as e,k as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m,t as n}from"./chunk-Q22Z4PBD.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{n as Fn,A as abs,d as applyEntityGlow,z as asin,y as atan,v as clamp,x as cos,p as createBackgroundShader,c as createEntityGlowMaterial,g as createNodeMaterialFromTSL,o as crossfadeTransitionShader,I as dot,B as exp,m as float,G as floor,H as fract,f as isGLSLShader,e as isTSLShader,J as length,E as max,F as min,t as mix,L as mod,s as normalize,a as objectVertexShader,r as positionWorld,q as positionWorldDirection,C as pow,w as sin,u as smoothstep,b as standardShader,D as step,j as time,h as uniform,i as uv,K as vec2,k as vec3,l as vec4};
1
+ import{a as p,b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,l as A,m as B,n as C,o as D,p as E,q as F,r as G,s as H,t as I,u as J,v as K,w as L}from"./chunk-4DAITCJS.js";import{a as o}from"./chunk-7GYFZKK7.js";import{c as a,d as b,g as c,h as d,i as e,j as f,l as g,m as h,n as i,o as j,p as k,q as l,r as m,s as n}from"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{n as Fn,A as abs,d as applyEntityGlow,z as asin,y as atan,v as clamp,x as cos,p as createBackgroundShader,c as createEntityGlowMaterial,g as createNodeMaterialFromTSL,o as crossfadeTransitionShader,I as dot,B as exp,m as float,G as floor,H as fract,f as isGLSLShader,e as isTSLShader,J as length,E as max,F as min,t as mix,L as mod,s as normalize,a as objectVertexShader,r as positionWorld,q as positionWorldDirection,C as pow,w as sin,u as smoothstep,b as standardShader,D as step,j as time,h as uniform,i as uv,K as vec2,k as vec3,l as vec4};
@@ -0,0 +1 @@
1
+ import{c as r}from"./chunk-2NO4YCLR.js";import{h as m,j as d,k as c,l as p}from"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";import{MTLLoader as L}from"three/addons/loaders/MTLLoader.js";import{OBJLoader as b}from"three/addons/loaders/OBJLoader.js";function f(a){return/^mtllib\s+(.+)$/m.exec(a)?.[1]?.trim()||null}var u=class{isSupported(t){return c(t)==="obj"}async load(t,e){let l=await r(t,e),n=new b,s=e?.mtlPath?null:f(l),o=e?.mtlPath??(s?p(s,t):null);if(o){let i=new L().parse(await r(o,e),d(o));i.preload(),n.setMaterials(i)}return{object:n.parse(l),animations:[]}}clone(t){return{object:m(t.object),animations:[]}}};export{u as OBJLoaderAdapter,f as readObjMaterialLibrary};
package/dist/placement.js CHANGED
@@ -1 +1 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as g}from"./chunk-MJ7RGE47.js";import{c as a}from"./chunk-Y5IU6IA5.js";import"./chunk-AJSIVGDX.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-Q22Z4PBD.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{c as DROPPABLE_AREA_TYPE,b as HOVER_AREA_TYPE,e as ZylemDroppableArea,d as ZylemHoverArea,g as createDroppableArea,f as createHoverArea,a as entityRepresentative};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as g}from"./chunk-YFXNZ2RS.js";import{c as a}from"./chunk-Y5IU6IA5.js";import"./chunk-CI7A5N6G.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{c as DROPPABLE_AREA_TYPE,b as HOVER_AREA_TYPE,e as ZylemDroppableArea,d as ZylemHoverArea,g as createDroppableArea,f as createHoverArea,a as entityRepresentative};
package/dist/public.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-CmkhPP-9.js';
1
+ export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-uQd7k6-m.js';
2
2
  export { G as GameInputConfig, a as GameInputPlayerConfig, K as KeyboardMapping, M as MouseConfig, b as MouseMapping, V as VirtualTouchButtonConfig, d as VirtualTouchButtonSlot, c as VirtualTouchButtonsConfig, e as VirtualTouchConfig, f as VirtualTouchJoystickConfig, g as VirtualTouchJoysticksConfig, h as VirtualTouchPosition, i as VirtualTouchStyle, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
3
- export { e as CameraManager, d as CameraOptions, C as CameraWrapper, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-CCGJh9TD.js';
3
+ export { e as CameraManager, d as CameraOptions, C as CameraWrapper, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-Dez16Gxm.js';
4
4
  export { CameraFeedOptions, FollowTargetOptions, LevelStage, PlatformAxisMode, PlatformAxisModes, PlatformFollowOptions, RenderCategory, STAGE_STATE_CHANGE, StageManager, StageStateChangeEvent, StrategyPanBehavior, StrategyPanInput, StrategyPanOptions, StrategyPointer, StreamLevelOptions, StreamLevelResult, Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, getActiveLevelDocument, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel } from './core.js';
5
- export { L as LevelDocument } from './level-types-D10LiOcn.js';
6
- export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeNdc, BridgeVec3, CameraPosePayload, CutsceneLoadPayload, CutscenePlaybackState, CutsceneStatusPayload, CutsceneViewPayload, EditorToGameMessages, EntityApplySwatchPayload, EntityPickPayload, EntityPickResultPayload, EntitySummaryPayload, EntitySwatchAppliedPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, LevelBuffer, StageConfigPayload, StageSnapshotPayload, SwatchApplyFailureReason, SwatchApplyResult, SwatchKind, SwatchSpec, ZylemBridge, announceBridgeReady, applySwatchesToSelection, getZylemBridge } from '@zylem/bridge';
5
+ export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeNdc, BridgeVec3, CameraPosePayload, CutsceneLoadPayload, CutscenePlaybackState, CutsceneStatusPayload, CutsceneViewPayload, EditorToGameMessages, EntityApplySwatchPayload, EntityPickPayload, EntityPickResultPayload, EntitySummaryPayload, EntitySwatchAppliedPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, LevelBuffer, LevelDocument, StageConfigPayload, StageSnapshotPayload, SwatchApplyFailureReason, SwatchApplyResult, SwatchKind, SwatchSpec, ZylemBridge, announceBridgeReady, applySwatchesToSelection, getZylemBridge } from '@zylem/bridge';
7
6
  export { A as ArmPlacementOptions, E as EntityRepresentative, a as EntityRepresentativeOptions, P as PlacementSession, R as RepresentativeFrame, b as RepresentativeLook, c as RepresentativeSource, e as entityRepresentative } from './placement-session-BNQoL7Jb.js';
8
7
  export { f as EntityBlueprint, j as EntityJson, d as EntityJsonSchema, E as EntitySchema, i as LineEntityData, L as LineEntityDataSchema, h as SpriteEntityData, b as SpriteEntityDataSchema, S as StageBlueprint, k as StageJson, e as StageJsonSchema, c as StageSchema, g as TextEntityData, T as TextEntityDataSchema, V as Vector2Schema, a as Vector3TupleSchema } from './blueprints-TbGY-h53.js';
9
8
  export { A as AnalogState, d as ButtonName, B as ButtonState, c as InputGamepad, b as InputPlayer, e as InputPlayerNumber, f as InputProvider, I as Inputs, L as LoadingEvent, a as SetupContext, S as StageNavigationOptions, U as UpdateContext } from './base-node-life-cycle-BK9xebT9.js';
@@ -28,7 +27,7 @@ export { Howl } from 'howler';
28
27
  export { o as AudioClip, A as AudioClipSchema, k as EffectType, E as Envelope, h as InstrumentDefinition, I as InstrumentDefinitionSchema, i as InstrumentEffect, a as InstrumentEffectSchema, j as InstrumentPreset, b as InstrumentPresetSchema, n as NoteClip, N as NoteClipSchema, O as OscillatorType, m as SongClip, d as SongClipSchema, g as SongDefinition, S as SongDefinitionSchema, r as SongLoop, f as SongLoopSchema, p as SongNote, e as SongNoteSchema, l as SongTrack, c as SongTrackSchema, q as TimeSignature, T as TimeSignatureSchema } from './song-definition-rEKksP0B.js';
29
28
  export { w as AudioItem, A as AudioItemSchema, q as AudioTrack, l as CameraKeyframe, c as CameraKeyframeSchema, m as CameraPoseDef, n as CameraShot, d as CameraShotSchema, o as CameraTrack, i as CutsceneCamera, j as CutsceneCameraKind, b as CutsceneCameraSchema, g as CutsceneDefinition, C as CutsceneDefinitionSchema, k as CutsceneEasing, u as CutsceneEvent, e as CutsceneEventSchema, h as CutsceneScene, a as CutsceneSceneSchema, r as CutsceneTrack, f as CutsceneTrackSchema, s as DollyPath, D as DollyPathSchema, v as EventItem, E as EventItemSchema, p as EventTrack, x as SceneTransition, S as SceneTransitionSchema, y as SceneTransitionType, t as ShotBlend, V as Vec3Def } from './cutscene-definition-C479fkei.js';
30
29
  export { CUTSCENE_BEHAVIOR_KEY, CutsceneCameraBehavior, CutsceneFrame, CutsceneHost, CutscenePlayer, CutscenePlayerEvents, CutscenePlayerOptions, CutscenePlayerState, CutscenePreviewController, CutsceneStageLike, EvaluatedPose, StageCutsceneHostOptions, TargetLookup, activeShot, cameraTracks, createCutscenePlayer, createStageCutsceneHost, cutsceneLength, dollyPointAt, easeValue, evaluateCameraPose, evaluateCutscene, itemsBetween, lerpPose, lerpVec3, previousShot, sampleDollyPath, sceneAt, setCutsceneTransitionShaders, shotAt } from './cinematics.js';
31
- export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-BgX5Q0Ff.js';
30
+ export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-JRneI6c2.js';
32
31
  export { G as GizmoAxis, a as GizmoDelta, b as GizmoMode, d as GizmoRay, T as TransformGizmo, c as closestAxisValue, i as intersectPlane } from './transform-gizmo-DappLQ9w.js';
33
32
  export { ConstructionGrid, EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, Quat, degreesToRadians, entityThumbnailCache, eulerToQuaternion, focusEntity, quaternionToEuler, radiansToDegrees, registerEntityFocusContext, snapScale, snapToIncrement, snapVec3 } from './debug.js';
34
33
  export { S as SELECTION_BOUNDS_MARGIN, a as SELECTION_THIN_AXIS_FRACTION, c as SELECTION_THIN_AXIS_MAX, b as SELECTION_THIN_AXIS_MIN, d as SelectionBoundsProvider, m as measureObjectSelectionBounds, p as padSelectionBounds, r as resolveSelectionBounds } from './selection-bounds-BKmSo9aG.js';
package/dist/public.js CHANGED
@@ -1 +1 @@
1
- import{a as $m,b as en,c as rn,d as tn}from"./chunk-FZNEWOC5.js";import{a as on}from"./chunk-JCGW5PIR.js";import{a as an,b as pn,c as mn,d as nn,e as fn,f as xn,g as ln,h as sn,i as cn,j as dn,k as yn,l as vn,m as En,n as Sn,o as An,p as hn}from"./chunk-47DG7I7M.js";import{A as In,B as Jn,C as Kn,a as Rn,b as Pn,c as Ln,d as On,e as bn,f as Tn,g as Zn,h as Dn,i as gn,j as un,k as wn,l as Gn,m as Hn,n as _n,o as Fn,p as jn,q as kn,r as Bn,s as Cn,t as Mn,u as Vn,v as Wn,w as Yn,x as zn,y as Nn,z as qn}from"./chunk-KSEP7AUF.js";import{A as Nm,B as qm,C as Im,D as Jm,E as Km,a as Am,b as hm,c as Rm,d as Pm,e as Lm,f as Om,g as bm,h as Tm,i as Zm,j as Dm,k as gm,l as um,m as wm,n as Gm,o as Hm,p as _m,q as Fm,r as jm,s as km,t as Bm,u as Cm,v as Mm,w as Vm,x as Wm,y as Ym,z as zm}from"./chunk-IPWUDOV5.js";import{a as Qm,b as Um,c as Xm}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as y,b as v,c as E,d as S,e as A,f as h}from"./chunk-MJ7RGE47.js";import{a as R,b as P,c as L,d as O,e as b,f as T,g as Z,h as D,i as g,j as u,k as w,l as G,m as H,n as _,o as F,p as j,q as k,r as B,s as C,t as M,u as V,v as W,w as Y}from"./chunk-4DAITCJS.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as Vi,b as Wi,c as em,d as rm,e as tm,f as om}from"./chunk-ZZO4CKRU.js";import{a as Yi,b as zi,c as Ni,d as qi,e as Ii,f as Ji,g as Ki,h as Qi,i as Ui,j as Xi,k as $i}from"./chunk-NVVLLWIM.js";import{a as pp,c as ip,d as mp,e as np,f as fp,g as xp}from"./chunk-2PFNNGTV.js";import"./chunk-VMXSE3EC.js";import{a as am,b as pm,c as im,d as mm,e as nm,f as fm,g as xm,h as lm,i as sm,j as cm,k as dm}from"./chunk-YNX3Q3CL.js";import{a as ym,b as vm,c as Em,d as Sm}from"./chunk-WQ3WMMZD.js";import{a as Fe,b as je,c as ke,d as Be,e as qe,f as Qp,g as Up,h as fi,i as xi,j as li,k as si,l as ci,m as di,n as yi,o as vi,p as Ei,q as Si,r as Ai}from"./chunk-JJEYLGD2.js";import{a as _e,c as Za,d as Da,e as ga,f as Rp,g as Pp,h as Dp,i as Hp,j as _p,l as Fp,m as jp,n as kp,o as Bp,p as Cp,q as Mp,r as Vp,s as Wp,t as Yp,u as zp,v as Np,w as qp,x as Jp,z as Kp}from"./chunk-UKNMIHAP.js";import{e as Ue,n as pr}from"./chunk-KL7NGD76.js";import{b as Ep}from"./chunk-WBQ5TNRZ.js";import{a as Ip}from"./chunk-BH53MBAZ.js";import{a as Ce,b as Me,c as Ve,d as We,e as Ye,f as ze,g as Ne}from"./chunk-PCFF4LLO.js";import{a as Pe,b as Le,c as Oe,d as be,e as Te,f as Ze,g as De,h as ge,i as ue,j as we,k as Ge,l as He}from"./chunk-UG22Z42P.js";import{c as d}from"./chunk-Y5IU6IA5.js";import{a as he,b as Re}from"./chunk-OCQ7A5IK.js";import{c as gp,d as up,e as wp,f as Gp}from"./chunk-47HAZZWF.js";import{a as Ke,b as Qe,c as Xe,d as $e,e as er,f as rr,g as tr,h as or,i as ar}from"./chunk-273CUPEO.js";import{B as Ee,C as Se,D as Ae,a as U,b as X,c as $,d as ee,e as re,f as te,h as oe,j as ae,l as pe,m as ie,n as me,o as ne,p as fe,q as xe,u as le,v as se,w as ce,x as de,y as ye,z as ve}from"./chunk-UM5VNQPY.js";import"./chunk-SD7EHS4W.js";import"./chunk-2HSR5XDQ.js";import{a as ua,b as wa,c as Ga,d as Ha,e as _a,f as Fa,g as ja,h as ka,i as Ba,j as Ca,k as Ma,l as Va,m as Wa,n as Ya,o as za,p as Na,q as qa,r as lp,s as sp,t as cp}from"./chunk-2XMG3NJS.js";import{a as Ta}from"./chunk-7GYFZKK7.js";import{a as Ia,b as Ja,c as Ka,d as Qa,e as Ua,f as Xa,g as $a,h as ep,i as rp,j as tp,k as op,l as ap}from"./chunk-QGIYILYI.js";import{h as Lp,i as Op,j as bp,k as Tp,l as Zp}from"./chunk-D2PATZCC.js";import{a as hi,b as Ri,c as Pi,d as Li,e as Oi}from"./chunk-CVKEWWIH.js";import{a as Xp,b as $p,c as ei,d as ri,e as ti,f as oi,g as ai,h as pi,i as ii,j as mi,l as ni}from"./chunk-63T3K5EQ.js";import{a as dp,b as yp,c as vp,d as Sp,e as Ap,f as hp}from"./chunk-M2FZ224T.js";import{A as lt,B as st,C as ct,D as dt,E as yt,J as Tt,K as Zt,L as Dt,M as gt,N as ut,O as wt,b as Cr,c as Mr,d as Vr,e as Wr,f as Yr,g as zr,h as Nr,i as qr,j as Ir,k as Jr,l as Kr,m as Qr,n as Ur,o as Xr,p as $r,q as et,r as rt,s as tt,t as ot,u as at,v as pt,w as it,x as mt,y as nt,z as xt}from"./chunk-DYD7MDWO.js";import{d as ft,e as Lt,f as Ot,g as bt}from"./chunk-IHGRFR4H.js";import{E as Br,c as ur,d as wr,e as Gr,f as Hr,g as _r,h as Fr,i as jr,j as kr}from"./chunk-AJSIVGDX.js";import{b as gr}from"./chunk-EVYHPR3J.js";import{a as dr,b as yr,c as vr,d as Er,e as Sr,f as Ar,g as hr,h as Rr,i as Pr,j as Lr,k as Or,l as br,m as Tr,n as Zr,o as Dr}from"./chunk-XRP4JJXL.js";import{c as e,d as r,h as t,i as o,j as a,k as p,m as i,n as m,o as n,p as f,q as x,r as l,s,t as c}from"./chunk-Q22Z4PBD.js";import{a as Ie,b as Je}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as vt,b as Et,c as St,d as At,e as ht,f as Rt,g as Pt}from"./chunk-UUOPT2N4.js";import{e as z,f as N,g as q,h as I,i as J,j as K,m as Q}from"./chunk-4QLJUQSJ.js";import{a as ir,b as mr,c as nr,d as fr,g as xr,h as lr,i as sr,j as cr}from"./chunk-7WRQ2UAN.js";import{a as bi,b as Ti,c as Zi,d as Di,e as gi,f as ui,g as wi,h as Gi,i as Hi,j as _i,k as Fi,l as ji,m as ki,n as Bi,o as Ci,p as Mi}from"./chunk-6XFXPIVB.js";import{$ as wo,A as oo,Aa as aa,B as ao,Ba as pa,C as po,Ca as ia,D as io,Da as ma,E as mo,Ea as na,F as no,Fa as fa,G as fo,Ga as xa,H as xo,Ha as la,I as lo,Ia as sa,J as so,Ja as ca,K as co,Ka as da,L as yo,La as ya,M as vo,Ma as va,N as Eo,Na as Ea,O as So,Oa as Sa,P as Ao,Pa as Aa,Q as ho,Qa as ha,R as Ro,Ra,S as Po,Sa as Pa,T as Lo,Ta as La,U as Oo,Ua as Oa,V as bo,Va as ba,W as To,X as Zo,Y as Do,Z as go,_ as uo,aa as Go,b as Gt,ba as Ho,c as Ht,ca as _o,d as _t,da as Fo,e as Ft,ea as jo,f as jt,fa as ko,g as kt,ga as Bo,h as Bt,ha as Co,i as Ct,ia as Mo,j as Mt,ja as Vo,k as Vt,ka as Wo,l as Wt,la as Yo,m as Yt,ma as zo,n as zt,na as No,o as Nt,oa as qo,p as qt,pa as Io,q as It,qa as Jo,r as Jt,ra as Ko,s as Kt,sa as Qo,t as Qt,ta as Uo,u as Ut,ua as Xo,v as Xt,va as $o,w as $t,wa as ea,x as eo,xa as ra,y as ro,ya as ta,z as to,za as oa}from"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{dp as ACTOR_TYPE,Fe as AspectRatio,Ki as AudioClipSchema,sm as AudioItemSchema,Nr as BOX_TYPE,tn as BRIDGE_READY_EVENT,Gt as BoundaryRicochet3DCoordinator,Ht as BoundaryRicochetCoordinator,Ur as CONE_TYPE,ua as CUTSCENE_BEHAVIOR_KEY,ot as CYLINDER_TYPE,im as CameraKeyframeSchema,Yp as CameraManager,Fp as CameraPipeline,fm as CameraShotSchema,zp as CameraWrapper,Wn as ColorJsonSchema,gp as ConstructionGrid,_t as CooldownBehavior,wa as CutsceneCameraBehavior,mm as CutsceneCameraSchema,dm as CutsceneDefinitionSchema,xm as CutsceneEventSchema,cp as CutscenePreviewController,pm as CutsceneSceneSchema,cm as CutsceneTrackSchema,$ as DEFAULT_SNAP_SETTINGS,xt as DISK_TYPE,v as DROPPABLE_AREA_TYPE,Ft as Destructible3DBehavior,jt as DestructibleMesh,nm as DollyPathSchema,Dn as EntityJsonSchema,Pn as EntitySchema,he as EntityThumbnailCache,Ie as EventEmitterDelegate,lm as EventItemSchema,Sp as FOG_TYPE,kt as FirstPersonBehavior,Bt as FirstPersonEvent,Ct as FirstPersonFSM,Bp as FirstPersonPerspective,Wt as FirstPersonPresentation,Mt as FirstPersonShooterCoordinator,Vt as FirstPersonState,kp as Fixed2DPerspective,c as Fn,Yt as FractureOptions,fi as Game,pr as GameBridge,Kn as GameConfigJsonSchema,Jn as GameDeviceConfigJsonSchema,Vn as GameInputConfigSchema,Mn as GameInputPlayerConfigSchema,y as HOVER_AREA_TYPE,om as Howl,Ni as InstrumentDefinitionSchema,zi as InstrumentEffectSchema,Yi as InstrumentPresetSchema,Cp as IsometricPerspective,zt as Jumper2DBehavior,Nt as Jumper2DEvent,qt as Jumper2DFSM,It as Jumper2DState,Jt as Jumper3DBehavior,Kt as Jumper3DEvent,Qt as Jumper3DFSM,Ut as Jumper3DState,un as KeyboardMappingSchema,gt as LIGHT_TYPE,ai as LINE_TYPE,Tn as LineEntityDataSchema,Cn as MouseConfigSchema,wn as MouseMappingSchema,Xt as MultidirectionalSpaceShooterCoordinator,Ji as NoteClipSchema,hi as PARTICLE_SYSTEM_TYPE,it as PILL_TYPE,ct as PLANE_TYPE,et as PYRAMID_TYPE,$t as ParticleEmitterBehavior,_p as Perspectives,eo as Platformer2DBehavior,ro as Platformer2DEvent,to as Platformer2DFSM,oo as Platformer2DState,ao as Platformer3DBehavior,po as Platformer3DEvent,io as Platformer3DFSM,mo as Platformer3DState,Tt as RECT_TYPE,wi as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,Gi as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,Hi as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,_i as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,Fi as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,ji as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,Rp as RenderBundleManager,Pp as RenderStrategyManager,In as ResolutionInputSchema,no as Ricochet2DBehavior,fo as Ricochet2DEvent,xo as Ricochet2DFSM,lo as Ricochet2DState,so as Ricochet3DBehavior,co as Ricochet3DEvent,yo as Ricochet3DFSM,vo as Ricochet3DState,bi as RuntimeBoundary2DBehavior,Ti as RuntimeDynamicCircleBody2DBehavior,Zi as RuntimeGoalZone2DBehavior,Di as RuntimePlayerInput2DBehavior,gi as RuntimeRicochet2DBehavior,ui as RuntimeTriggerRegion2DBehavior,vt as SELECTION_BOUNDS_MARGIN,Et as SELECTION_THIN_AXIS_FRACTION,At as SELECTION_THIN_AXIS_MAX,St as SELECTION_THIN_AXIS_MIN,Jr as SPHERE_TYPE,ri as SPRITE_TYPE,ci as STAGE_STATE_CHANGE,am as SceneTransitionSchema,Eo as ScreenVisibilityBehavior,So as ScreenVisibilityFSM,Ao as ScreenWrapBehavior,ho as ScreenWrapEvent,Ro as ScreenWrapFSM,Po as ScreenWrapState,Vp as SecondPersonPerspective,Lo as Shooter2DBehavior,Ep as SimulationBody,Qi as SongClipSchema,$i as SongDefinitionSchema,Xi as SongLoopSchema,qi as SongNoteSchema,Ii as SongTrackSchema,Zn as SpriteEntityDataSchema,Nn as StageAssetLoaderConfigSchema,dn as StageBodyKind,yn as StageBoundaryDim,qn as StageConfigJsonSchema,vn as StageEventType,zn as StageGLTFAssetLoaderConfigSchema,gn as StageJsonSchema,Up as StageManager,En as StageRicochetDim,Sn as StageRicochetReflection,Ln as StageSchema,An as StageTopDownPlane,Xp as TEXT_TYPE,U as TRANSFORM_TOOLS,On as TextEntityDataSchema,jp as ThirdPersonPerspective,Oo as ThrusterBehavior,bo as ThrusterEvent,To as ThrusterFSM,Zo as ThrusterState,Ui as TimeSignatureSchema,Do as TopDownMovementBehavior,Mp as TopDownPerspective,go as TopDownShooterCoordinator,Gp as TransformGizmo,mr as VEC2_ONE,ir as VEC2_ZERO,fr as VEC3_ONE,nr as VEC3_ZERO,Yn as Vec3ComponentsSchema,Rn as Vector2Schema,bn as Vector3TupleSchema,_n as VirtualTouchButtonConfigSchema,jn as VirtualTouchButtonsConfigSchema,Bn as VirtualTouchConfigSchema,Fn as VirtualTouchJoystickConfigSchema,kn as VirtualTouchJoysticksConfigSchema,Hn as VirtualTouchPositionSchema,Gn as VirtualTouchStyleSchema,uo as WorldBoundary2DBehavior,wo as WorldBoundary2DEvent,Go as WorldBoundary2DFSM,Ho as WorldBoundary2DState,_o as WorldBoundary3DBehavior,Fo as WorldBoundary3DEvent,jo as WorldBoundary3DFSM,ko as WorldBoundary3DState,Lt as ZONE_TYPE,yp as ZylemActor,qr as ZylemBox,Xr as ZylemCone,at as ZylemCylinder,lt as ZylemDisk,S as ZylemDroppableArea,Ap as ZylemFog,on as ZylemGameElement,E as ZylemHoverArea,ut as ZylemLight,ii as ZylemLine,Ri as ZylemParticleSystem,mt as ZylemPill,dt as ZylemPlane,rt as ZylemPyramid,Zt as ZylemRect,Kr as ZylemSphere,ti as ZylemSprite,$p as ZylemText,Ot as ZylemZone,G as abs,ka as activeShot,en as announceBridgeReady,o as applyEntityGlow,rn as applySwatchesToSelection,Ip as applyTransformChanges,w as asin,u as atan,tp as audibleTrackIds,Ia as beatsPerBar,Ka as beatsToSeconds,ki as bindRuntimeDynamicCircleBody2DHandle,ur as boxCollision,Cr as boxMesh,pn as buildBoxCollider,nn as buildCapsuleCollider,xn as buildConvexHullCollider,fn as buildCylinderCollider,sn as buildHeightfieldCollider,an as buildRuntimeBody,mn as buildSphereCollider,ln as buildTrimeshCollider,cn as bundleRuntimeCollision,Om as callFunc,za as cameraTracks,Z as clamp,Q as clearGlobalSubscriptions,ap as clipsAt,up as closestAxisValue,Bo as computeWorldBoundary2DHits,Co as computeWorldBoundary3DHits,Gr as coneCollision,Vr as coneMesh,g as cos,Br as create,vp as createActor,R as createBackgroundShader,Ir as createBox,Np as createCamera,$r as createCone,Li as createCooldownIcon,qa as createCutscenePlayer,pt as createCylinder,st as createDisk,h as createDroppableArea,ft as createEntity,ni as createEntityFactory,t as createEntityGlowMaterial,Mo as createFirstPersonInputComponent,Vo as createFirstPersonMovementComponent,Wo as createFirstPersonStateComponent,hp as createFog,vi as createFollowTarget,xi as createGame,N as createGlobal,A as createHoverArea,pp as createInstrument,Yo as createJumpConfig2D,zo as createJumpConfig3D,No as createJumpInput2D,qo as createJumpInput3D,Io as createJumpState2D,Jo as createJumpState3D,wt as createLight,mi as createLine,i as createNodeMaterialFromTSL,Pi as createParticleSystem,Wp as createPerspective,Ko as createPhysicsBodyComponent,nt as createPill,yt as createPlane,Ei as createPlatformFollow,Qo as createPlatformer2DInputComponent,Uo as createPlatformer2DMovementComponent,Xo as createPlatformer2DStateComponent,$o as createPlatformer3DInputComponent,ea as createPlatformer3DMovementComponent,ra as createPlatformer3DStateComponent,tt as createPyramid,Dt as createRect,ta as createShooter2DStateComponent,hn as createSimulation,fp as createSongPlayer,Qr as createSphere,oi as createSprite,Kp as createStage,sp as createStageCutsceneHost,Si as createStrategyPan,ei as createText,oa as createThrusterInputComponent,aa as createThrusterMovementComponent,pa as createThrusterStateComponent,ia as createTopDownMovementComponent,ma as createTopDownMovementInputComponent,na as createTopDownMovementStateComponent,fa as createTransformComponent,Hm as createTransformStore,Op as createVariable,bt as createZone,Ta as crossfadeTransitionShader,Na as cutsceneLength,_r as cylinderCollision,Yr as cylinderMesh,ep as dbToGain,ee as debugState,Ne as defaultTouchControls,xa as defineBehavior,or as degreesToRadians,Lm as delay,Oi as destroy,yi as dispatchStageState,Ca as dollyPointAt,M as dot,Ga as easeValue,Bi as emitRuntimeGoal,Ci as emitRuntimeRicochet,Mi as emitRuntimeTriggerRegionEnter,rm as encodeWav,tm as encodeWavBlob,mp as ensureAudio,d as entityRepresentative,si as entitySpawner,Re as entityThumbnailCache,Xe as eulerToQuaternion,Va as evaluateCameraPose,Wa as evaluateCutscene,H as exp,bm as fadeOpacity,la as fireCooldown,sa as fireShooter2DIfRequested,s as float,B as floor,Qe as focusEntity,C as fract,rp as gainToDb,qe as gameConfig,Dp as getActiveLevelDocument,xp as getActiveSongPlayer,ca as getCooldown,da as getCooldownStore,je as getDisplayAspect,ya as getEntityFacingAngle2D,q as getGlobal,K as getGlobals,Se as getHoveredEntity,ye as getHoveredEntityId,Wm as getPosition,ke as getPresetResolution,Dr as getRotation,Ee as getSelectedEntity,me as getSelectedEntityId,fe as getSelectedEntityIds,le as getSnapSettings,bp as getVariable,Ym as getVelocity,$m as getZylemBridge,ym as globalChange,vm as globalChanges,va as hasAnyWorldBoundary2DHit,Ea as hasAnyWorldBoundary3DHit,di as initStageStateDispatcher,wp as intersectPlane,np as isAudioReady,p as isGLSLShader,ga as isManagedRenderEntity,ie as isPickMode,a as isTSLShader,X as isTransformTool,_e as isWebGPUSupported,Ya as itemsBetween,We as joystickBaseSvg,Ye as joystickThumbSvg,V as length,_a as lerpPose,Ha as lerpVec3,ip as loadTone,j as max,Rt as measureObjectSelectionBounds,He as mergeInputConfigs,Xa as midiToFrequency,$a as midiToNoteName,k as min,b as mix,Y as mod,_m as move,hm as moveBy,Vm as moveForwardXY,Rm as moveTo,Fm as moveX,Bm as moveXY,Cm as moveXZ,jm as moveY,km as moveZ,O as normalize,xr as normalizeVec2,lr as normalizeVec3,e as objectVertexShader,I as onGlobalChange,J as onGlobalChanges,Zm as onPress,Dm as onRelease,Tp as onVariableChange,Zp as onVariableChanges,gr as packCollisionGroups,ht as padSelectionBounds,um as parallel,Be as parseResolution,Sa as particleEffect,Aa as particlePresets,pi as pickZylemLine,Fr as pillCollision,zr as pillMesh,Wi as pingPongBeep,jr as planeCollision,L as positionWorld,P as positionWorldDirection,_ as pow,Ba as previousShot,Hr as pyramidCollision,Wr as pyramidMesh,$e as quaternionToEuler,ar as radiansToDegrees,ha as registerCooldown,re as registerDebugEntityResolver,Ke as registerEntityFocusContext,em as renderSong,wm as repeat,Gm as repeatForever,Ra as resetCooldown,Am as resetEntityOpacity,Mm as resetVelocity,Pa as resolveAim2D,Ve as resolveButtonAccent,te as resolveDebugEntity,Za as resolveRenderCategory,Pt as resolveSelectionBounds,Me as resolveTouchTheme,Vi as ricochetSound,Pm as rotateBy,vr as rotateEuler,dr as rotateInDirection,Sr as rotateX,Er as rotateY,yr as rotateYEuler,Ar as rotateZ,Ma as sampleDollyPath,Fa as sceneAt,op as scheduleSong,Xm as screenCenterLookDeltas,Um as screenCenterLookTargets,Qa as secondsToBeats,gm as sequence,de as setAddType,Ai as setCameraFeed,lp as setCutsceneTransitionShaders,ae as setDebugTool,z as setGlobal,ce as setGridVisible,ve as setHoveredEntityId,oe as setPaused,pe as setPickMode,zm as setPosition,Nm as setPositionX,qm as setPositionY,Im as setPositionZ,Tr as setRotation,Zr as setRotationDegrees,Lr as setRotationDegreesX,Rr as setRotationDegreesY,br as setRotationDegreesZ,Pr as setRotationX,hr as setRotationY,Or as setRotationZ,Ae as setSelectedEntity,ne as setSelectedEntityId,xe as setSelectedEntityIds,se as setSnapSettings,Hp as setStageFrameProfilerEnabled,Lp as setVariable,Qm as shortestAngleDelta,ja as shotAt,D as sin,T as smoothstep,tr as snapScale,er as snapToIncrement,rr as snapVec3,Ja as songLengthBeats,Ua as songLengthSeconds,wr as sphereCollision,Mr as sphereMesh,qp as stageConfig,Qp as stageState,r as standardShader,F as step,Ue as streamLevel,li as streamLevelOnStage,Tm as throttle,La as tickCooldowns,f as time,sr as toThreeVector2,cr as toThreeVector3,ze as touchButtonSvg,Ce as touchThemes,m as uniform,Oa as updateBoundaryRicochet,Pe as useArrowsForAxes,Oe as useArrowsForDirections,Le as useArrowsForSecondaryAxes,ba as useBehavior,Ze as useIJKLForAxes,De as useIJKLForDirections,we as useMouse,ge as useMouseLook,ue as useScreenCenterLook,Ge as useVirtualControls,Te as useWASDForAxes,be as useWASDForDirections,Da as usesManagedRenderPath,n as uv,Em as variableChange,Sm as variableChanges,W as vec2,x as vec3,l as vec4,Jp as vessel,Km as wrapAround3D,Jm as wrapAroundXY,kr as zoneCollision,Je as zylemEventBus};
1
+ import{a as $m,b as en,c as rn,d as tn}from"./chunk-FZNEWOC5.js";import{a as on}from"./chunk-JCGW5PIR.js";import{a as an,b as pn,c as mn,d as nn,e as fn,f as xn,g as ln,h as sn,i as cn,j as dn,k as yn,l as vn,m as En,n as Sn,o as An,p as hn}from"./chunk-47DG7I7M.js";import{A as In,B as Jn,C as Kn,a as Rn,b as Pn,c as Ln,d as On,e as bn,f as Tn,g as Zn,h as Dn,i as gn,j as un,k as wn,l as Gn,m as Hn,n as _n,o as Fn,p as jn,q as kn,r as Bn,s as Cn,t as Mn,u as Vn,v as Wn,w as Yn,x as zn,y as Nn,z as qn}from"./chunk-KSEP7AUF.js";import{A as Nm,B as qm,C as Im,D as Jm,E as Km,a as Am,b as hm,c as Rm,d as Pm,e as Lm,f as Om,g as bm,h as Tm,i as Zm,j as Dm,k as gm,l as um,m as wm,n as Gm,o as Hm,p as _m,q as Fm,r as jm,s as km,t as Bm,u as Cm,v as Mm,w as Vm,x as Wm,y as Ym,z as zm}from"./chunk-IPWUDOV5.js";import{a as Qm,b as Um,c as Xm}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as y,b as v,c as E,d as S,e as A,f as h}from"./chunk-YFXNZ2RS.js";import{a as R,b as P,c as L,d as O,e as b,f as T,g as Z,h as D,i as g,j as u,k as w,l as G,m as H,n as _,o as F,p as j,q as k,r as B,s as C,t as M,u as V,v as W,w as Y}from"./chunk-4DAITCJS.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as Vi,b as Wi,c as em,d as rm,e as tm,f as om}from"./chunk-ZZO4CKRU.js";import{a as pp,c as ip,d as mp,e as np,f as fp,g as xp}from"./chunk-2PFNNGTV.js";import{a as Yi,b as zi,c as Ni,d as qi,e as Ii,f as Ji,g as Ki,h as Qi,i as Ui,j as Xi,k as $i}from"./chunk-NVVLLWIM.js";import"./chunk-VMXSE3EC.js";import{a as am,b as pm,c as im,d as mm,e as nm,f as fm,g as xm,h as lm,i as sm,j as cm,k as dm}from"./chunk-YNX3Q3CL.js";import{a as ym,b as vm,c as Em,d as Sm}from"./chunk-WQ3WMMZD.js";import{a as Fe,b as je,c as ke,d as Be,e as qe,f as Qp,g as Up,h as fi,i as xi,j as li,k as si,l as ci,m as di,n as yi,o as vi,p as Ei,q as Si,r as Ai}from"./chunk-JUA5KNND.js";import{a as _e,c as Za,d as Da,e as ga,f as Rp,g as Pp,h as wp,i as Hp,j as _p,l as Fp,m as jp,n as kp,o as Bp,p as Cp,q as Mp,r as Vp,s as Wp,t as Yp,u as zp,v as Np,w as qp,x as Jp,z as Kp}from"./chunk-VUTKEMIE.js";import{e as Ue,n as pr}from"./chunk-26EJFYDX.js";import{b as Ep}from"./chunk-WBQ5TNRZ.js";import{a as Ip}from"./chunk-BH53MBAZ.js";import{a as Ce,b as Me,c as Ve,d as We,e as Ye,f as ze,g as Ne}from"./chunk-PCFF4LLO.js";import{a as Pe,b as Le,c as Oe,d as be,e as Te,f as Ze,g as De,h as ge,i as ue,j as we,k as Ge,l as He}from"./chunk-UG22Z42P.js";import{c as d}from"./chunk-Y5IU6IA5.js";import{a as he,b as Re}from"./chunk-B6GDESCB.js";import{c as Dp,d as gp,e as up,f as Gp}from"./chunk-SIRFF4DY.js";import{a as Ke,b as Qe,c as Xe,d as $e,e as er,f as rr,g as tr,h as or,i as ar}from"./chunk-273CUPEO.js";import{B as Ee,C as Se,D as Ae,a as U,b as X,c as $,d as ee,e as re,f as te,h as oe,j as ae,l as pe,m as ie,n as me,o as ne,p as fe,q as xe,u as le,v as se,w as ce,x as de,y as ye,z as ve}from"./chunk-UM5VNQPY.js";import"./chunk-ICJ2E2OV.js";import"./chunk-2HSR5XDQ.js";import{a as ua,b as wa,c as Ga,d as Ha,e as _a,f as Fa,g as ja,h as ka,i as Ba,j as Ca,k as Ma,l as Va,m as Wa,n as Ya,o as za,p as Na,q as qa,r as lp,s as sp,t as cp}from"./chunk-2XMG3NJS.js";import{a as Ta}from"./chunk-7GYFZKK7.js";import{a as Ia,b as Ja,c as Ka,d as Qa,e as Ua,f as Xa,g as $a,h as ep,i as rp,j as tp,k as op,l as ap}from"./chunk-QGIYILYI.js";import{h as Lp,i as Op,j as bp,k as Tp,l as Zp}from"./chunk-D2PATZCC.js";import{a as hi,b as Ri,c as Pi,d as Li,e as Oi}from"./chunk-5NQGXW75.js";import{a as Xp,b as $p,c as ei,d as ri,e as ti,f as oi,g as ai,h as pi,i as ii,j as mi,l as ni}from"./chunk-3LXDHDJB.js";import{a as dp,b as yp,c as vp,d as Sp,e as Ap,f as hp}from"./chunk-BJYXY2FB.js";import{A as lt,B as st,C as ct,D as dt,E as yt,J as Tt,K as Zt,L as Dt,M as gt,N as ut,O as wt,b as Cr,c as Mr,d as Vr,e as Wr,f as Yr,g as zr,h as Nr,i as qr,j as Ir,k as Jr,l as Kr,m as Qr,n as Ur,o as Xr,p as $r,q as et,r as rt,s as tt,t as ot,u as at,v as pt,w as it,x as mt,y as nt,z as xt}from"./chunk-YWH5HQDT.js";import{d as ft,e as Lt,f as Ot,g as bt}from"./chunk-UNCP6V7I.js";import{E as Br,c as ur,d as wr,e as Gr,f as Hr,g as _r,h as Fr,i as jr,j as kr}from"./chunk-CI7A5N6G.js";import{b as gr}from"./chunk-EVYHPR3J.js";import{a as dr,b as yr,c as vr,d as Er,e as Sr,f as Ar,g as hr,h as Rr,i as Pr,j as Lr,k as Or,l as br,m as Tr,n as Zr,o as Dr}from"./chunk-XRP4JJXL.js";import{c as e,d as r,g as t,h as o,i as a,j as p,l as i,m,n,o as f,p as x,q as l,r as s,s as c}from"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import{a as Ie,b as Je}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as vt,b as Et,c as St,d as At,e as ht,f as Rt,g as Pt}from"./chunk-UUOPT2N4.js";import{e as z,f as N,g as q,h as I,i as J,j as K,m as Q}from"./chunk-4QLJUQSJ.js";import{a as ir,b as mr,c as nr,d as fr,g as xr,h as lr,i as sr,j as cr}from"./chunk-7WRQ2UAN.js";import{a as bi,b as Ti,c as Zi,d as Di,e as gi,f as ui,g as wi,h as Gi,i as Hi,j as _i,k as Fi,l as ji,m as ki,n as Bi,o as Ci,p as Mi}from"./chunk-6XFXPIVB.js";import{$ as wo,A as oo,Aa as aa,B as ao,Ba as pa,C as po,Ca as ia,D as io,Da as ma,E as mo,Ea as na,F as no,Fa as fa,G as fo,Ga as xa,H as xo,Ha as la,I as lo,Ia as sa,J as so,Ja as ca,K as co,Ka as da,L as yo,La as ya,M as vo,Ma as va,N as Eo,Na as Ea,O as So,Oa as Sa,P as Ao,Pa as Aa,Q as ho,Qa as ha,R as Ro,Ra,S as Po,Sa as Pa,T as Lo,Ta as La,U as Oo,Ua as Oa,V as bo,Va as ba,W as To,X as Zo,Y as Do,Z as go,_ as uo,aa as Go,b as Gt,ba as Ho,c as Ht,ca as _o,d as _t,da as Fo,e as Ft,ea as jo,f as jt,fa as ko,g as kt,ga as Bo,h as Bt,ha as Co,i as Ct,ia as Mo,j as Mt,ja as Vo,k as Vt,ka as Wo,l as Wt,la as Yo,m as Yt,ma as zo,n as zt,na as No,o as Nt,oa as qo,p as qt,pa as Io,q as It,qa as Jo,r as Jt,ra as Ko,s as Kt,sa as Qo,t as Qt,ta as Uo,u as Ut,ua as Xo,v as Xt,va as $o,w as $t,wa as ea,x as eo,xa as ra,y as ro,ya as ta,z as to,za as oa}from"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{dp as ACTOR_TYPE,Fe as AspectRatio,Ki as AudioClipSchema,sm as AudioItemSchema,Nr as BOX_TYPE,tn as BRIDGE_READY_EVENT,Gt as BoundaryRicochet3DCoordinator,Ht as BoundaryRicochetCoordinator,Ur as CONE_TYPE,ua as CUTSCENE_BEHAVIOR_KEY,ot as CYLINDER_TYPE,im as CameraKeyframeSchema,Yp as CameraManager,Fp as CameraPipeline,fm as CameraShotSchema,zp as CameraWrapper,Wn as ColorJsonSchema,Gp as ConstructionGrid,_t as CooldownBehavior,wa as CutsceneCameraBehavior,mm as CutsceneCameraSchema,dm as CutsceneDefinitionSchema,xm as CutsceneEventSchema,cp as CutscenePreviewController,pm as CutsceneSceneSchema,cm as CutsceneTrackSchema,$ as DEFAULT_SNAP_SETTINGS,xt as DISK_TYPE,v as DROPPABLE_AREA_TYPE,Ft as Destructible3DBehavior,jt as DestructibleMesh,nm as DollyPathSchema,Dn as EntityJsonSchema,Pn as EntitySchema,he as EntityThumbnailCache,Ie as EventEmitterDelegate,lm as EventItemSchema,Sp as FOG_TYPE,kt as FirstPersonBehavior,Bt as FirstPersonEvent,Ct as FirstPersonFSM,Bp as FirstPersonPerspective,Wt as FirstPersonPresentation,Mt as FirstPersonShooterCoordinator,Vt as FirstPersonState,kp as Fixed2DPerspective,c as Fn,Yt as FractureOptions,fi as Game,pr as GameBridge,Kn as GameConfigJsonSchema,Jn as GameDeviceConfigJsonSchema,Vn as GameInputConfigSchema,Mn as GameInputPlayerConfigSchema,y as HOVER_AREA_TYPE,om as Howl,Ni as InstrumentDefinitionSchema,zi as InstrumentEffectSchema,Yi as InstrumentPresetSchema,Cp as IsometricPerspective,zt as Jumper2DBehavior,Nt as Jumper2DEvent,qt as Jumper2DFSM,It as Jumper2DState,Jt as Jumper3DBehavior,Kt as Jumper3DEvent,Qt as Jumper3DFSM,Ut as Jumper3DState,un as KeyboardMappingSchema,gt as LIGHT_TYPE,ai as LINE_TYPE,Tn as LineEntityDataSchema,Cn as MouseConfigSchema,wn as MouseMappingSchema,Xt as MultidirectionalSpaceShooterCoordinator,Ji as NoteClipSchema,hi as PARTICLE_SYSTEM_TYPE,it as PILL_TYPE,ct as PLANE_TYPE,et as PYRAMID_TYPE,$t as ParticleEmitterBehavior,_p as Perspectives,eo as Platformer2DBehavior,ro as Platformer2DEvent,to as Platformer2DFSM,oo as Platformer2DState,ao as Platformer3DBehavior,po as Platformer3DEvent,io as Platformer3DFSM,mo as Platformer3DState,Tt as RECT_TYPE,wi as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,Gi as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,Hi as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,_i as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,Fi as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,ji as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,Rp as RenderBundleManager,Pp as RenderStrategyManager,In as ResolutionInputSchema,no as Ricochet2DBehavior,fo as Ricochet2DEvent,xo as Ricochet2DFSM,lo as Ricochet2DState,so as Ricochet3DBehavior,co as Ricochet3DEvent,yo as Ricochet3DFSM,vo as Ricochet3DState,bi as RuntimeBoundary2DBehavior,Ti as RuntimeDynamicCircleBody2DBehavior,Zi as RuntimeGoalZone2DBehavior,Di as RuntimePlayerInput2DBehavior,gi as RuntimeRicochet2DBehavior,ui as RuntimeTriggerRegion2DBehavior,vt as SELECTION_BOUNDS_MARGIN,Et as SELECTION_THIN_AXIS_FRACTION,At as SELECTION_THIN_AXIS_MAX,St as SELECTION_THIN_AXIS_MIN,Jr as SPHERE_TYPE,ri as SPRITE_TYPE,ci as STAGE_STATE_CHANGE,am as SceneTransitionSchema,Eo as ScreenVisibilityBehavior,So as ScreenVisibilityFSM,Ao as ScreenWrapBehavior,ho as ScreenWrapEvent,Ro as ScreenWrapFSM,Po as ScreenWrapState,Vp as SecondPersonPerspective,Lo as Shooter2DBehavior,Ep as SimulationBody,Qi as SongClipSchema,$i as SongDefinitionSchema,Xi as SongLoopSchema,qi as SongNoteSchema,Ii as SongTrackSchema,Zn as SpriteEntityDataSchema,Nn as StageAssetLoaderConfigSchema,dn as StageBodyKind,yn as StageBoundaryDim,qn as StageConfigJsonSchema,vn as StageEventType,zn as StageGLTFAssetLoaderConfigSchema,gn as StageJsonSchema,Up as StageManager,En as StageRicochetDim,Sn as StageRicochetReflection,Ln as StageSchema,An as StageTopDownPlane,Xp as TEXT_TYPE,U as TRANSFORM_TOOLS,On as TextEntityDataSchema,jp as ThirdPersonPerspective,Oo as ThrusterBehavior,bo as ThrusterEvent,To as ThrusterFSM,Zo as ThrusterState,Ui as TimeSignatureSchema,Do as TopDownMovementBehavior,Mp as TopDownPerspective,go as TopDownShooterCoordinator,up as TransformGizmo,mr as VEC2_ONE,ir as VEC2_ZERO,fr as VEC3_ONE,nr as VEC3_ZERO,Yn as Vec3ComponentsSchema,Rn as Vector2Schema,bn as Vector3TupleSchema,_n as VirtualTouchButtonConfigSchema,jn as VirtualTouchButtonsConfigSchema,Bn as VirtualTouchConfigSchema,Fn as VirtualTouchJoystickConfigSchema,kn as VirtualTouchJoysticksConfigSchema,Hn as VirtualTouchPositionSchema,Gn as VirtualTouchStyleSchema,uo as WorldBoundary2DBehavior,wo as WorldBoundary2DEvent,Go as WorldBoundary2DFSM,Ho as WorldBoundary2DState,_o as WorldBoundary3DBehavior,Fo as WorldBoundary3DEvent,jo as WorldBoundary3DFSM,ko as WorldBoundary3DState,Lt as ZONE_TYPE,yp as ZylemActor,qr as ZylemBox,Xr as ZylemCone,at as ZylemCylinder,lt as ZylemDisk,S as ZylemDroppableArea,Ap as ZylemFog,on as ZylemGameElement,E as ZylemHoverArea,ut as ZylemLight,ii as ZylemLine,Ri as ZylemParticleSystem,mt as ZylemPill,dt as ZylemPlane,rt as ZylemPyramid,Zt as ZylemRect,Kr as ZylemSphere,ti as ZylemSprite,$p as ZylemText,Ot as ZylemZone,G as abs,ka as activeShot,en as announceBridgeReady,o as applyEntityGlow,rn as applySwatchesToSelection,Ip as applyTransformChanges,w as asin,u as atan,tp as audibleTrackIds,Ia as beatsPerBar,Ka as beatsToSeconds,ki as bindRuntimeDynamicCircleBody2DHandle,ur as boxCollision,Cr as boxMesh,pn as buildBoxCollider,nn as buildCapsuleCollider,xn as buildConvexHullCollider,fn as buildCylinderCollider,sn as buildHeightfieldCollider,an as buildRuntimeBody,mn as buildSphereCollider,ln as buildTrimeshCollider,cn as bundleRuntimeCollision,Om as callFunc,za as cameraTracks,Z as clamp,Q as clearGlobalSubscriptions,ap as clipsAt,Dp as closestAxisValue,Bo as computeWorldBoundary2DHits,Co as computeWorldBoundary3DHits,Gr as coneCollision,Vr as coneMesh,g as cos,Br as create,vp as createActor,R as createBackgroundShader,Ir as createBox,Np as createCamera,$r as createCone,Li as createCooldownIcon,qa as createCutscenePlayer,pt as createCylinder,st as createDisk,h as createDroppableArea,ft as createEntity,ni as createEntityFactory,t as createEntityGlowMaterial,Mo as createFirstPersonInputComponent,Vo as createFirstPersonMovementComponent,Wo as createFirstPersonStateComponent,hp as createFog,vi as createFollowTarget,xi as createGame,N as createGlobal,A as createHoverArea,pp as createInstrument,Yo as createJumpConfig2D,zo as createJumpConfig3D,No as createJumpInput2D,qo as createJumpInput3D,Io as createJumpState2D,Jo as createJumpState3D,wt as createLight,mi as createLine,i as createNodeMaterialFromTSL,Pi as createParticleSystem,Wp as createPerspective,Ko as createPhysicsBodyComponent,nt as createPill,yt as createPlane,Ei as createPlatformFollow,Qo as createPlatformer2DInputComponent,Uo as createPlatformer2DMovementComponent,Xo as createPlatformer2DStateComponent,$o as createPlatformer3DInputComponent,ea as createPlatformer3DMovementComponent,ra as createPlatformer3DStateComponent,tt as createPyramid,Dt as createRect,ta as createShooter2DStateComponent,hn as createSimulation,fp as createSongPlayer,Qr as createSphere,oi as createSprite,Kp as createStage,sp as createStageCutsceneHost,Si as createStrategyPan,ei as createText,oa as createThrusterInputComponent,aa as createThrusterMovementComponent,pa as createThrusterStateComponent,ia as createTopDownMovementComponent,ma as createTopDownMovementInputComponent,na as createTopDownMovementStateComponent,fa as createTransformComponent,Hm as createTransformStore,Op as createVariable,bt as createZone,Ta as crossfadeTransitionShader,Na as cutsceneLength,_r as cylinderCollision,Yr as cylinderMesh,ep as dbToGain,ee as debugState,Ne as defaultTouchControls,xa as defineBehavior,or as degreesToRadians,Lm as delay,Oi as destroy,yi as dispatchStageState,Ca as dollyPointAt,M as dot,Ga as easeValue,Bi as emitRuntimeGoal,Ci as emitRuntimeRicochet,Mi as emitRuntimeTriggerRegionEnter,rm as encodeWav,tm as encodeWavBlob,mp as ensureAudio,d as entityRepresentative,si as entitySpawner,Re as entityThumbnailCache,Xe as eulerToQuaternion,Va as evaluateCameraPose,Wa as evaluateCutscene,H as exp,bm as fadeOpacity,la as fireCooldown,sa as fireShooter2DIfRequested,s as float,B as floor,Qe as focusEntity,C as fract,rp as gainToDb,qe as gameConfig,wp as getActiveLevelDocument,xp as getActiveSongPlayer,ca as getCooldown,da as getCooldownStore,je as getDisplayAspect,ya as getEntityFacingAngle2D,q as getGlobal,K as getGlobals,Se as getHoveredEntity,ye as getHoveredEntityId,Wm as getPosition,ke as getPresetResolution,Dr as getRotation,Ee as getSelectedEntity,me as getSelectedEntityId,fe as getSelectedEntityIds,le as getSnapSettings,bp as getVariable,Ym as getVelocity,$m as getZylemBridge,ym as globalChange,vm as globalChanges,va as hasAnyWorldBoundary2DHit,Ea as hasAnyWorldBoundary3DHit,di as initStageStateDispatcher,gp as intersectPlane,np as isAudioReady,p as isGLSLShader,ga as isManagedRenderEntity,ie as isPickMode,a as isTSLShader,X as isTransformTool,_e as isWebGPUSupported,Ya as itemsBetween,We as joystickBaseSvg,Ye as joystickThumbSvg,V as length,_a as lerpPose,Ha as lerpVec3,ip as loadTone,j as max,Rt as measureObjectSelectionBounds,He as mergeInputConfigs,Xa as midiToFrequency,$a as midiToNoteName,k as min,b as mix,Y as mod,_m as move,hm as moveBy,Vm as moveForwardXY,Rm as moveTo,Fm as moveX,Bm as moveXY,Cm as moveXZ,jm as moveY,km as moveZ,O as normalize,xr as normalizeVec2,lr as normalizeVec3,e as objectVertexShader,I as onGlobalChange,J as onGlobalChanges,Zm as onPress,Dm as onRelease,Tp as onVariableChange,Zp as onVariableChanges,gr as packCollisionGroups,ht as padSelectionBounds,um as parallel,Be as parseResolution,Sa as particleEffect,Aa as particlePresets,pi as pickZylemLine,Fr as pillCollision,zr as pillMesh,Wi as pingPongBeep,jr as planeCollision,L as positionWorld,P as positionWorldDirection,_ as pow,Ba as previousShot,Hr as pyramidCollision,Wr as pyramidMesh,$e as quaternionToEuler,ar as radiansToDegrees,ha as registerCooldown,re as registerDebugEntityResolver,Ke as registerEntityFocusContext,em as renderSong,wm as repeat,Gm as repeatForever,Ra as resetCooldown,Am as resetEntityOpacity,Mm as resetVelocity,Pa as resolveAim2D,Ve as resolveButtonAccent,te as resolveDebugEntity,Za as resolveRenderCategory,Pt as resolveSelectionBounds,Me as resolveTouchTheme,Vi as ricochetSound,Pm as rotateBy,vr as rotateEuler,dr as rotateInDirection,Sr as rotateX,Er as rotateY,yr as rotateYEuler,Ar as rotateZ,Ma as sampleDollyPath,Fa as sceneAt,op as scheduleSong,Xm as screenCenterLookDeltas,Um as screenCenterLookTargets,Qa as secondsToBeats,gm as sequence,de as setAddType,Ai as setCameraFeed,lp as setCutsceneTransitionShaders,ae as setDebugTool,z as setGlobal,ce as setGridVisible,ve as setHoveredEntityId,oe as setPaused,pe as setPickMode,zm as setPosition,Nm as setPositionX,qm as setPositionY,Im as setPositionZ,Tr as setRotation,Zr as setRotationDegrees,Lr as setRotationDegreesX,Rr as setRotationDegreesY,br as setRotationDegreesZ,Pr as setRotationX,hr as setRotationY,Or as setRotationZ,Ae as setSelectedEntity,ne as setSelectedEntityId,xe as setSelectedEntityIds,se as setSnapSettings,Hp as setStageFrameProfilerEnabled,Lp as setVariable,Qm as shortestAngleDelta,ja as shotAt,D as sin,T as smoothstep,tr as snapScale,er as snapToIncrement,rr as snapVec3,Ja as songLengthBeats,Ua as songLengthSeconds,wr as sphereCollision,Mr as sphereMesh,qp as stageConfig,Qp as stageState,r as standardShader,F as step,Ue as streamLevel,li as streamLevelOnStage,Tm as throttle,La as tickCooldowns,f as time,sr as toThreeVector2,cr as toThreeVector3,ze as touchButtonSvg,Ce as touchThemes,m as uniform,Oa as updateBoundaryRicochet,Pe as useArrowsForAxes,Oe as useArrowsForDirections,Le as useArrowsForSecondaryAxes,ba as useBehavior,Ze as useIJKLForAxes,De as useIJKLForDirections,we as useMouse,ge as useMouseLook,ue as useScreenCenterLook,Ge as useVirtualControls,Te as useWASDForAxes,be as useWASDForDirections,Da as usesManagedRenderPath,n as uv,Em as variableChange,Sm as variableChanges,W as vec2,x as vec3,l as vec4,Jp as vessel,Km as wrapAround3D,Jm as wrapAroundXY,kr as zoneCollision,Je as zylemEventBus};
@@ -0,0 +1 @@
1
+ import{a as l,b as d}from"./chunk-GQXYD2JG.js";import{b as y,c as g}from"./chunk-5WRFDAZN.js";import{a as S}from"./chunk-2NO4YCLR.js";import{h as u,i as a,j as f,k as m}from"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";var p="zylem-decoded.spz";async function R(o=D){try{return await o()}catch(e){throw new Error(g,{cause:e})}}async function D(){return import("@playcanvas/splat-transform")}function h(){return R()}function P(o){if(a(o)==="lod-meta.json")throw new Error(y)}async function F(o,e,t){let c=o.createChunkDataPool(),r=(await o.readFile({filename:e,inputFormat:"sog",fileSystem:t}))[0];if(!r)throw new Error(`SOG file ${e} did not contain a splat scene.`);let n=new o.MemoryFileSystem;try{await o.writeSource({filename:p,outputFormat:"spz",source:r,pool:c,options:{}},n)}finally{await r.close?.()}let s=n.results.get(p);if(!s)throw new Error("SOG decoder did not produce an SPZ buffer.");return s}async function O(o,e,t,c){let i=new o.MemoryReadFileSystem;i.set?.(t,e);let r=await F(o,t,i),n=await d("spz",r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength));return l(n,c)}async function b(o,e,t){P(e),t?.onProgress?.(0);let i=m(e)==="sog"?await O(o,await S(e,t),a(e)||"model.sog",t):await(async()=>{let r=a(e),n=new o.UrlReadFileSystem(f(e)),s=await F(o,r,n),M=await d("spz",s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));return l(M,t)})();return t?.onProgress?.(1),i}var w=class{decoderPromise=null;decoder(){return this.decoderPromise??=h(),this.decoderPromise}isSupported(e){return m(e)==="sog"||a(e)==="meta.json"}async load(e,t){return P(e),b(await this.decoder(),e,t)}clone(e){return{object:u(e.object),animations:[]}}};export{w as SogLoaderAdapter,P as assertBundledSog,h as importSogDecoder,R as loadSogDecoder,O as modelFromSogBytes,b as modelFromSogUrl};
@@ -11,8 +11,7 @@ import { e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-D3
11
11
  import { StageEvents } from './events.js';
12
12
  import { G as GameInputConfig } from './game-interfaces-vF5sRi1n.js';
13
13
  import { A as ArmPlacementOptions, P as PlacementSession } from './placement-session-BNQoL7Jb.js';
14
- import { SwatchApplyResult, SceneOperationEntry, EntityApplySwatchPayload, SceneOperationPayload } from '@zylem/bridge';
15
- import { a as LevelSyncPayload, L as LevelDocument } from './level-types-D10LiOcn.js';
14
+ import { SwatchApplyResult, SceneOperationEntry, LevelSyncPayload, LevelDocument, EntityApplySwatchPayload, SceneOperationPayload } from '@zylem/bridge';
16
15
  import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, BehaviorRef } from '@zylem/behaviors/core';
17
16
  import { d as GizmoRay } from './transform-gizmo-DappLQ9w.js';
18
17
 
@@ -21,7 +20,7 @@ import { d as GizmoRay } from './transform-gizmo-DappLQ9w.js';
21
20
  *
22
21
  * `GameBridge.connect()` runs for every game, so it is not the signal. The
23
22
  * bridge marks the session attached when an editor subscribes, and every live
24
- * camera manager creates or destroys its four view cameras from that flag.
23
+ * camera manager creates or destroys its view cameras from that flag.
25
24
  */
26
25
  interface EditorCameraHost {
27
26
  ensureEditorCameras(): Promise<void>;
@@ -37,7 +36,7 @@ interface EditorCameraHost {
37
36
  * Responsibilities:
38
37
  * - Named camera registry (add/remove/get by name or reference)
39
38
  * - Active camera list management (determines which cameras render)
40
- * - Editor view cameras (side, top, isometric, free), created only while an editor is attached
39
+ * - Editor view cameras, created only while an editor is attached
41
40
  * - Per-frame update of all active cameras' perspective controllers
42
41
  * - Coordinating rendering via RendererManager for all active viewports
43
42
  */
@@ -83,11 +82,11 @@ declare class CameraManager implements EditorCameraHost {
83
82
  * Get the primary active camera (first in the active list).
84
83
  */
85
84
  get primaryCamera(): ZylemCamera | null;
86
- /** True while side, top, isometric, or free is the main view. */
85
+ /** True while an editor view is the main camera. */
87
86
  isEditorViewActive(): boolean;
88
87
  /** Id of the editor view that is currently the main camera, if one is. */
89
88
  activeEditorCameraId(): string | null;
90
- /** True after the four editor views have been created. */
89
+ /** True after the editor views have been created. */
91
90
  hasEditorCameras(): boolean;
92
91
  /**
93
92
  * World boxes used the first time side, top, or isometric is shown.
@@ -145,13 +144,13 @@ declare class CameraManager implements EditorCameraHost {
145
144
  */
146
145
  setup(scene: Scene, rendererManager: RendererManager): Promise<void>;
147
146
  /**
148
- * Create side, top, isometric, and free cameras seeded from the current
149
- * game camera. Does not change which camera is rendering.
147
+ * Create the editor view cameras seeded from the current game camera.
148
+ * Does not change which camera is rendering.
150
149
  */
151
150
  ensureEditorCameras(): Promise<void>;
152
151
  /**
153
152
  * Restore the game camera when an editor view is showing, then destroy
154
- * the four editor cameras.
153
+ * the editor cameras.
155
154
  */
156
155
  destroyEditorCameras(): void;
157
156
  /**
@@ -1029,6 +1028,8 @@ declare class StageDebugDelegate {
1029
1028
  private syncWithDebugState;
1030
1029
  /** Hand the transform tool its mode whenever the active tool changes. */
1031
1030
  private syncToolMode;
1031
+ /** The entity gizmo stands down while a level is edited; the level session runs its own. */
1032
+ private syncTransformTool;
1032
1033
  private syncGrid;
1033
1034
  /** Initialize DOM listeners. The rendering camera stays whatever the editor selected. */
1034
1035
  private activate;
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-2NO4YCLR.js";import{h as i,j as s,k as n}from"./chunk-T6O2SGH5.js";import"./chunk-WOT6VMZA.js";var c=new Set(["usd","usda","usdc","usdz"]),d=class{loaderPromise=null;loader(){return this.loaderPromise??=import("three/addons/loaders/USDLoader.js").then(o=>new o.USDLoader),this.loaderPromise}isSupported(o){let e=n(o);return e!==null&&c.has(e)}async load(o,e){let l=await a(o,e),m=await this.loader(),t=await new Promise((p,r)=>{try{m.parse(l,s(o),p,r)}catch(u){r(u)}});return{object:t,animations:t.animations??[]}}clone(o){return{object:i(o.object),animations:o.animations?.map(e=>e.clone())}}};export{d as USDLoaderAdapter};
@@ -1,11 +1,11 @@
1
- import { G as Game, D as DeviceProfile } from './game-CmkhPP-9.js';
2
- import { v as DebugTools } from './debug-state-BgX5Q0Ff.js';
1
+ import { G as Game, D as DeviceProfile } from './game-uQd7k6-m.js';
2
+ import { v as DebugTools } from './debug-state-JRneI6c2.js';
3
3
  import './base-node-life-cycle-BK9xebT9.js';
4
4
  import 'three';
5
5
  import './stage-transition-CmGpV4tc.js';
6
6
  import './game-interfaces-vF5sRi1n.js';
7
7
  import './base-node-idopiSw5.js';
8
- import './stage-CCGJh9TD.js';
8
+ import './stage-Dez16Gxm.js';
9
9
  import './entity-type-map-BMaPY8cd.js';
10
10
  import './entity-CY75JJSw.js';
11
11
  import '@zylem/behaviors/core';
@@ -23,7 +23,6 @@ import 'three/addons/lines/webgpu/Line2.js';
23
23
  import './zylem-camera-BA3VPFlS.js';
24
24
  import './placement-session-BNQoL7Jb.js';
25
25
  import '@zylem/bridge';
26
- import './level-types-D10LiOcn.js';
27
26
  import './transform-gizmo-DappLQ9w.js';
28
27
  import './default-controls-CAKJ5zlo.js';
29
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zylem/game-lib",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "type": "module",
5
5
  "description": "A powerful and easy-to-use framework for creating simple 3D digital interactive applications using TypeScript.",
6
6
  "license": "MIT",
@@ -255,8 +255,8 @@
255
255
  "@dgreenheck/three-pinata": "^2.0.1",
256
256
  "@sinclair/typebox": "^0.34.52",
257
257
  "@types/howler": "^2.2.13",
258
- "@zylem/behaviors": "^0.8.12",
259
- "@zylem/bridge": "^0.9.7",
258
+ "@zylem/behaviors": "^0.8.13",
259
+ "@zylem/bridge": "^0.9.9",
260
260
  "comlink": "^4.4.2",
261
261
  "howler": "^2.2.4",
262
262
  "idb-keyval": "^6.2.6",
@@ -268,6 +268,9 @@
268
268
  "typescript-fsm": "^1.6.0",
269
269
  "valtio": "^2.1.8"
270
270
  },
271
+ "optionalDependencies": {
272
+ "@playcanvas/splat-transform": "3.10.3"
273
+ },
271
274
  "peerDependencies": {
272
275
  "howler": "^2.2.4",
273
276
  "nanoid": "^5.1.5",