Closed SupremeTechnopriest closed 3 years ago
Usage example:
import { Component, defineComponent } from 'bitecs'
const components: Map<string, Component> = new Map()
components.set('GameObject', defineComponent())
components.set('Transform', defineComponent({ x: 'f32', y: 'f32, z: 'f32' }))
tyty 🙏
This PR adds a union type to make working with components easier. It also exports the rest of the types.
Now you can use the
Component
type and all possible component types are supported.