Skip to content

Commit 2a1ce79

Browse files
committed
Schema
1 parent 845c307 commit 2a1ce79

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Hello2.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ECS } from '@ir-engine/ecs'
1+
import { ECS, S } from '@ir-engine/ecs'
22
import { PrimitiveGeometryComponent } from '@ir-engine/engine/src/scene/components/PrimitiveGeometryComponent'
33
import { GeometryTypeEnum } from '@ir-engine/engine/src/scene/constants/GeometryTypeEnum'
44
import { PhysicsSystem } from '@ir-engine/spatial'
@@ -11,10 +11,7 @@ import { Vector3 } from 'three'
1111
const HelloComponent = ECS.defineComponent({
1212
name: 'ee.hello-tutorial.HelloComponent',
1313
jsonID: 'EE_tutorial_hello',
14-
15-
onInit() {
16-
return { initialized: false }
17-
}
14+
schema: S.Object({ initialized: S.Bool(false) })
1815
})
1916

2017
// Define our query

0 commit comments

Comments
 (0)