diff --git a/demo/src/animationDemo.ts b/demo/src/animationDemo.ts index 24a66d94..e9d88a1b 100644 --- a/demo/src/animationDemo.ts +++ b/demo/src/animationDemo.ts @@ -32,7 +32,7 @@ import { TriggerAction, Vector2, } from '../../src'; -import { EcsWorld } from '../../src/new-ecs'; +import { EcsWorld } from '../../src/ecs'; import { FiniteStateMachine } from '../../src/finite-state-machine/finite-state-machine'; import { Transition } from '../../src/finite-state-machine/transition'; import { ADVENTURER_ANIMATIONS, SHIP_ANIMATIONS } from './animationEnums'; diff --git a/demo/src/control-adventurer-component.ts b/demo/src/control-adventurer-component.ts index 93c94b6e..eadce8bd 100644 --- a/demo/src/control-adventurer-component.ts +++ b/demo/src/control-adventurer-component.ts @@ -1,3 +1,3 @@ -import { createTagId } from '../../src/new-ecs/ecs-component'; +import { createTagId } from '../../src/ecs/ecs-component'; export const controlAdventurerId = createTagId('control-adventurer'); diff --git a/demo/src/control-adventurer-system.ts b/demo/src/control-adventurer-system.ts index 2dadc7c3..8df40f1f 100644 --- a/demo/src/control-adventurer-system.ts +++ b/demo/src/control-adventurer-system.ts @@ -7,7 +7,7 @@ import { spriteAnimationId, TriggerAction, } from '../../src'; -import { EcsSystem } from '../../src/new-ecs'; +import { EcsSystem } from '../../src/ecs'; import { controlAdventurerId } from './control-adventurer-component'; export const createControlAdventurerEcsSystem = ( diff --git a/demo/src/fire-system.ts b/demo/src/fire-system.ts index ad75ce06..5c19e1fc 100644 --- a/demo/src/fire-system.ts +++ b/demo/src/fire-system.ts @@ -1,5 +1,10 @@ -import { HoldAction, InputsEcsComponent, inputsId, TriggerAction } from '../../src'; -import { EcsSystem } from '../../src/new-ecs'; +import { + HoldAction, + InputsEcsComponent, + inputsId, + TriggerAction, +} from '../../src'; +import { EcsSystem } from '../../src/ecs'; export const createFireEcsSystem = ( fireAction: TriggerAction, diff --git a/demo/src/move-component.ts b/demo/src/move-component.ts index a7702be2..f2e42d35 100644 --- a/demo/src/move-component.ts +++ b/demo/src/move-component.ts @@ -1,5 +1,5 @@ import { Vector2 } from '../../src'; -import { createComponentId } from '../../src/new-ecs/ecs-component'; +import { createComponentId } from '../../src/ecs/ecs-component'; export interface MoveEcsComponent { center: Vector2; diff --git a/demo/src/move-system.ts b/demo/src/move-system.ts index 2019fa6c..5ae55e0f 100644 --- a/demo/src/move-system.ts +++ b/demo/src/move-system.ts @@ -1,5 +1,5 @@ import { PositionEcsComponent, positionId, Time } from '../../src'; -import { EcsSystem } from '../../src/new-ecs'; +import { EcsSystem } from '../../src/ecs'; import { MoveEcsComponent, moveId } from './move-component'; export const createMoveEcsSystem = ( diff --git a/documentation-site/src/pages/demos/space-shooter/_create-player.ts b/documentation-site/src/pages/demos/space-shooter/_create-player.ts index 20a13b3e..a9e44605 100644 --- a/documentation-site/src/pages/demos/space-shooter/_create-player.ts +++ b/documentation-site/src/pages/demos/space-shooter/_create-player.ts @@ -7,7 +7,11 @@ import { RenderLayer, SpriteComponent, } from '@forge-game-engine/forge/rendering'; -import { PositionComponent, RotationComponent, ScaleComponent } from '@forge-game-engine/forge/common'; +import { + PositionComponent, + RotationComponent, + ScaleComponent, +} from '@forge-game-engine/forge/common'; import { PlayerComponent } from './_player.component'; import { GunComponent } from './_gun.component'; import { degreesToRadians } from '../../../../../dist'; diff --git a/package.json b/package.json index 072d52fe..9f632105 100644 --- a/package.json +++ b/package.json @@ -69,12 +69,6 @@ "default": "./dist/physics/index.js" } }, - "./pooling": { - "import": { - "types": "./dist/pooling/index.d.ts", - "default": "./dist/pooling/index.js" - } - }, "./rendering": { "import": { "types": "./dist/rendering/index.d.ts", diff --git a/src/animations/components/animation-component.ts b/src/animations/components/animation-component.ts index c1e4bc53..3dc1626a 100644 --- a/src/animations/components/animation-component.ts +++ b/src/animations/components/animation-component.ts @@ -1,5 +1,5 @@ import { linear } from '../easing-functions/index.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * Represents the properties of an animated object. diff --git a/src/animations/components/sprite-animation-component.ts b/src/animations/components/sprite-animation-component.ts index 24c1961b..9a63d579 100644 --- a/src/animations/components/sprite-animation-component.ts +++ b/src/animations/components/sprite-animation-component.ts @@ -1,6 +1,6 @@ import { AnimationClip, AnimationInputs } from '../types/index.js'; import { FiniteStateMachine } from '../../finite-state-machine/finite-state-machine.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for sprite animations. diff --git a/src/animations/systems/animation-system.test.ts b/src/animations/systems/animation-system.test.ts index 6f6f7b9f..b5d5aded 100644 --- a/src/animations/systems/animation-system.test.ts +++ b/src/animations/systems/animation-system.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest'; import { createAnimationEcsSystem } from './animation-system'; import { Time } from '../../common'; import { type AnimationEcsComponent, animationId } from '../components'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; describe('createAnimationEcsSystem', () => { it('should update animations and call updateCallback', () => { diff --git a/src/animations/systems/animation-system.ts b/src/animations/systems/animation-system.ts index 521c109d..bc315ab1 100644 --- a/src/animations/systems/animation-system.ts +++ b/src/animations/systems/animation-system.ts @@ -4,7 +4,7 @@ import { type AnimationEcsComponent, animationId, } from '../components/index.js'; -import { EcsSystem } from '../../new-ecs/index.js'; +import { EcsSystem } from '../../ecs/index.js'; /** * Updates a single animation. diff --git a/src/animations/systems/sprite-animation-system.ts b/src/animations/systems/sprite-animation-system.ts index fa1ec1b0..4c354a1d 100644 --- a/src/animations/systems/sprite-animation-system.ts +++ b/src/animations/systems/sprite-animation-system.ts @@ -3,7 +3,7 @@ import { type SpriteAnimationEcsComponent, spriteAnimationId, } from '../components/index.js'; -import { EcsSystem } from '../../new-ecs/index.js'; +import { EcsSystem } from '../../ecs/index.js'; /** * Creates a new ECS-style sprite animation system. diff --git a/src/audio/components/audio-component.ts b/src/audio/components/audio-component.ts index 7ae3267e..b34ce61d 100644 --- a/src/audio/components/audio-component.ts +++ b/src/audio/components/audio-component.ts @@ -1,5 +1,5 @@ import { Howl } from 'howler'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for audio. diff --git a/src/audio/systems/audio-system.test.ts b/src/audio/systems/audio-system.test.ts index 86ec755c..d7efc7f5 100644 --- a/src/audio/systems/audio-system.test.ts +++ b/src/audio/systems/audio-system.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest'; import { Howl } from 'howler'; import { createAudioEcsSystem } from './audio-system'; import { type AudioEcsComponent, audioId } from '../components'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; vi.mock(import('howler'), { spy: true }); diff --git a/src/audio/systems/audio-system.ts b/src/audio/systems/audio-system.ts index ba6bfc9c..ea4dddaa 100644 --- a/src/audio/systems/audio-system.ts +++ b/src/audio/systems/audio-system.ts @@ -1,5 +1,5 @@ import { AudioEcsComponent, audioId } from '../components/index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; // TODO: needs an unload? diff --git a/src/common/components/age-scale-component.ts b/src/common/components/age-scale-component.ts index a0b793e0..11a34043 100644 --- a/src/common/components/age-scale-component.ts +++ b/src/common/components/age-scale-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for age-based scaling. diff --git a/src/common/components/depth-component.ts b/src/common/components/depth-component.ts index 61ae4e5d..5414511a 100644 --- a/src/common/components/depth-component.ts +++ b/src/common/components/depth-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for Depth. diff --git a/src/common/components/flip-component.ts b/src/common/components/flip-component.ts index 07915bca..4a3b9238 100644 --- a/src/common/components/flip-component.ts +++ b/src/common/components/flip-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for flipping sprites. diff --git a/src/common/components/parent-component.ts b/src/common/components/parent-component.ts index 3005ef41..5a6bfe7f 100644 --- a/src/common/components/parent-component.ts +++ b/src/common/components/parent-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for Parent. diff --git a/src/common/components/position-component.ts b/src/common/components/position-component.ts index c1901a3f..1c6429f0 100644 --- a/src/common/components/position-component.ts +++ b/src/common/components/position-component.ts @@ -1,5 +1,5 @@ import { Vector2 } from '../../math/index.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for position. diff --git a/src/common/components/rotation-component.ts b/src/common/components/rotation-component.ts index 003a6e29..88597467 100644 --- a/src/common/components/rotation-component.ts +++ b/src/common/components/rotation-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for rotation. diff --git a/src/common/components/scale-component.ts b/src/common/components/scale-component.ts index ff05692e..a468833d 100644 --- a/src/common/components/scale-component.ts +++ b/src/common/components/scale-component.ts @@ -1,5 +1,5 @@ import { Vector2 } from '../../math/index.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for scale. diff --git a/src/common/components/speed-component.ts b/src/common/components/speed-component.ts index e5f09edf..719142a7 100644 --- a/src/common/components/speed-component.ts +++ b/src/common/components/speed-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for speed. diff --git a/src/common/systems/age-scale-system.test.ts b/src/common/systems/age-scale-system.test.ts index 6d8a8e40..29298ad3 100644 --- a/src/common/systems/age-scale-system.test.ts +++ b/src/common/systems/age-scale-system.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; import { LifetimeEcsComponent, lifetimeId } from '../../lifecycle'; -import { EcsWorld, QueryResult } from '../../new-ecs'; +import { EcsWorld, QueryResult } from '../../ecs'; import { AgeScaleEcsComponent, ageScaleId, diff --git a/src/common/systems/age-scale-system.ts b/src/common/systems/age-scale-system.ts index b50b5cb7..588bd7a0 100644 --- a/src/common/systems/age-scale-system.ts +++ b/src/common/systems/age-scale-system.ts @@ -7,7 +7,7 @@ import { AgeScaleEcsComponent, ageScaleId, } from '../components/age-scale-component.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates an ECS system to handle age-based scaling of entities. diff --git a/src/common/systems/parent-position-system.test.ts b/src/common/systems/parent-position-system.test.ts index f944343c..745dd04f 100644 --- a/src/common/systems/parent-position-system.test.ts +++ b/src/common/systems/parent-position-system.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from 'vitest'; import { PositionEcsComponent, positionId } from '../components'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { Vector2 } from '../../math'; import { ParentEcsComponent, parentId } from '../components/parent-component'; import { createParentPositionEcsSystem } from './parent-position-system'; diff --git a/src/common/systems/parent-position-system.ts b/src/common/systems/parent-position-system.ts index 534521e9..eb7e3ba2 100644 --- a/src/common/systems/parent-position-system.ts +++ b/src/common/systems/parent-position-system.ts @@ -1,5 +1,5 @@ -import { EcsSystem } from '../../new-ecs/ecs-system'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsSystem } from '../../ecs/ecs-system'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { PositionEcsComponent, positionId } from '../components'; import { parentId } from '../components/parent-component'; import { createTransformCache, resetTransformCache } from './transform-cache'; diff --git a/src/common/systems/parent-rotation-system.test.ts b/src/common/systems/parent-rotation-system.test.ts index b5a2f7dd..9dbfbebe 100644 --- a/src/common/systems/parent-rotation-system.test.ts +++ b/src/common/systems/parent-rotation-system.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from 'vitest'; import { RotationEcsComponent, rotationId } from '../components'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { ParentEcsComponent, parentId } from '../components/parent-component'; import { createParentRotationEcsSystem } from './parent-rotation-system'; diff --git a/src/common/systems/parent-rotation-system.ts b/src/common/systems/parent-rotation-system.ts index d54c5339..f7499090 100644 --- a/src/common/systems/parent-rotation-system.ts +++ b/src/common/systems/parent-rotation-system.ts @@ -1,5 +1,5 @@ -import { EcsSystem } from '../../new-ecs/ecs-system'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsSystem } from '../../ecs/ecs-system'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { RotationEcsComponent, rotationId } from '../components'; import { parentId } from '../components/parent-component'; import { createTransformCache, resetTransformCache } from './transform-cache'; diff --git a/src/common/systems/parent-scale-system.test.ts b/src/common/systems/parent-scale-system.test.ts index 19914ea8..4446eca8 100644 --- a/src/common/systems/parent-scale-system.test.ts +++ b/src/common/systems/parent-scale-system.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from 'vitest'; import { ScaleEcsComponent, scaleId } from '../components'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { Vector2 } from '../../math'; import { ParentEcsComponent, parentId } from '../components/parent-component'; import { createParentScaleEcsSystem } from './parent-scale-system'; diff --git a/src/common/systems/parent-scale-system.ts b/src/common/systems/parent-scale-system.ts index c6b9a900..658a702e 100644 --- a/src/common/systems/parent-scale-system.ts +++ b/src/common/systems/parent-scale-system.ts @@ -1,5 +1,5 @@ -import { EcsSystem } from '../../new-ecs/ecs-system'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsSystem } from '../../ecs/ecs-system'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { ScaleEcsComponent, scaleId } from '../components'; import { parentId } from '../components/parent-component'; import { createTransformCache, resetTransformCache } from './transform-cache'; diff --git a/src/common/systems/transform-system.ts b/src/common/systems/transform-system.ts index 3bca6ac1..8c6958d7 100644 --- a/src/common/systems/transform-system.ts +++ b/src/common/systems/transform-system.ts @@ -1,5 +1,5 @@ -import { EcsSystem } from '../../new-ecs/ecs-system'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsSystem } from '../../ecs/ecs-system'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { PositionEcsComponent, positionId, diff --git a/src/new-ecs/ecs-component.ts b/src/ecs/ecs-component.ts similarity index 100% rename from src/new-ecs/ecs-component.ts rename to src/ecs/ecs-component.ts diff --git a/src/new-ecs/ecs-system.ts b/src/ecs/ecs-system.ts similarity index 100% rename from src/new-ecs/ecs-system.ts rename to src/ecs/ecs-system.ts diff --git a/src/new-ecs/ecs-world.test.ts b/src/ecs/ecs-world.test.ts similarity index 100% rename from src/new-ecs/ecs-world.test.ts rename to src/ecs/ecs-world.test.ts diff --git a/src/new-ecs/ecs-world.ts b/src/ecs/ecs-world.ts similarity index 100% rename from src/new-ecs/ecs-world.ts rename to src/ecs/ecs-world.ts diff --git a/src/new-ecs/index.ts b/src/ecs/index.ts similarity index 100% rename from src/new-ecs/index.ts rename to src/ecs/index.ts diff --git a/src/index.ts b/src/index.ts index a6cd05c0..4d2137d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ export * from './particles/index.js'; export * from './asset-loading/index.js'; export * from './audio/index.js'; export * from './common/index.js'; -export * from './new-ecs/index.js'; +export * from './ecs/index.js'; export * from './events/index.js'; export * from './input/index.js'; export * from './lifecycle/index.js'; diff --git a/src/input/components/inputs-component.ts b/src/input/components/inputs-component.ts index 41c61b4e..5eac324a 100644 --- a/src/input/components/inputs-component.ts +++ b/src/input/components/inputs-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; import { InputManager } from '../input-manager.js'; /** diff --git a/src/input/systems/reset-inputs-system.ts b/src/input/systems/reset-inputs-system.ts index 304eb861..83cce8dd 100644 --- a/src/input/systems/reset-inputs-system.ts +++ b/src/input/systems/reset-inputs-system.ts @@ -1,4 +1,4 @@ -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; import { InputsEcsComponent, inputsId, diff --git a/src/input/systems/update-inputs-system.ts b/src/input/systems/update-inputs-system.ts index b94be18e..bd27547e 100644 --- a/src/input/systems/update-inputs-system.ts +++ b/src/input/systems/update-inputs-system.ts @@ -1,5 +1,5 @@ import { Time } from '../../common'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; import { InputsEcsComponent, inputsId, diff --git a/src/lifecycle/components/lifetime-component.ts b/src/lifecycle/components/lifetime-component.ts index 46e2e6e2..a8e09969 100644 --- a/src/lifecycle/components/lifetime-component.ts +++ b/src/lifecycle/components/lifetime-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for managing entity lifetime. diff --git a/src/lifecycle/strategies/remove-from-world-strategy-component.ts b/src/lifecycle/strategies/remove-from-world-strategy-component.ts index fa0526f0..75341509 100644 --- a/src/lifecycle/strategies/remove-from-world-strategy-component.ts +++ b/src/lifecycle/strategies/remove-from-world-strategy-component.ts @@ -1,4 +1,4 @@ -import { createTagId } from '../../new-ecs/ecs-component.js'; +import { createTagId } from '../../ecs/ecs-component.js'; export const RemoveFromWorldLifetimeStrategyId = createTagId( 'removeFromWorldLifetimeStrategy', diff --git a/src/lifecycle/systems/lifetime-tracking-system.test.ts b/src/lifecycle/systems/lifetime-tracking-system.test.ts index d8f8bb26..c53a4caf 100644 --- a/src/lifecycle/systems/lifetime-tracking-system.test.ts +++ b/src/lifecycle/systems/lifetime-tracking-system.test.ts @@ -5,7 +5,7 @@ import { lifetimeId, } from '../components/lifetime-component'; import { Time } from '../../common'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; describe('LifetimeTrackingSystem', () => { let world: EcsWorld; diff --git a/src/lifecycle/systems/lifetime-tracking-system.ts b/src/lifecycle/systems/lifetime-tracking-system.ts index 9d8dde6c..13284ed6 100644 --- a/src/lifecycle/systems/lifetime-tracking-system.ts +++ b/src/lifecycle/systems/lifetime-tracking-system.ts @@ -1,5 +1,5 @@ import { Time } from '../../common'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; import { LifetimeEcsComponent, lifetimeId, diff --git a/src/lifecycle/systems/remove-from-world-lifecycle-system.test.ts b/src/lifecycle/systems/remove-from-world-lifecycle-system.test.ts index 58c0c6d6..188097ce 100644 --- a/src/lifecycle/systems/remove-from-world-lifecycle-system.test.ts +++ b/src/lifecycle/systems/remove-from-world-lifecycle-system.test.ts @@ -3,7 +3,7 @@ import { createRemoveFromWorldEcsSystem } from './remove-from-world-lifecycle-sy import { lifetimeId } from '../components/lifetime-component'; import { RemoveFromWorldLifetimeStrategyId } from '../strategies/remove-from-world-strategy-component'; import { Time } from '../../common'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; describe('RemoveFromWorldLifecycleSystem', () => { let world: EcsWorld; diff --git a/src/lifecycle/systems/remove-from-world-lifecycle-system.ts b/src/lifecycle/systems/remove-from-world-lifecycle-system.ts index ee45d565..62f9af54 100644 --- a/src/lifecycle/systems/remove-from-world-lifecycle-system.ts +++ b/src/lifecycle/systems/remove-from-world-lifecycle-system.ts @@ -4,7 +4,7 @@ import { } from '../components/lifetime-component.js'; import { RemoveFromWorldLifetimeStrategyId } from '../strategies/remove-from-world-strategy-component.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates an ECS system to handle removing expired entities from the world. diff --git a/src/particles/components/particle-component.ts b/src/particles/components/particle-component.ts index f5ab6012..461af235 100644 --- a/src/particles/components/particle-component.ts +++ b/src/particles/components/particle-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for a particle. diff --git a/src/particles/components/particle-emitter-component.ts b/src/particles/components/particle-emitter-component.ts index ae097aca..37b2651a 100644 --- a/src/particles/components/particle-emitter-component.ts +++ b/src/particles/components/particle-emitter-component.ts @@ -1,6 +1,6 @@ import { ParticleEmitter } from './particle-emitter.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for the particle emitter. diff --git a/src/particles/systems/particle-emitter-system.test.ts b/src/particles/systems/particle-emitter-system.test.ts index 5a86f1c0..dab086cd 100644 --- a/src/particles/systems/particle-emitter-system.test.ts +++ b/src/particles/systems/particle-emitter-system.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { createParticleEcsSystem } from './particle-emitter-system'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { ParticleEmitter, ParticleEmitterEcsComponent, diff --git a/src/particles/systems/particle-emitter-system.ts b/src/particles/systems/particle-emitter-system.ts index d27aac57..849b939e 100644 --- a/src/particles/systems/particle-emitter-system.ts +++ b/src/particles/systems/particle-emitter-system.ts @@ -14,8 +14,8 @@ import { ParticleEmitterId, ParticleId, } from '../index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { lifetimeId, RemoveFromWorldLifetimeStrategyId, diff --git a/src/particles/systems/particle-position-system.test.ts b/src/particles/systems/particle-position-system.test.ts index 13cb5c9b..9c586f7e 100644 --- a/src/particles/systems/particle-position-system.test.ts +++ b/src/particles/systems/particle-position-system.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from 'vitest'; import { createParticlePositionEcsSystem } from './particle-position-system'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { ParticleEcsComponent, ParticleId, diff --git a/src/particles/systems/particle-position-system.ts b/src/particles/systems/particle-position-system.ts index 55168bfe..9705b3b5 100644 --- a/src/particles/systems/particle-position-system.ts +++ b/src/particles/systems/particle-position-system.ts @@ -9,7 +9,7 @@ import { } from '../../common/index.js'; import { ParticleEcsComponent, ParticleId } from '../index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates an ECS system to handle updating particle positions. diff --git a/src/physics/components/physics-body-component.ts b/src/physics/components/physics-body-component.ts index 779bb7ba..c9cf72be 100644 --- a/src/physics/components/physics-body-component.ts +++ b/src/physics/components/physics-body-component.ts @@ -1,5 +1,5 @@ import type { Body } from 'matter-js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * ECS-style component interface for a physics body. diff --git a/src/physics/systems/physics.system.test.ts b/src/physics/systems/physics.system.test.ts index 1fe32fdf..c6deb27e 100644 --- a/src/physics/systems/physics.system.test.ts +++ b/src/physics/systems/physics.system.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, it } from 'vitest'; import { Bodies, Engine } from 'matter-js'; import { createPhysicsEcsSystem } from './physics.system'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { PositionEcsComponent, positionId, diff --git a/src/physics/systems/physics.system.ts b/src/physics/systems/physics.system.ts index 0015c357..f90e5654 100644 --- a/src/physics/systems/physics.system.ts +++ b/src/physics/systems/physics.system.ts @@ -9,7 +9,7 @@ import { } from '../../common/index.js'; import { PhysicsBodyEcsComponent, PhysicsBodyId } from '../components/index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates an ECS system to handle physics. diff --git a/src/rendering/components/camera-component.ts b/src/rendering/components/camera-component.ts index ec2402e7..287b98ec 100644 --- a/src/rendering/components/camera-component.ts +++ b/src/rendering/components/camera-component.ts @@ -1,6 +1,6 @@ import { Axis1dAction, Axis2dAction } from '../../input/index.js'; import { Rect } from '../../math/index.js'; -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; export interface CameraEcsComponent { zoom: number; diff --git a/src/rendering/components/sprite-component.ts b/src/rendering/components/sprite-component.ts index c895a764..6316d4d9 100644 --- a/src/rendering/components/sprite-component.ts +++ b/src/rendering/components/sprite-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; import { Sprite } from '../sprite.js'; export interface SpriteEcsComponent { diff --git a/src/rendering/renderable.test.ts b/src/rendering/renderable.test.ts index 3f21d9b9..8afc09ba 100644 --- a/src/rendering/renderable.test.ts +++ b/src/rendering/renderable.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, it, Mock, vi } from 'vitest'; import { Geometry } from './geometry/geometry.js'; import { Material } from './materials/material.js'; import { Renderable } from './renderable.js'; -import { EcsWorld } from '../new-ecs/ecs-world.js'; +import { EcsWorld } from '../ecs/ecs-world.js'; describe('Renderable', () => { let mockGeometry: Geometry; diff --git a/src/rendering/renderable.ts b/src/rendering/renderable.ts index 3a62831c..45bcf77f 100644 --- a/src/rendering/renderable.ts +++ b/src/rendering/renderable.ts @@ -1,4 +1,4 @@ -import { EcsWorld } from '../new-ecs/ecs-world.js'; +import { EcsWorld } from '../ecs/ecs-world.js'; import type { Geometry } from './geometry/index.js'; import type { Material } from './materials/index.js'; diff --git a/src/rendering/systems/camera-system.test.ts b/src/rendering/systems/camera-system.test.ts index 50573632..10a2c574 100644 --- a/src/rendering/systems/camera-system.test.ts +++ b/src/rendering/systems/camera-system.test.ts @@ -3,7 +3,7 @@ import { createCameraEcsSystem } from './camera-system'; import { Axis1dAction, Axis2dAction } from '../../input'; import { CameraEcsComponent, cameraId } from '../components'; import { PositionEcsComponent, positionId, Time } from '../../common'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { Vector2 } from '../../math'; describe('CameraSystem', () => { diff --git a/src/rendering/systems/camera-system.ts b/src/rendering/systems/camera-system.ts index d246d4b9..12a0a8ab 100644 --- a/src/rendering/systems/camera-system.ts +++ b/src/rendering/systems/camera-system.ts @@ -1,7 +1,7 @@ import { PositionEcsComponent, positionId, Time } from '../../common/index.js'; import * as math from '../../math/index.js'; import { CameraEcsComponent, cameraId } from '../components/index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates a camera system that updates camera zoom and position based on input. diff --git a/src/rendering/systems/render-system.ts b/src/rendering/systems/render-system.ts index 6da871e2..87175303 100644 --- a/src/rendering/systems/render-system.ts +++ b/src/rendering/systems/render-system.ts @@ -1,7 +1,7 @@ import { PositionEcsComponent, positionId } from '../../common/index.js'; import { Matrix3x3 } from '../../math/index.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; -import { EcsWorld } from '../../new-ecs/index.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; +import { EcsWorld } from '../../ecs/index.js'; import { matchesLayerMask } from '../../utilities/matches-layer-mask.js'; import { CameraEcsComponent, diff --git a/src/rendering/utilities/add-camera.ts b/src/rendering/utilities/add-camera.ts index 5a12f4ee..e94a82b5 100644 --- a/src/rendering/utilities/add-camera.ts +++ b/src/rendering/utilities/add-camera.ts @@ -1,5 +1,5 @@ import { PositionEcsComponent, positionId } from '../../common/index.js'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { Vector2 } from '../../math/index.js'; import { CameraEcsComponent, cameraId } from '../components/index.js'; diff --git a/src/rendering/utilities/create-sprite.ts b/src/rendering/utilities/create-sprite.ts index e13e4b50..7324cb7e 100644 --- a/src/rendering/utilities/create-sprite.ts +++ b/src/rendering/utilities/create-sprite.ts @@ -13,7 +13,7 @@ import { SpriteAnimationEcsComponent, spriteAnimationId, } from '../../animations/index.js'; -import { EcsWorld } from '../../new-ecs/ecs-world.js'; +import { EcsWorld } from '../../ecs/ecs-world.js'; import { SpriteEcsComponent, spriteId, diff --git a/src/timer/components/timer-component.ts b/src/timer/components/timer-component.ts index a185fe56..814b582d 100644 --- a/src/timer/components/timer-component.ts +++ b/src/timer/components/timer-component.ts @@ -1,4 +1,4 @@ -import { createComponentId } from '../../new-ecs/ecs-component.js'; +import { createComponentId } from '../../ecs/ecs-component.js'; /** * Represents a single timer task that can execute a callback after a delay. diff --git a/src/timer/systems/timer-system.test.ts b/src/timer/systems/timer-system.test.ts index 5f801dfd..12c0c1d4 100644 --- a/src/timer/systems/timer-system.test.ts +++ b/src/timer/systems/timer-system.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { createTimerEcsSystem } from './timer-system'; import { TimerEcsComponent, TimerId } from '../components/timer-component'; -import { EcsWorld } from '../../new-ecs'; +import { EcsWorld } from '../../ecs'; import { Time } from '../../common'; describe('TimerSystem', () => { diff --git a/src/timer/systems/timer-system.ts b/src/timer/systems/timer-system.ts index cd3480ba..4656015d 100644 --- a/src/timer/systems/timer-system.ts +++ b/src/timer/systems/timer-system.ts @@ -1,7 +1,7 @@ import { Time } from '../../common/index.js'; import { TimerEcsComponent, TimerId } from '../components/timer-component.js'; -import { EcsSystem } from '../../new-ecs/ecs-system.js'; +import { EcsSystem } from '../../ecs/ecs-system.js'; /** * Creates an ECS system to handle timers. diff --git a/src/utilities/create-game.ts b/src/utilities/create-game.ts index d4ab0ef3..b97b24fb 100644 --- a/src/utilities/create-game.ts +++ b/src/utilities/create-game.ts @@ -1,5 +1,5 @@ import { Time } from '../common/index.js'; -import { EcsWorld } from '../new-ecs/ecs-world.js'; +import { EcsWorld } from '../ecs/ecs-world.js'; import { createCanvas, createRenderContext, diff --git a/src/utilities/game.ts b/src/utilities/game.ts index 37673a96..439a3c7b 100644 --- a/src/utilities/game.ts +++ b/src/utilities/game.ts @@ -1,5 +1,5 @@ import { Stoppable, Time } from '../common/index.js'; -import { EcsWorld } from '../new-ecs/ecs-world.js'; +import { EcsWorld } from '../ecs/ecs-world.js'; /** * Manages the game loop and coordinates updates between systems.