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

Commit

Permalink
fix create engine
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Jul 2, 2024
1 parent 88ba49a commit 19b421f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/engine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ Ethereal Engine. All Rights Reserved.

import React, { Suspense } from 'react'

/** @todo due to circular dependences, engine must be imported prior to other imports */
import { LoadingCircle } from '@etherealengine/client-core/src/components/LoadingCircle'
import { getMutableState, getState } from '@etherealengine/hyperflux'
import { createEngine } from '@etherealengine/ecs/src/Engine'
import { getMutableState } from '@etherealengine/hyperflux'
import { EngineState } from '@etherealengine/spatial/src/EngineState'
import { createEngine } from '@etherealengine/spatial/src/initializeEngine'
import { ECSState } from '@etherealengine/ecs'
import { startTimer } from '@etherealengine/spatial/src/startTimer'

createEngine()
getState(ECSState).timer.start()
startTimer()
getMutableState(EngineState).publicPath.set(
// @ts-ignore
import.meta.env.BASE_URL === '/client/' ? location.origin : import.meta.env.BASE_URL!.slice(0, -1) // remove trailing '/'
Expand Down

0 comments on commit 19b421f

Please sign in to comment.