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

Commit

Permalink
use reactive entity
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelEstes committed May 16, 2024
1 parent 201f251 commit 5d4575e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/examples/ExamplesComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export const examples: Example[] = [
Reactor: (props: { parent: Entity; onLoad: (entity: Entity) => void }) => {
const { parent, onLoad } = props
const entity = useExampleEntity(parent)
const childEntity = useExampleEntity(entity)

useEffect(() => {
setComponent(entity, NameComponent, 'Spline-Example')
Expand All @@ -308,7 +309,6 @@ export const examples: Example[] = [
setVisibleComponent(entity, true)
getComponent(entity, TransformComponent).position.set(0, 1.5, 0)

const childEntity = setupEntity(entity)
setComponent(childEntity, NameComponent, 'Spline-Follow-Example')
setComponent(childEntity, PrimitiveGeometryComponent, {
geometryType: GeometryTypeEnum.SphereGeometry,
Expand Down

0 comments on commit 5d4575e

Please sign in to comment.