Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from EtherealEngine/ecs-refactor
Browse files Browse the repository at this point in the history
Ecs refactor
  • Loading branch information
HexaField authored Jan 26, 2024
2 parents ddf9876 + a6421f1 commit fd65213
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/CustomLocationPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { useEffect } from 'react'

import Debug from '@etherealengine/client-core/src/components/Debug'
import { EngineState } from '@etherealengine/engine/src/ecs/classes/EngineState'
import { defineSystem } from '@etherealengine/engine/src/ecs/functions/SystemFunctions'
import '@etherealengine/engine/src/renderer/WebGLRendererSystem'
import { defineState, getMutableState, getState } from '@etherealengine/hyperflux'

Expand All @@ -14,12 +12,11 @@ import 'tailwindcss/tailwind.css'

import { BoxGeometry, Mesh, MeshBasicMaterial } from 'three'

import { Entity, createEntity, defineSystem, getComponent, setComponent } from '@etherealengine/ecs'
import { ECSState } from '@etherealengine/ecs/src/ECSState'
import { Engine } from '@etherealengine/ecs/src/Engine'
import { CameraComponent } from '@etherealengine/engine/src/camera/components/CameraComponent'
import { V_010 } from '@etherealengine/engine/src/common/constants/MathConstants'
import { Engine } from '@etherealengine/engine/src/ecs/classes/Engine'
import { Entity } from '@etherealengine/engine/src/ecs/classes/Entity'
import { getComponent, setComponent } from '@etherealengine/engine/src/ecs/functions/ComponentFunctions'
import { createEntity } from '@etherealengine/engine/src/ecs/functions/EntityFunctions'
import { addObjectToGroup } from '@etherealengine/engine/src/scene/components/GroupComponent'
import { NameComponent } from '@etherealengine/engine/src/scene/components/NameComponent'
import { TransformComponent } from '@etherealengine/engine/src/transform/components/TransformComponent'
Expand All @@ -37,7 +34,7 @@ const UpdateSystem = defineSystem({
insert: { before: TransformSystem },
execute: () => {
const entity = getState(SceneState).entity
const elapsedSeconds = getState(EngineState).elapsedSeconds
const elapsedSeconds = getState(ECSState).elapsedSeconds

const transformComponent = getComponent(entity, TransformComponent)

Expand Down
2 changes: 1 addition & 1 deletion src/engine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import React, { Suspense } from 'react'
/** @todo due to circular dependences, engine must be imported prior to other imports */
import '@etherealengine/engine/src/ecs/classes/Engine'
import { LoadingCircle } from '@etherealengine/client-core/src/components/LoadingCircle'
import { EngineState } from '@etherealengine/engine/src/ecs/classes/EngineState'
import { EngineState } from '@etherealengine/engine/src/EngineState'
import { initializeBrowser } from '@etherealengine/engine/src/initializeBrowser'
import { createEngine } from '@etherealengine/engine/src/initializeEngine'
import { getMutableState } from '@etherealengine/hyperflux'
Expand Down

0 comments on commit fd65213

Please sign in to comment.