ecspresso 0.14.3 → 0.14.4

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.
@@ -1,4 +1,4 @@
1
- var Z=Object.defineProperty;var C=(F)=>F;function I(F,J){this[F]=C.bind(null,J)}var o=(F,J)=>{for(var K in J)Z(F,K,{get:J[K],enumerable:!0,configurable:!0,set:I.bind(J,K)})};var z=(F,J)=>()=>(F&&(J=F(F=0)),J);var f=((F)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(J,K)=>(typeof require<"u"?require:J)[K]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')});import{definePlugin as D}from"ecspresso";function H(F,J,K){return F*73856093^J*19349663^K*83492791}function S(F){return{cellSize:F,invCellSize:1/F,cells:new Map,entries:new Map,_entriesPrev:new Map}}function X(F){F._entriesPrev.clear();let J=F.entries;F.entries=F._entriesPrev,F._entriesPrev=J;for(let K of F.cells.values())K.length=0}function Y(F,J,K,O,L,U,$,A){let N=F._entriesPrev.get(J);if(N)F._entriesPrev.delete(J),N.x=K,N.y=O,N.z=L,N.halfW=U,N.halfH=$,N.halfD=A,F.entries.set(J,N);else F.entries.set(J,{entityId:J,x:K,y:O,z:L,halfW:U,halfH:$,halfD:A});let M=F.invCellSize,w=Math.floor((K-U)*M),q=Math.floor((K+U)*M),P=Math.floor((O-$)*M),B=Math.floor((O+$)*M),j=Math.floor((L-A)*M),V=Math.floor((L+A)*M);for(let T=w;T<=q;T++)for(let E=P;E<=B;E++)for(let G=j;G<=V;G++){let R=H(T,E,G),k=F.cells.get(R);if(k)k.push(J);else F.cells.set(R,[J])}}function W(F,J,K,O,L,U,$,A){let N=F.invCellSize,M=Math.floor(J*N),w=Math.floor(L*N),q=Math.floor(K*N),P=Math.floor(U*N),B=Math.floor(O*N),j=Math.floor($*N);for(let V=M;V<=w;V++)for(let T=q;T<=P;T++)for(let E=B;E<=j;E++){let G=F.cells.get(H(V,T,E));if(!G)continue;for(let R of G)A.add(R)}}var b=new Set;function v(F,J,K,O,L,U){let $=b;$.clear(),W(F,J-L,K-L,O-L,J+L,K+L,O+L,$);let A=L*L;for(let N of $){let M=F.entries.get(N);if(!M)continue;let w=Math.max(M.x-M.halfW,Math.min(J,M.x+M.halfW)),q=Math.max(M.y-M.halfH,Math.min(K,M.y+M.halfH)),P=Math.max(M.z-M.halfD,Math.min(O,M.z+M.halfD)),B=J-w,j=K-q,V=O-P;if(B*B+j*j+V*V<=A)U.add(N)}}var _=new Set;function p(F){return{grid:F,queryBox(J,K,O,L,U,$){return _.clear(),W(F,J,K,O,L,U,$,_),Array.from(_)},queryBoxInto(J,K,O,L,U,$,A){W(F,J,K,O,L,U,$,A)},queryRadius(J,K,O,L){return _.clear(),v(F,J,K,O,L,_),Array.from(_)},queryRadiusInto(J,K,O,L,U){v(F,J,K,O,L,U)},getEntry(J){return F.entries.get(J)}}}function u(F){let{cellSize:J=64,systemGroup:K="spatialIndex3D",priority:O=2000,phases:L=["fixedUpdate","postUpdate"]}=F??{},U=S(J),$=p(U);return D("spatialIndex3D").withComponentTypes().withResourceTypes().withLabels().withGroups().install((A)=>{A.addResource("spatialIndex3D",$);for(let N of L){let M=N==="fixedUpdate"?"localTransform3D":"worldTransform3D";A.addSystem(`spatial-index3D-rebuild-${N}`).setPriority(O).inPhase(N).inGroup(K).addQuery("transforms",{with:[M]}).runWhenEmpty().setProcess(({queries:w,ecs:q})=>{X(U);for(let P of w.transforms){let B=P.components[M],j=q.getComponent(P.id,"aabb3DCollider"),V=q.getComponent(P.id,"sphereCollider");if(!j&&!V)continue;let{x:T,y:E,z:G}=B,R=0,k=0,Q=0;if(j)T+=j.offsetX??0,E+=j.offsetY??0,G+=j.offsetZ??0,R=j.width/2,k=j.height/2,Q=j.depth/2;if(V)T+=V.offsetX??0,E+=V.offsetY??0,G+=V.offsetZ??0,R=Math.max(R,V.radius),k=Math.max(k,V.radius),Q=Math.max(Q,V.radius);Y(U,P.id,T,E,G,R,k,Q)}})}})}export{u as createSpatialIndex3DPlugin};
1
+ var Y=Object.defineProperty;var Z=(F)=>F;function C(F,J){this[F]=Z.bind(null,J)}var p=(F,J)=>{for(var K in J)Y(F,K,{get:J[K],enumerable:!0,configurable:!0,set:C.bind(J,K)})};var z=(F,J)=>()=>(F&&(J=F(F=0)),J);var f=((F)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(J,K)=>(typeof require<"u"?require:J)[K]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')});import{definePlugin as D}from"ecspresso";function v(F,J,K){return F*73856093^J*19349663^K*83492791}function S(F){return{cellSize:F,invCellSize:1/F,cells:new Map,entries:new Map,_entriesPrev:new Map}}function X(F){F._entriesPrev.clear();let J=F.entries;F.entries=F._entriesPrev,F._entriesPrev=J;for(let K of F.cells.values())K.length=0}function W(F,J,K,O,L,U,V,T){let N=F._entriesPrev.get(J);if(N)F._entriesPrev.delete(J),N.x=K,N.y=O,N.z=L,N.halfW=U,N.halfH=V,N.halfD=T,F.entries.set(J,N);else F.entries.set(J,{entityId:J,x:K,y:O,z:L,halfW:U,halfH:V,halfD:T});let M=F.invCellSize,R=Math.floor((K-U)*M),G=Math.floor((K+U)*M),A=Math.floor((O-V)*M),P=Math.floor((O+V)*M),$=Math.floor((L-T)*M),j=Math.floor((L+T)*M);for(let E=R;E<=G;E++)for(let q=A;q<=P;q++)for(let B=$;B<=j;B++){let _=v(E,q,B),Q=F.cells.get(_);if(Q)Q.push(J);else F.cells.set(_,[J])}}function w(F,J,K,O,L,U,V,T){let N=F.invCellSize,M=Math.floor(J*N),R=Math.floor(L*N),G=Math.floor(K*N),A=Math.floor(U*N),P=Math.floor(O*N),$=Math.floor(V*N);for(let j=M;j<=R;j++)for(let E=G;E<=A;E++)for(let q=P;q<=$;q++){let B=F.cells.get(v(j,E,q));if(!B)continue;for(let _ of B)T.add(_)}}var I=new Set;function H(F,J,K,O,L,U){let V=I;V.clear(),w(F,J-L,K-L,O-L,J+L,K+L,O+L,V);let T=L*L;for(let N of V){let M=F.entries.get(N);if(!M)continue;let R=Math.max(M.x-M.halfW,Math.min(J,M.x+M.halfW)),G=Math.max(M.y-M.halfH,Math.min(K,M.y+M.halfH)),A=Math.max(M.z-M.halfD,Math.min(O,M.z+M.halfD)),P=J-R,$=K-G,j=O-A;if(P*P+$*$+j*j<=T)U.add(N)}}var k=new Set;function b(F){return{grid:F,queryBox(J,K,O,L,U,V){return k.clear(),w(F,J,K,O,L,U,V,k),Array.from(k)},queryBoxInto(J,K,O,L,U,V,T){w(F,J,K,O,L,U,V,T)},queryRadius(J,K,O,L){return k.clear(),H(F,J,K,O,L,k),Array.from(k)},queryRadiusInto(J,K,O,L,U){H(F,J,K,O,L,U)},getEntry(J){return F.entries.get(J)}}}function m(F){let{cellSize:J=64,systemGroup:K="spatialIndex3D",priority:O=2000,phases:L=["fixedUpdate","postUpdate"]}=F??{},U=S(J),V=b(U);return D("spatialIndex3D").withComponentTypes().withResourceTypes().withLabels().withGroups().install((T)=>{T.addResource("spatialIndex3D",V);for(let N of L){let M=N==="fixedUpdate"?"localTransform3D":"worldTransform3D";T.addSystem(`spatial-index3D-rebuild-${N}`).setPriority(O).inPhase(N).inGroup(K).addQuery("transforms",{with:[M]}).runWhenEmpty().setProcess(({queries:R,ecs:G})=>{X(U);for(let A of R.transforms){let P=A.components[M],$=G.getComponent(A.id,"aabb3DCollider"),j=$?void 0:G.getComponent(A.id,"sphereCollider");if($){W(U,A.id,P.x+($.offsetX??0),P.y+($.offsetY??0),P.z+($.offsetZ??0),$.width/2,$.height/2,$.depth/2);continue}if(j){let E=j.radius;W(U,A.id,P.x+(j.offsetX??0),P.y+(j.offsetY??0),P.z+(j.offsetZ??0),E,E,E)}}})}})}export{m as createSpatialIndex3DPlugin};
2
2
 
3
- //# debugId=4E5DD9CFEEA2159364756E2164756E21
3
+ //# debugId=304FFB5B6DD5D73864756E2164756E21
4
4
  //# sourceMappingURL=spatial-index3D.js.map
@@ -2,10 +2,10 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/plugins/spatial/spatial-index3D.ts", "../src/utils/spatial-hash3D.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * Spatial Index 3D Plugin for ECSpresso\n *\n * Provides a uniform-grid spatial hash for broadphase collision detection\n * and proximity queries in 3D. Rebuilds the grid each frame from entity\n * transforms. Replaces O(n²) brute-force with O(n·d) where d = local density.\n *\n * Standalone usage: queryBox / queryRadius for proximity queries.\n * Automatic acceleration: collision3D and physics3D plugins detect the\n * spatialIndex3D resource at runtime and use it for broadphase when present.\n */\n\nimport { definePlugin } from 'ecspresso';\nimport type { SystemPhase } from 'ecspresso';\nimport type { Transform3DComponentTypes } from './transform3D';\nimport {\n\ttype SpatialEntry3D,\n\ttype SpatialHashGrid3D,\n\ttype SpatialIndex3D,\n\tcreateGrid3D,\n\tclearGrid3D,\n\tinsertEntity3D,\n\tgridQueryBox3D,\n\tgridQueryRadius3D,\n} from '../../utils/spatial-hash3D';\n\n// Module-scoped reusable set to reduce GC pressure\nconst _reusableQuerySet = new Set<number>();\n\n// ==================== Collider Component Types ====================\n\n/**\n * 3D axis-aligned bounding box collider component.\n * Defined here (spatial layer) so collision3D can import rather than redefine.\n */\nexport interface AABB3DCollider {\n\twidth: number;\n\theight: number;\n\tdepth: number;\n\toffsetX?: number;\n\toffsetY?: number;\n\toffsetZ?: number;\n}\n\n/**\n * Sphere collider component.\n * Defined here (spatial layer) so collision3D can import rather than redefine.\n */\nexport interface SphereCollider {\n\tradius: number;\n\toffsetX?: number;\n\toffsetY?: number;\n\toffsetZ?: number;\n}\n\nexport interface Spatial3DColliderComponentTypes {\n\taabb3DCollider: AABB3DCollider;\n\tsphereCollider: SphereCollider;\n}\n\n// ==================== Resource API ====================\n\nexport interface SpatialIndex3DResourceTypes {\n\tspatialIndex3D: SpatialIndex3D;\n}\n\nfunction createSpatialIndex3DResource(grid: SpatialHashGrid3D): SpatialIndex3D {\n\treturn {\n\t\tgrid,\n\t\tqueryBox(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): number[] {\n\t\t\t_reusableQuerySet.clear();\n\t\t\tgridQueryBox3D(grid, minX, minY, minZ, maxX, maxY, maxZ, _reusableQuerySet);\n\t\t\treturn Array.from(_reusableQuerySet);\n\t\t},\n\t\tqueryBoxInto(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, result: Set<number>): void {\n\t\t\tgridQueryBox3D(grid, minX, minY, minZ, maxX, maxY, maxZ, result);\n\t\t},\n\t\tqueryRadius(cx: number, cy: number, cz: number, radius: number): number[] {\n\t\t\t_reusableQuerySet.clear();\n\t\t\tgridQueryRadius3D(grid, cx, cy, cz, radius, _reusableQuerySet);\n\t\t\treturn Array.from(_reusableQuerySet);\n\t\t},\n\t\tqueryRadiusInto(cx: number, cy: number, cz: number, radius: number, result: Set<number>): void {\n\t\t\tgridQueryRadius3D(grid, cx, cy, cz, radius, result);\n\t\t},\n\t\tgetEntry(entityId: number): SpatialEntry3D | undefined {\n\t\t\treturn grid.entries.get(entityId);\n\t\t},\n\t};\n}\n\n// ==================== Component Types ====================\n\ntype SpatialIndex3DComponentTypes = Transform3DComponentTypes & Spatial3DColliderComponentTypes;\n\n// ==================== Plugin Options ====================\n\nexport type SpatialIndex3DPhase = 'fixedUpdate' | 'postUpdate';\ntype SpatialIndex3DLabel = `spatial-index3D-rebuild-${SpatialIndex3DPhase}`;\n\nexport interface SpatialIndex3DPluginOptions<G extends string = 'spatialIndex3D'> {\n\t/** Cell size for the spatial hash grid (default: 64) */\n\tcellSize?: number;\n\t/** System group name (default: 'spatialIndex3D') */\n\tsystemGroup?: G;\n\t/** Priority for rebuild systems (default: 2000, before collision) */\n\tpriority?: number;\n\t/** Phases to register rebuild systems in (default: ['fixedUpdate', 'postUpdate']) */\n\tphases?: ReadonlyArray<SpatialIndex3DPhase>;\n}\n\n// ==================== Plugin Factory ====================\n\n/**\n * Create a 3D spatial index plugin for ECSpresso.\n *\n * Provides a uniform-grid spatial hash that accelerates 3D collision detection.\n * When installed alongside the collision3D or physics3D plugins, they\n * automatically use the spatial index for broadphase instead of O(n²)\n * brute-force.\n *\n * Also provides proximity query methods for game logic (e.g. \"find all\n * enemies within 200 units\").\n *\n * @example\n * ```typescript\n * const ecs = ECSpresso.create()\n * .withPlugin(createTransform3DPlugin())\n * .withPlugin(createCollision3DPlugin({ layers }))\n * .withPlugin(createSpatialIndex3DPlugin({ cellSize: 128 }))\n * .build();\n *\n * // Proximity query in a system:\n * const si = ecs.getResource('spatialIndex3D');\n * const nearby = si.queryRadius(playerX, playerY, playerZ, 200);\n * ```\n */\nexport function createSpatialIndex3DPlugin<G extends string = 'spatialIndex3D'>(\n\toptions?: SpatialIndex3DPluginOptions<G>,\n) {\n\tconst {\n\t\tcellSize = 64,\n\t\tsystemGroup = 'spatialIndex3D',\n\t\tpriority = 2000,\n\t\tphases = ['fixedUpdate', 'postUpdate'] as const,\n\t} = options ?? {};\n\n\tconst grid = createGrid3D(cellSize);\n\tconst resource = createSpatialIndex3DResource(grid);\n\n\treturn definePlugin('spatialIndex3D')\n\t\t.withComponentTypes<SpatialIndex3DComponentTypes>()\n\t\t.withResourceTypes<SpatialIndex3DResourceTypes>()\n\t\t.withLabels<SpatialIndex3DLabel>()\n\t\t.withGroups<G>()\n\t\t.install((world) => {\n\t\t\tworld.addResource('spatialIndex3D', resource);\n\n\t\t\t// Register a rebuild system for each requested phase\n\t\t\tfor (const phase of phases) {\n\t\t\t\tconst transformComponent = phase === 'fixedUpdate' ? 'localTransform3D' : 'worldTransform3D';\n\n\t\t\t\tworld\n\t\t\t\t\t.addSystem(`spatial-index3D-rebuild-${phase}`)\n\t\t\t\t\t.setPriority(priority)\n\t\t\t\t\t.inPhase(phase as SystemPhase)\n\t\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t\t.addQuery('transforms', {\n\t\t\t\t\t\twith: [transformComponent],\n\t\t\t\t\t})\n\t\t\t\t\t.runWhenEmpty()\n\t\t\t\t\t.setProcess(({ queries, ecs }) => {\n\t\t\t\t\t\tclearGrid3D(grid);\n\n\t\t\t\t\t\tfor (const entity of queries.transforms) {\n\t\t\t\t\t\t\tconst transform = entity.components[transformComponent];\n\t\t\t\t\t\t\tconst aabb = ecs.getComponent(entity.id, 'aabb3DCollider');\n\t\t\t\t\t\t\tconst sphere = ecs.getComponent(entity.id, 'sphereCollider');\n\n\t\t\t\t\t\t\t// Only insert entities that have a collider\n\t\t\t\t\t\t\tif (!aabb && !sphere) continue;\n\n\t\t\t\t\t\t\tlet x = transform.x;\n\t\t\t\t\t\t\tlet y = transform.y;\n\t\t\t\t\t\t\tlet z = transform.z;\n\t\t\t\t\t\t\tlet halfW = 0;\n\t\t\t\t\t\t\tlet halfH = 0;\n\t\t\t\t\t\t\tlet halfD = 0;\n\n\t\t\t\t\t\t\tif (aabb) {\n\t\t\t\t\t\t\t\tx += aabb.offsetX ?? 0;\n\t\t\t\t\t\t\t\ty += aabb.offsetY ?? 0;\n\t\t\t\t\t\t\t\tz += aabb.offsetZ ?? 0;\n\t\t\t\t\t\t\t\thalfW = aabb.width / 2;\n\t\t\t\t\t\t\t\thalfH = aabb.height / 2;\n\t\t\t\t\t\t\t\thalfD = aabb.depth / 2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (sphere) {\n\t\t\t\t\t\t\t\tx += sphere.offsetX ?? 0;\n\t\t\t\t\t\t\t\ty += sphere.offsetY ?? 0;\n\t\t\t\t\t\t\t\tz += sphere.offsetZ ?? 0;\n\t\t\t\t\t\t\t\t// Sphere: use radius as half-extent in all three dimensions\n\t\t\t\t\t\t\t\thalfW = Math.max(halfW, sphere.radius);\n\t\t\t\t\t\t\t\thalfH = Math.max(halfH, sphere.radius);\n\t\t\t\t\t\t\t\thalfD = Math.max(halfD, sphere.radius);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinsertEntity3D(grid, entity.id, x, y, z, halfW, halfH, halfD);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t});\n}\n",
5
+ "/**\n * Spatial Index 3D Plugin for ECSpresso\n *\n * Provides a uniform-grid spatial hash for broadphase collision detection\n * and proximity queries in 3D. Rebuilds the grid each frame from entity\n * transforms. Replaces O(n²) brute-force with O(n·d) where d = local density.\n *\n * Standalone usage: queryBox / queryRadius for proximity queries.\n * Automatic acceleration: collision3D and physics3D plugins detect the\n * spatialIndex3D resource at runtime and use it for broadphase when present.\n */\n\nimport { definePlugin } from 'ecspresso';\nimport type { SystemPhase } from 'ecspresso';\nimport type { Transform3DComponentTypes } from './transform3D';\nimport {\n\ttype SpatialEntry3D,\n\ttype SpatialHashGrid3D,\n\ttype SpatialIndex3D,\n\tcreateGrid3D,\n\tclearGrid3D,\n\tinsertEntity3D,\n\tgridQueryBox3D,\n\tgridQueryRadius3D,\n} from '../../utils/spatial-hash3D';\n\n// Module-scoped reusable set to reduce GC pressure\nconst _reusableQuerySet = new Set<number>();\n\n// ==================== Collider Component Types ====================\n\n/**\n * 3D axis-aligned bounding box collider component.\n * Defined here (spatial layer) so collision3D can import rather than redefine.\n */\nexport interface AABB3DCollider {\n\twidth: number;\n\theight: number;\n\tdepth: number;\n\toffsetX?: number;\n\toffsetY?: number;\n\toffsetZ?: number;\n}\n\n/**\n * Sphere collider component.\n * Defined here (spatial layer) so collision3D can import rather than redefine.\n */\nexport interface SphereCollider {\n\tradius: number;\n\toffsetX?: number;\n\toffsetY?: number;\n\toffsetZ?: number;\n}\n\nexport interface Spatial3DColliderComponentTypes {\n\taabb3DCollider: AABB3DCollider;\n\tsphereCollider: SphereCollider;\n}\n\n// ==================== Resource API ====================\n\nexport interface SpatialIndex3DResourceTypes {\n\tspatialIndex3D: SpatialIndex3D;\n}\n\nfunction createSpatialIndex3DResource(grid: SpatialHashGrid3D): SpatialIndex3D {\n\treturn {\n\t\tgrid,\n\t\tqueryBox(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): number[] {\n\t\t\t_reusableQuerySet.clear();\n\t\t\tgridQueryBox3D(grid, minX, minY, minZ, maxX, maxY, maxZ, _reusableQuerySet);\n\t\t\treturn Array.from(_reusableQuerySet);\n\t\t},\n\t\tqueryBoxInto(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, result: Set<number>): void {\n\t\t\tgridQueryBox3D(grid, minX, minY, minZ, maxX, maxY, maxZ, result);\n\t\t},\n\t\tqueryRadius(cx: number, cy: number, cz: number, radius: number): number[] {\n\t\t\t_reusableQuerySet.clear();\n\t\t\tgridQueryRadius3D(grid, cx, cy, cz, radius, _reusableQuerySet);\n\t\t\treturn Array.from(_reusableQuerySet);\n\t\t},\n\t\tqueryRadiusInto(cx: number, cy: number, cz: number, radius: number, result: Set<number>): void {\n\t\t\tgridQueryRadius3D(grid, cx, cy, cz, radius, result);\n\t\t},\n\t\tgetEntry(entityId: number): SpatialEntry3D | undefined {\n\t\t\treturn grid.entries.get(entityId);\n\t\t},\n\t};\n}\n\n// ==================== Component Types ====================\n\ntype SpatialIndex3DComponentTypes = Transform3DComponentTypes & Spatial3DColliderComponentTypes;\n\n// ==================== Plugin Options ====================\n\nexport type SpatialIndex3DPhase = 'fixedUpdate' | 'postUpdate';\ntype SpatialIndex3DLabel = `spatial-index3D-rebuild-${SpatialIndex3DPhase}`;\n\nexport interface SpatialIndex3DPluginOptions<G extends string = 'spatialIndex3D'> {\n\t/** Cell size for the spatial hash grid (default: 64) */\n\tcellSize?: number;\n\t/** System group name (default: 'spatialIndex3D') */\n\tsystemGroup?: G;\n\t/** Priority for rebuild systems (default: 2000, before collision) */\n\tpriority?: number;\n\t/** Phases to register rebuild systems in (default: ['fixedUpdate', 'postUpdate']) */\n\tphases?: ReadonlyArray<SpatialIndex3DPhase>;\n}\n\n// ==================== Plugin Factory ====================\n\n/**\n * Create a 3D spatial index plugin for ECSpresso.\n *\n * Provides a uniform-grid spatial hash that accelerates 3D collision detection.\n * When installed alongside the collision3D or physics3D plugins, they\n * automatically use the spatial index for broadphase instead of O(n²)\n * brute-force.\n *\n * Also provides proximity query methods for game logic (e.g. \"find all\n * enemies within 200 units\").\n *\n * @example\n * ```typescript\n * const ecs = ECSpresso.create()\n * .withPlugin(createTransform3DPlugin())\n * .withPlugin(createCollision3DPlugin({ layers }))\n * .withPlugin(createSpatialIndex3DPlugin({ cellSize: 128 }))\n * .build();\n *\n * // Proximity query in a system:\n * const si = ecs.getResource('spatialIndex3D');\n * const nearby = si.queryRadius(playerX, playerY, playerZ, 200);\n * ```\n */\nexport function createSpatialIndex3DPlugin<G extends string = 'spatialIndex3D'>(\n\toptions?: SpatialIndex3DPluginOptions<G>,\n) {\n\tconst {\n\t\tcellSize = 64,\n\t\tsystemGroup = 'spatialIndex3D',\n\t\tpriority = 2000,\n\t\tphases = ['fixedUpdate', 'postUpdate'] as const,\n\t} = options ?? {};\n\n\tconst grid = createGrid3D(cellSize);\n\tconst resource = createSpatialIndex3DResource(grid);\n\n\treturn definePlugin('spatialIndex3D')\n\t\t.withComponentTypes<SpatialIndex3DComponentTypes>()\n\t\t.withResourceTypes<SpatialIndex3DResourceTypes>()\n\t\t.withLabels<SpatialIndex3DLabel>()\n\t\t.withGroups<G>()\n\t\t.install((world) => {\n\t\t\tworld.addResource('spatialIndex3D', resource);\n\n\t\t\t// Register a rebuild system for each requested phase\n\t\t\tfor (const phase of phases) {\n\t\t\t\tconst transformComponent = phase === 'fixedUpdate' ? 'localTransform3D' : 'worldTransform3D';\n\n\t\t\t\tworld\n\t\t\t\t\t.addSystem(`spatial-index3D-rebuild-${phase}`)\n\t\t\t\t\t.setPriority(priority)\n\t\t\t\t\t.inPhase(phase as SystemPhase)\n\t\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t\t.addQuery('transforms', {\n\t\t\t\t\t\twith: [transformComponent],\n\t\t\t\t\t})\n\t\t\t\t\t.runWhenEmpty()\n\t\t\t\t\t.setProcess(({ queries, ecs }) => {\n\t\t\t\t\t\tclearGrid3D(grid);\n\n\t\t\t\t\t\tfor (const entity of queries.transforms) {\n\t\t\t\t\t\t\tconst transform = entity.components[transformComponent];\n\t\t\t\t\t\t\tconst aabb = ecs.getComponent(entity.id, 'aabb3DCollider');\n\t\t\t\t\t\t\t// AABB wins when both are present, matching collision3D / physics3D.\n\t\t\t\t\t\t\tconst sphere = aabb ? undefined : ecs.getComponent(entity.id, 'sphereCollider');\n\n\t\t\t\t\t\t\tif (aabb) {\n\t\t\t\t\t\t\t\tinsertEntity3D(\n\t\t\t\t\t\t\t\t\tgrid, entity.id,\n\t\t\t\t\t\t\t\t\ttransform.x + (aabb.offsetX ?? 0),\n\t\t\t\t\t\t\t\t\ttransform.y + (aabb.offsetY ?? 0),\n\t\t\t\t\t\t\t\t\ttransform.z + (aabb.offsetZ ?? 0),\n\t\t\t\t\t\t\t\t\taabb.width / 2, aabb.height / 2, aabb.depth / 2,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (sphere) {\n\t\t\t\t\t\t\t\tconst r = sphere.radius;\n\t\t\t\t\t\t\t\tinsertEntity3D(\n\t\t\t\t\t\t\t\t\tgrid, entity.id,\n\t\t\t\t\t\t\t\t\ttransform.x + (sphere.offsetX ?? 0),\n\t\t\t\t\t\t\t\t\ttransform.y + (sphere.offsetY ?? 0),\n\t\t\t\t\t\t\t\t\ttransform.z + (sphere.offsetZ ?? 0),\n\t\t\t\t\t\t\t\t\tr, r, r,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t});\n}\n",
6
6
  "/**\n * Spatial Hash Grid 3D\n *\n * Uniform-grid spatial hash for broadphase collision detection and\n * proximity queries in 3D. Pure data structure, no ECS dependencies.\n */\n\n// ==================== Data Structures ====================\n\nexport interface SpatialEntry3D {\n\tentityId: number;\n\tx: number;\n\ty: number;\n\tz: number;\n\thalfW: number;\n\thalfH: number;\n\thalfD: number;\n}\n\nexport interface SpatialHashGrid3D {\n\tcellSize: number;\n\tinvCellSize: number;\n\tcells: Map<number, number[]>;\n\tentries: Map<number, SpatialEntry3D>;\n\t/** Previous-frame entries held for in-place reuse during rebuild. Internal. */\n\t_entriesPrev: Map<number, SpatialEntry3D>;\n}\n\n// ==================== Pure Functions ====================\n\n/**\n * Hash a cell coordinate triple to a single integer key.\n * Uses large-prime XOR to distribute values.\n */\nexport function hashCell3D(cx: number, cy: number, cz: number): number {\n\t// Large primes for spatial hashing distribution\n\treturn (cx * 73856093) ^ (cy * 19349663) ^ (cz * 83492791);\n}\n\n/**\n * Create a new empty 3D spatial hash grid.\n */\nexport function createGrid3D(cellSize: number): SpatialHashGrid3D {\n\treturn {\n\t\tcellSize,\n\t\tinvCellSize: 1 / cellSize,\n\t\tcells: new Map(),\n\t\tentries: new Map(),\n\t\t_entriesPrev: new Map(),\n\t};\n}\n\n/**\n * Prepare the grid for a rebuild.\n *\n * Swaps `entries` with `_entriesPrev` so `insertEntity3D` can reuse existing\n * `SpatialEntry3D` objects in place (steady-state rebuilds allocate zero\n * entries). Any stale entries left in `_entriesPrev` from the previous\n * rebuild are dropped here.\n *\n * Cell buckets are cleared in place — keys are retained so subsequent\n * inserts hit the existing array rather than allocating a fresh one.\n */\nexport function clearGrid3D(grid: SpatialHashGrid3D): void {\n\tgrid._entriesPrev.clear();\n\tconst tmp = grid.entries;\n\tgrid.entries = grid._entriesPrev;\n\tgrid._entriesPrev = tmp;\n\n\tfor (const bucket of grid.cells.values()) {\n\t\tbucket.length = 0;\n\t}\n}\n\n/**\n * Insert an entity into all overlapping cells of the grid.\n */\nexport function insertEntity3D(\n\tgrid: SpatialHashGrid3D,\n\tentityId: number,\n\tx: number,\n\ty: number,\n\tz: number,\n\thalfW: number,\n\thalfH: number,\n\thalfD: number,\n): void {\n\tconst recycled = grid._entriesPrev.get(entityId);\n\tif (recycled) {\n\t\tgrid._entriesPrev.delete(entityId);\n\t\trecycled.x = x;\n\t\trecycled.y = y;\n\t\trecycled.z = z;\n\t\trecycled.halfW = halfW;\n\t\trecycled.halfH = halfH;\n\t\trecycled.halfD = halfD;\n\t\tgrid.entries.set(entityId, recycled);\n\t} else {\n\t\tgrid.entries.set(entityId, { entityId, x, y, z, halfW, halfH, halfD });\n\t}\n\n\tconst inv = grid.invCellSize;\n\tconst minCX = Math.floor((x - halfW) * inv);\n\tconst maxCX = Math.floor((x + halfW) * inv);\n\tconst minCY = Math.floor((y - halfH) * inv);\n\tconst maxCY = Math.floor((y + halfH) * inv);\n\tconst minCZ = Math.floor((z - halfD) * inv);\n\tconst maxCZ = Math.floor((z + halfD) * inv);\n\n\tfor (let cx = minCX; cx <= maxCX; cx++) {\n\t\tfor (let cy = minCY; cy <= maxCY; cy++) {\n\t\t\tfor (let cz = minCZ; cz <= maxCZ; cz++) {\n\t\t\t\tconst key = hashCell3D(cx, cy, cz);\n\t\t\t\tconst bucket = grid.cells.get(key);\n\t\t\t\tif (bucket) {\n\t\t\t\t\tbucket.push(entityId);\n\t\t\t\t} else {\n\t\t\t\t\tgrid.cells.set(key, [entityId]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Collect entity IDs from all cells overlapping the given 3D box.\n */\nexport function gridQueryBox3D(\n\tgrid: SpatialHashGrid3D,\n\tminX: number,\n\tminY: number,\n\tminZ: number,\n\tmaxX: number,\n\tmaxY: number,\n\tmaxZ: number,\n\tresult: Set<number>,\n): void {\n\tconst inv = grid.invCellSize;\n\tconst minCX = Math.floor(minX * inv);\n\tconst maxCX = Math.floor(maxX * inv);\n\tconst minCY = Math.floor(minY * inv);\n\tconst maxCY = Math.floor(maxY * inv);\n\tconst minCZ = Math.floor(minZ * inv);\n\tconst maxCZ = Math.floor(maxZ * inv);\n\n\tfor (let cx = minCX; cx <= maxCX; cx++) {\n\t\tfor (let cy = minCY; cy <= maxCY; cy++) {\n\t\t\tfor (let cz = minCZ; cz <= maxCZ; cz++) {\n\t\t\t\tconst bucket = grid.cells.get(hashCell3D(cx, cy, cz));\n\t\t\t\tif (!bucket) continue;\n\t\t\t\tfor (const id of bucket) result.add(id);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Module-scoped reusable set to reduce GC pressure\nconst _radiusCandidates3D = new Set<number>();\n\n/**\n * Collect entity IDs within a sphere. Uses box broadphase then\n * 3D AABB-to-point distance filter.\n */\nexport function gridQueryRadius3D(\n\tgrid: SpatialHashGrid3D,\n\tcx: number,\n\tcy: number,\n\tcz: number,\n\tradius: number,\n\tresult: Set<number>,\n): void {\n\tconst candidates = _radiusCandidates3D;\n\tcandidates.clear();\n\tgridQueryBox3D(\n\t\tgrid,\n\t\tcx - radius, cy - radius, cz - radius,\n\t\tcx + radius, cy + radius, cz + radius,\n\t\tcandidates,\n\t);\n\n\tconst rSq = radius * radius;\n\n\tfor (const entityId of candidates) {\n\t\tconst entry = grid.entries.get(entityId);\n\t\tif (!entry) continue;\n\n\t\t// Closest point on entity AABB to query center\n\t\tconst closestX = Math.max(entry.x - entry.halfW, Math.min(cx, entry.x + entry.halfW));\n\t\tconst closestY = Math.max(entry.y - entry.halfH, Math.min(cy, entry.y + entry.halfH));\n\t\tconst closestZ = Math.max(entry.z - entry.halfD, Math.min(cz, entry.z + entry.halfD));\n\t\tconst dx = cx - closestX;\n\t\tconst dy = cy - closestY;\n\t\tconst dz = cz - closestZ;\n\n\t\tif (dx * dx + dy * dy + dz * dz <= rSq) {\n\t\t\tresult.add(entityId);\n\t\t}\n\t}\n}\n\n// ==================== SpatialIndex3D Interface ====================\n\n/**\n * High-level spatial index API for 3D broadphase queries.\n *\n * Defined here (the utility layer) so that narrowphase3D can accept it\n * without importing the ECS plugin. The spatial-index3D plugin creates\n * an object that implements this interface and registers it as a resource.\n */\nexport interface SpatialIndex3D {\n\treadonly grid: SpatialHashGrid3D;\n\tqueryBox(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): number[];\n\tqueryBoxInto(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, result: Set<number>): void;\n\tqueryRadius(cx: number, cy: number, cz: number, radius: number): number[];\n\tqueryRadiusInto(cx: number, cy: number, cz: number, radius: number, result: Set<number>): void;\n\tgetEntry(entityId: number): SpatialEntry3D | undefined;\n}\n"
7
7
  ],
8
- "mappings": "4cAYA,uBAAS,kBCsBF,SAAS,CAAU,CAAC,EAAY,EAAY,EAAoB,CAEtE,OAAQ,EAAK,SAAa,EAAK,SAAa,EAAK,SAM3C,SAAS,CAAY,CAAC,EAAqC,CACjE,MAAO,CACN,WACA,YAAa,EAAI,EACjB,MAAO,IAAI,IACX,QAAS,IAAI,IACb,aAAc,IAAI,GACnB,EAcM,SAAS,CAAW,CAAC,EAA+B,CAC1D,EAAK,aAAa,MAAM,EACxB,IAAM,EAAM,EAAK,QACjB,EAAK,QAAU,EAAK,aACpB,EAAK,aAAe,EAEpB,QAAW,KAAU,EAAK,MAAM,OAAO,EACtC,EAAO,OAAS,EAOX,SAAS,CAAc,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACO,CACP,IAAM,EAAW,EAAK,aAAa,IAAI,CAAQ,EAC/C,GAAI,EACH,EAAK,aAAa,OAAO,CAAQ,EACjC,EAAS,EAAI,EACb,EAAS,EAAI,EACb,EAAS,EAAI,EACb,EAAS,MAAQ,EACjB,EAAS,MAAQ,EACjB,EAAS,MAAQ,EACjB,EAAK,QAAQ,IAAI,EAAU,CAAQ,EAEnC,OAAK,QAAQ,IAAI,EAAU,CAAE,WAAU,IAAG,IAAG,IAAG,QAAO,QAAO,OAAM,CAAC,EAGtE,IAAM,EAAM,EAAK,YACX,EAAQ,KAAK,OAAO,EAAI,GAAS,CAAG,EACpC,EAAQ,KAAK,OAAO,EAAI,GAAS,CAAG,EACpC,EAAQ,KAAK,OAAO,EAAI,GAAS,CAAG,EACpC,EAAQ,KAAK,OAAO,EAAI,GAAS,CAAG,EACpC,EAAQ,KAAK,OAA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AU,CACnB,EAAM,YAAY,iBAAkB,CAAQ,EAG5C,QAAW,KAAS,EAAQ,CAC3B,IAAM,EAAqB,IAAU,cAAgB,mBAAqB,mBAE1E,EACE,UAAU,2BAA2B,GAAO,EAC5C,YAAY,CAAQ,EACpB,QAAQ,CAAoB,EAC5B,QAAQ,CAAW,EACnB,SAAS,aAAc,CACvB,KAAM,CAAC,CAAkB,CAC1B,CAAC,EACA,aAAa,EACb,WAAW,EAAG,UAAS,SAAU,CACjC,EAAY,CAAI,EAEhB,QAAW,KAAU,EAAQ,WAAY,CACxC,IAAM,EAAY,EAAO,WAAW,GAC9B,EAAO,EAAI,aAAa,EAAO,GAAI,gBAAgB,EAEnD,EAAS,EAAO,OAAY,EAAI,aAAa,EAAO,GAAI,gBAAgB,EAE9E,GAAI,EAAM,CACT,EACC,EAAM,EAAO,GACb,EAAU,GAAK,EAAK,SAAW,GAC/B,EAAU,GAAK,EAAK,SAAW,GAC/B,EAAU,GAAK,EAAK,SAAW,GAC/B,EAAK,MAAQ,EAAG,EAAK,OAAS,EAAG,EAAK,MAAQ,CAC/C,EACA,SAGD,GAAI,EAAQ,CACX,IAAM,EAAI,EAAO,OACjB,EACC,EAAM,EAAO,GACb,EAAU,GAAK,EAAO,SAAW,GACjC,EAAU,GAAK,EAAO,SAAW,GACjC,EAAU,GAAK,EAAO,SAAW,GACjC,EAAG,EAAG,CACP,IAGF,GAEH",
9
+ "debugId": "304FFB5B6DD5D73864756E2164756E21",
10
10
  "names": []
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecspresso",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",