Skip to content

Commit

Permalink
Merge pull request #6 from ir-engine/IR-4678-Fix-cross-imports-from-s…
Browse files Browse the repository at this point in the history
…patial-to-engine-package

Ir 4678 fix cross imports from spatial to engine package
  • Loading branch information
HexaField authored Jan 5, 2025
2 parents 06f31d0 + 372a596 commit c62a974
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/CustomLocationPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import '@ir-engine/client/src/engine'

import { UndefinedEntity, createEntity, defineSystem, getComponent, setComponent } from '@ir-engine/ecs'
import {
EntityTreeComponent,
UndefinedEntity,
createEntity,
defineSystem,
getComponent,
setComponent
} from '@ir-engine/ecs'
import { ECSState } from '@ir-engine/ecs/src/ECSState'
import { Engine } from '@ir-engine/ecs/src/Engine'
import {
Expand All @@ -11,15 +18,14 @@ import {
useMutableState,
useReactiveRef
} from '@ir-engine/hyperflux'
import { EngineState } from '@ir-engine/spatial/src/EngineState'
import { ReferenceSpaceState } from '@ir-engine/spatial'
import { CameraComponent } from '@ir-engine/spatial/src/camera/components/CameraComponent'
import { NameComponent } from '@ir-engine/spatial/src/common/NameComponent'
import { Vector3_Up } from '@ir-engine/spatial/src/common/constants/MathConstants'
import { destroySpatialEngine, initializeSpatialEngine } from '@ir-engine/spatial/src/initializeEngine'
import { MeshComponent } from '@ir-engine/spatial/src/renderer/components/MeshComponent'
import { VisibleComponent } from '@ir-engine/spatial/src/renderer/components/VisibleComponent'
import { useEngineCanvas } from '@ir-engine/spatial/src/renderer/functions/useEngineCanvas'
import { EntityTreeComponent } from '@ir-engine/spatial/src/transform/components/EntityTree'
import { TransformComponent } from '@ir-engine/spatial/src/transform/components/TransformComponent'
import { TransformSystem, computeTransformMatrix } from '@ir-engine/spatial/src/transform/systems/TransformSystem'

Expand All @@ -45,7 +51,7 @@ const UpdateSystem = defineSystem({
transformComponent.rotation.setFromAxisAngle(Vector3_Up, elapsedSeconds)
},
reactor: function () {
const viewerEntity = useMutableState(EngineState).viewerEntity.value
const viewerEntity = useMutableState(ReferenceSpaceState).viewerEntity.value

useEffect(() => {
if (!viewerEntity) return
Expand Down

0 comments on commit c62a974

Please sign in to comment.