diff --git a/app/create/ecs.js b/app/create/ecs.js index 712b259..ad0ba59 100644 --- a/app/create/ecs.js +++ b/app/create/ecs.js @@ -1,5 +1,5 @@ -import Components from '@/ecs-components/index.js'; -import Systems from '@/ecs-systems/index.js'; +import Components from '@/ecs/components/index.js'; +import Systems from '@/ecs/systems/index.js'; export default function createEcs(Ecs) { const ecs = new Ecs({Components, Systems}); diff --git a/app/ecs-components/animation.js b/app/ecs/components/animation.js similarity index 100% rename from app/ecs-components/animation.js rename to app/ecs/components/animation.js diff --git a/app/ecs-components/area-size.js b/app/ecs/components/area-size.js similarity index 100% rename from app/ecs-components/area-size.js rename to app/ecs/components/area-size.js diff --git a/app/ecs-components/camera.js b/app/ecs/components/camera.js similarity index 100% rename from app/ecs-components/camera.js rename to app/ecs/components/camera.js diff --git a/app/ecs-components/collider.js b/app/ecs/components/collider.js similarity index 100% rename from app/ecs-components/collider.js rename to app/ecs/components/collider.js diff --git a/app/ecs-components/controlled.js b/app/ecs/components/controlled.js similarity index 100% rename from app/ecs-components/controlled.js rename to app/ecs/components/controlled.js diff --git a/app/ecs-components/direction.js b/app/ecs/components/direction.js similarity index 100% rename from app/ecs-components/direction.js rename to app/ecs/components/direction.js diff --git a/app/ecs-components/ecs.js b/app/ecs/components/ecs.js similarity index 100% rename from app/ecs-components/ecs.js rename to app/ecs/components/ecs.js diff --git a/app/ecs-components/emitter.js b/app/ecs/components/emitter.js similarity index 100% rename from app/ecs-components/emitter.js rename to app/ecs/components/emitter.js diff --git a/app/ecs-components/forces.js b/app/ecs/components/forces.js similarity index 100% rename from app/ecs-components/forces.js rename to app/ecs/components/forces.js diff --git a/app/ecs-components/health.js b/app/ecs/components/health.js similarity index 100% rename from app/ecs-components/health.js rename to app/ecs/components/health.js diff --git a/app/ecs-components/helpers/vector-2d.js b/app/ecs/components/helpers/vector-2d.js similarity index 100% rename from app/ecs-components/helpers/vector-2d.js rename to app/ecs/components/helpers/vector-2d.js diff --git a/app/ecs-components/index.js b/app/ecs/components/index.js similarity index 100% rename from app/ecs-components/index.js rename to app/ecs/components/index.js diff --git a/app/ecs-components/interactive.js b/app/ecs/components/interactive.js similarity index 100% rename from app/ecs-components/interactive.js rename to app/ecs/components/interactive.js diff --git a/app/ecs-components/interacts.js b/app/ecs/components/interacts.js similarity index 100% rename from app/ecs-components/interacts.js rename to app/ecs/components/interacts.js diff --git a/app/ecs-components/interlocutor.js b/app/ecs/components/interlocutor.js similarity index 100% rename from app/ecs-components/interlocutor.js rename to app/ecs/components/interlocutor.js diff --git a/app/ecs-components/inventory.js b/app/ecs/components/inventory.js similarity index 100% rename from app/ecs-components/inventory.js rename to app/ecs/components/inventory.js diff --git a/app/ecs-components/light.js b/app/ecs/components/light.js similarity index 100% rename from app/ecs-components/light.js rename to app/ecs/components/light.js diff --git a/app/ecs-components/magnet.js b/app/ecs/components/magnet.js similarity index 100% rename from app/ecs-components/magnet.js rename to app/ecs/components/magnet.js diff --git a/app/ecs-components/magnetic.js b/app/ecs/components/magnetic.js similarity index 100% rename from app/ecs-components/magnetic.js rename to app/ecs/components/magnetic.js diff --git a/app/ecs-components/main-entity.js b/app/ecs/components/main-entity.js similarity index 100% rename from app/ecs-components/main-entity.js rename to app/ecs/components/main-entity.js diff --git a/app/ecs-components/plant.js b/app/ecs/components/plant.js similarity index 100% rename from app/ecs-components/plant.js rename to app/ecs/components/plant.js diff --git a/app/ecs-components/player.js b/app/ecs/components/player.js similarity index 100% rename from app/ecs-components/player.js rename to app/ecs/components/player.js diff --git a/app/ecs-components/position.js b/app/ecs/components/position.js similarity index 100% rename from app/ecs-components/position.js rename to app/ecs/components/position.js diff --git a/app/ecs-components/sound.js b/app/ecs/components/sound.js similarity index 100% rename from app/ecs-components/sound.js rename to app/ecs/components/sound.js diff --git a/app/ecs-components/speed.js b/app/ecs/components/speed.js similarity index 100% rename from app/ecs-components/speed.js rename to app/ecs/components/speed.js diff --git a/app/ecs-components/sprite.js b/app/ecs/components/sprite.js similarity index 100% rename from app/ecs-components/sprite.js rename to app/ecs/components/sprite.js diff --git a/app/ecs-components/ticking.js b/app/ecs/components/ticking.js similarity index 100% rename from app/ecs-components/ticking.js rename to app/ecs/components/ticking.js diff --git a/app/ecs-components/tile-layers.js b/app/ecs/components/tile-layers.js similarity index 100% rename from app/ecs-components/tile-layers.js rename to app/ecs/components/tile-layers.js diff --git a/app/ecs-components/tile-layers.test.js b/app/ecs/components/tile-layers.test.js similarity index 100% rename from app/ecs-components/tile-layers.test.js rename to app/ecs/components/tile-layers.test.js diff --git a/app/ecs-components/time.js b/app/ecs/components/time.js similarity index 100% rename from app/ecs-components/time.js rename to app/ecs/components/time.js diff --git a/app/ecs-components/visible-aabb.js b/app/ecs/components/visible-aabb.js similarity index 100% rename from app/ecs-components/visible-aabb.js rename to app/ecs/components/visible-aabb.js diff --git a/app/ecs-components/water.js b/app/ecs/components/water.js similarity index 100% rename from app/ecs-components/water.js rename to app/ecs/components/water.js diff --git a/app/ecs-components/wielder.js b/app/ecs/components/wielder.js similarity index 100% rename from app/ecs-components/wielder.js rename to app/ecs/components/wielder.js diff --git a/app/ecs-systems/apply-control-movement.js b/app/ecs/systems/apply-control-movement.js similarity index 100% rename from app/ecs-systems/apply-control-movement.js rename to app/ecs/systems/apply-control-movement.js diff --git a/app/ecs-systems/attract.js b/app/ecs/systems/attract.js similarity index 100% rename from app/ecs-systems/attract.js rename to app/ecs/systems/attract.js diff --git a/app/ecs-systems/clamp-positions.js b/app/ecs/systems/clamp-positions.js similarity index 100% rename from app/ecs-systems/clamp-positions.js rename to app/ecs/systems/clamp-positions.js diff --git a/app/ecs-systems/colliders.js b/app/ecs/systems/colliders.js similarity index 100% rename from app/ecs-systems/colliders.js rename to app/ecs/systems/colliders.js diff --git a/app/ecs-systems/control-direction.js b/app/ecs/systems/control-direction.js similarity index 100% rename from app/ecs-systems/control-direction.js rename to app/ecs/systems/control-direction.js diff --git a/app/ecs-systems/follow-camera.js b/app/ecs/systems/follow-camera.js similarity index 100% rename from app/ecs-systems/follow-camera.js rename to app/ecs/systems/follow-camera.js diff --git a/app/ecs-systems/index.js b/app/ecs/systems/index.js similarity index 100% rename from app/ecs-systems/index.js rename to app/ecs/systems/index.js diff --git a/app/ecs-systems/integrate-physics.js b/app/ecs/systems/integrate-physics.js similarity index 100% rename from app/ecs-systems/integrate-physics.js rename to app/ecs/systems/integrate-physics.js diff --git a/app/ecs-systems/interactions.js b/app/ecs/systems/interactions.js similarity index 100% rename from app/ecs-systems/interactions.js rename to app/ecs/systems/interactions.js diff --git a/app/ecs-systems/pass-time.js b/app/ecs/systems/pass-time.js similarity index 100% rename from app/ecs-systems/pass-time.js rename to app/ecs/systems/pass-time.js diff --git a/app/ecs-systems/plant-growth.js b/app/ecs/systems/plant-growth.js similarity index 100% rename from app/ecs-systems/plant-growth.js rename to app/ecs/systems/plant-growth.js diff --git a/app/ecs-systems/reset-forces.js b/app/ecs/systems/reset-forces.js similarity index 100% rename from app/ecs-systems/reset-forces.js rename to app/ecs/systems/reset-forces.js diff --git a/app/ecs-systems/run-animations.js b/app/ecs/systems/run-animations.js similarity index 100% rename from app/ecs-systems/run-animations.js rename to app/ecs/systems/run-animations.js diff --git a/app/ecs-systems/run-ticking-promises.js b/app/ecs/systems/run-ticking-promises.js similarity index 100% rename from app/ecs-systems/run-ticking-promises.js rename to app/ecs/systems/run-ticking-promises.js diff --git a/app/ecs-systems/sprite-direction.js b/app/ecs/systems/sprite-direction.js similarity index 100% rename from app/ecs-systems/sprite-direction.js rename to app/ecs/systems/sprite-direction.js diff --git a/app/ecs-systems/visible-aabbs.js b/app/ecs/systems/visible-aabbs.js similarity index 100% rename from app/ecs-systems/visible-aabbs.js rename to app/ecs/systems/visible-aabbs.js diff --git a/app/ecs-systems/water.js b/app/ecs/systems/water.js similarity index 100% rename from app/ecs-systems/water.js rename to app/ecs/systems/water.js diff --git a/app/react/components/ui.jsx b/app/react/components/ui.jsx index 1d9e4db..73dd614 100644 --- a/app/react/components/ui.jsx +++ b/app/react/components/ui.jsx @@ -75,8 +75,8 @@ function Ui({disconnected}) { const [pendingMessage, setPendingMessage] = useState(''); useEffect(() => { async function setEcsStuff() { - const {default: Components} = await import('@/ecs-components/index.js'); - const {default: Systems} = await import('@/ecs-systems/index.js'); + const {default: Components} = await import('@/ecs/components/index.js'); + const {default: Systems} = await import('@/ecs/systems/index.js'); setComponents(Components); setSystems(Systems); }