Skip to content

Commit

Permalink
Merge pull request #5 from ir-engine/IR-5373-Replace-GroupComponent-w…
Browse files Browse the repository at this point in the history
…ith-ObjectComponent-and-make-single-non-array-object

Replace GroupComponent with ObjectComponent
  • Loading branch information
HexaField authored Jan 3, 2025
2 parents 36393cb + 6d0b825 commit d1b7c13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CustomLocationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CameraComponent } from '@ir-engine/spatial/src/camera/components/Camera
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 { addObjectToGroup } from '@ir-engine/spatial/src/renderer/components/GroupComponent'
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'
Expand Down Expand Up @@ -57,7 +57,7 @@ const UpdateSystem = defineSystem({

// Create a box at the origin
const mesh = new Mesh(new BoxGeometry(1, 1, 1), new MeshBasicMaterial({ color: 0x00ff00 }))
addObjectToGroup(entity, mesh)
setComponent(entity, MeshComponent, mesh)
setComponent(entity, NameComponent, 'Box')
setComponent(entity, VisibleComponent)

Expand Down

0 comments on commit d1b7c13

Please sign in to comment.