Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/src/animationDemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/control-adventurer-component.ts
Original file line number Diff line number Diff line change
@@ -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');
2 changes: 1 addition & 1 deletion demo/src/control-adventurer-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
9 changes: 7 additions & 2 deletions demo/src/fire-system.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion demo/src/move-component.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion demo/src/move-system.ts
Original file line number Diff line number Diff line change
@@ -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 = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/animations/components/animation-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/animations/components/sprite-animation-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/animations/systems/animation-system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/animations/systems/animation-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/animations/systems/sprite-animation-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/audio/components/audio-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/audio/systems/audio-system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
2 changes: 1 addition & 1 deletion src/audio/systems/audio-system.ts
Original file line number Diff line number Diff line change
@@ -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?

Expand Down
2 changes: 1 addition & 1 deletion src/common/components/age-scale-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/depth-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/flip-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/parent-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/position-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/rotation-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/scale-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/speed-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/systems/age-scale-system.test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/common/systems/age-scale-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/common/systems/parent-position-system.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/common/systems/parent-position-system.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/common/systems/parent-rotation-system.test.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions src/common/systems/parent-rotation-system.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/common/systems/parent-scale-system.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/common/systems/parent-scale-system.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/common/systems/transform-system.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/input/components/inputs-component.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/input/systems/reset-inputs-system.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EcsSystem } from '../../new-ecs/ecs-system.js';
import { EcsSystem } from '../../ecs/ecs-system.js';
import {
InputsEcsComponent,
inputsId,
Expand Down
2 changes: 1 addition & 1 deletion src/input/systems/update-inputs-system.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/lifecycle/components/lifetime-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createTagId } from '../../new-ecs/ecs-component.js';
import { createTagId } from '../../ecs/ecs-component.js';

export const RemoveFromWorldLifetimeStrategyId = createTagId(
'removeFromWorldLifetimeStrategy',
Expand Down
2 changes: 1 addition & 1 deletion src/lifecycle/systems/lifetime-tracking-system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/lifecycle/systems/lifetime-tracking-system.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/particles/components/particle-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/particles/components/particle-emitter-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/particles/systems/particle-emitter-system.test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/particles/systems/particle-emitter-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/particles/systems/particle-position-system.test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/particles/systems/particle-position-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/physics/components/physics-body-component.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading