Versions in this module Expand all Collapse all v0 v0.1.0 Feb 23, 2025 Changes in this version + func AddComp(w *World, e Entity, c Component) + func DelComp(w *World, e Entity, c Component) + func DelEntity(w *World, e Entity) + func GetComp[C any](w *World, e Entity, c Component) (data *C) + func HasComp(w *World, e Entity, c Component) bool + func SetComp[C any](w *World, e Entity, c Component, data C) + func Type(w *World, e Entity, nameComp Component) string + type Archetype struct + Comps []Storage + type ArchetypeEdge struct + type CachedQuery struct + func (q *CachedQuery) Free(w *World) + func (q *CachedQuery) Iter(yield func(enitty Entity, data []any) bool) + func (q *CachedQuery) Run(h func(entities []Entity, data []any)) + type Component Entity + func NewComponent(w *World) (c Component) + type ComponentMeta struct + TableType reflect.Type + type Entity uint64 + func NewEntity(w *World) (e Entity) + type EntityRecord struct + AT *Archetype + Row int + type Filter func(*World, *Archetype, *[]int) bool + func QueryAll(comps ...Component) Filter + func QueryAny(comps ...Component) Filter + func (f Filter) Cache(w *World) (q *CachedQuery) + func (f Filter) Iter(w *World) iter.Seq2[Entity, []any] + func (f Filter) Run(w *World, h func(entities []Entity, data []any)) + type IDManager struct + Freelist []uint64 + NextID uint64 + type Storage interface + Get func(i int) any + type Table []C + func (c *Table[C]) Get(i int) any + type Types []ComponentMeta + type World struct + Archetypes map[uint64]*Archetype + Components map[Component]map[*Archetype]int + Entities map[Entity]*EntityRecord + Queries Table[*CachedQuery] + Zero *Archetype + func NewWorld() (w *World)