Skip to content

Commit d1b7c13

Browse files
authored
Merge pull request #5 from ir-engine/IR-5373-Replace-GroupComponent-with-ObjectComponent-and-make-single-non-array-object
Replace GroupComponent with ObjectComponent
2 parents 36393cb + 6d0b825 commit d1b7c13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CustomLocationPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { CameraComponent } from '@ir-engine/spatial/src/camera/components/Camera
1616
import { NameComponent } from '@ir-engine/spatial/src/common/NameComponent'
1717
import { Vector3_Up } from '@ir-engine/spatial/src/common/constants/MathConstants'
1818
import { destroySpatialEngine, initializeSpatialEngine } from '@ir-engine/spatial/src/initializeEngine'
19-
import { addObjectToGroup } from '@ir-engine/spatial/src/renderer/components/GroupComponent'
19+
import { MeshComponent } from '@ir-engine/spatial/src/renderer/components/MeshComponent'
2020
import { VisibleComponent } from '@ir-engine/spatial/src/renderer/components/VisibleComponent'
2121
import { useEngineCanvas } from '@ir-engine/spatial/src/renderer/functions/useEngineCanvas'
2222
import { EntityTreeComponent } from '@ir-engine/spatial/src/transform/components/EntityTree'
@@ -57,7 +57,7 @@ const UpdateSystem = defineSystem({
5757

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

0 commit comments

Comments
 (0)