package ecs

Import Path
	github.com/mlange-42/ark/ecs (on go.dev)

Dependency Relation
	imports 10 packages, and imported by 2 packages

Involved Source Files archetype.go cache.go checks.go checks_nodebug.go column.go config.go constants.go Package ecs provides the core API of Ark, an Entity Component System (ECS) for Go. See the top-level module [github.com/mlange-42/ark] for an overview. 🕮 Also read Ark's [User Guide] and take a look at the [examples]! # Outline - [World] provides basic functionality that does not require generics, like [World.NewEntity], [World.Alive], [World.RemoveEntity], etc. - [Filter1], [Filter2], etc. provide filters for querying entities by their components. - [Query1], [Query2], etc. are the actual query iterators, and provide functionality like [Query1.Next], [Query1.Get] and [Query1.Entity]. - [Map1], [Map2], etc. provide access to and manipulation of multiple components. like [Map1.Get], [Map1.Add], [Map1.Remove], etc. - [Map] provides access to a single component, like [Map.Get] and [Map.Add], [Map.Remove]. - [Exchange1], [Exchange2] etc. allows to add, remove and exchange components. - [Resource] provides access the world's [Resources]. - [Observer], [Observer1], etc. allow to react on ECS operations. - See the separate module [ark-serde] for serialization. # ECS Manipulations This section gives an overview on how to achieve typical ECS operations in Ark. Access data: - Create a filter: [NewFilter2]. - Create a [Query2]: [Filter2.Query]. - Iterate a Query: [Query2.Next], [Query2.NextTable], [Query2.Get], [Query2.GetColumns]. - Access components of entities: [Map.Get], [Map2.Get]. - Access relationship targets: [Map.GetRelation], [Map2.GetRelation]. Manipulate a single [Entity]: - Create an entity: [World.NewEntity] - Create an entity with components: [Map2.NewEntity], [Map2.NewEntityFn]. - Add components to an entity: [Map.Add], [Map.AddFn], [Map2.Add], [Map2.AddFn], [Exchange2.Add], [Exchange2.AddFn]. - Remove components from an entity: [Map.Remove], [Map2.Remove], [Exchange2.Remove]. - Exchange components of an entity: [Exchange2.Exchange], [Exchange2.ExchangeFn]. - Change relationship targets: [Map.SetRelation], [Map2.SetRelations]. - Remove an entity from the world: [World.RemoveEntity]. Manipulate entities in batches: - Create entities: [World.NewEntities] - Create entities with components: [Map2.NewBatch], [Map2.NewBatchFn]. - Add components to entities: [Map2.AddBatch], [Map2.AddBatchFn], [Exchange2.AddBatch], [Exchange2.AddBatchFn]. - Remove components from entities: [Map2.RemoveBatch], [Exchange2.RemoveBatch]. - Exchange components of entities: [Exchange2.ExchangeBatch], [Exchange2.ExchangeBatchFn]. - Change relationship targets: [Map2.SetRelationsBatch]. - Remove entities from the world: [World.RemoveEntities]. # Build tags Ark provides two build tags: - ark_tiny: Reduces the maximum number of components to 64, for faster mask-related operations and smaller archetype memory footprint. - ark_debug: Improves error messages on incorrect use, at the cost of performance. Use this if you get panics from queries or maps. When building your application, use them like this: go build -tags ark_tiny . go build -tags ark_debug . go build -tags ark_tiny,ark_debug . entity.go events.go exchange_gen.go filter.go filter_gen.go functions.go graph.go id_map.go lock.go map.go maps_func.go maps_gen.go mask256.go mask64.go mask_notiny.go observer.go observers_gen.go pool.go query.go query_count.go query_gen.go query_nodebug.go query_nodebug_gen.go registry.go relation.go resource.go resources.go storage.go table.go types.go unsafe.go util.go world.go world_internal.go
Package-Level Type Names (total 63)
/* sort by: | */
Batch is like a filter for batch processing of entities. Create it using [Filter2.Batch] etc. ⚠️ This should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter2.Batch] with different relationship targets may modify stored instances. func (*Filter0).Batch(rel ...Relation) Batch func (*Filter1)[A].Batch(rel ...Relation) Batch func (*Filter2)[A, B].Batch(rel ...Relation) Batch func (*Filter3)[A, B, C].Batch(rel ...Relation) Batch func (*Filter4)[A, B, C, D].Batch(rel ...Relation) Batch func (*Filter5)[A, B, C, D, E].Batch(rel ...Relation) Batch func (*Filter6)[A, B, C, D, E, F].Batch(rel ...Relation) Batch func (*Filter7)[A, B, C, D, E, F, G].Batch(rel ...Relation) Batch func (*Filter8)[A, B, C, D, E, F, G, H].Batch(rel ...Relation) Batch func (*Exchange1)[A].AddBatch(batch Batch, a *A, rel ...Relation) func (*Exchange1)[A].AddBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Exchange1)[A].ExchangeBatch(batch Batch, a *A, rel ...Relation) func (*Exchange1)[A].ExchangeBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Exchange1)[A].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange2)[A, B].AddBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].AddBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Exchange2)[A, B].ExchangeBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Exchange2)[A, B].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange3)[A, B, C].AddBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].ExchangeBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange4)[A, B, C, D].AddBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange5)[A, B, C, D, E].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange6)[A, B, C, D, E, F].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange7)[A, B, C, D, E, F, G].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Exchange8)[A, B, C, D, E, F, G, H].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map)[T].AddBatch(batch Batch, comp *T, target ...Entity) func (*Map)[T].AddBatchFn(batch Batch, fn func(Entity, *T), target ...Entity) func (*Map)[T].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map)[T].SetRelationBatch(batch Batch, target Entity, fn func(entity Entity)) func (*Map1)[A].AddBatch(batch Batch, a *A, rel ...Relation) func (*Map1)[A].AddBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Map1)[A].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map1)[A].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map10)[A, B, C, D, E, F, G, H, I, J].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map2)[A, B].AddBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Map2)[A, B].AddBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Map2)[A, B].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map2)[A, B].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map3)[A, B, C].AddBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Map3)[A, B, C].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Map3)[A, B, C].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map3)[A, B, C].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map4)[A, B, C, D].AddBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Map4)[A, B, C, D].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Map4)[A, B, C, D].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map4)[A, B, C, D].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map5)[A, B, C, D, E].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Map5)[A, B, C, D, E].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Map5)[A, B, C, D, E].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map5)[A, B, C, D, E].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Map6)[A, B, C, D, E, F].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map6)[A, B, C, D, E, F].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map7)[A, B, C, D, E, F, G].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map8)[A, B, C, D, E, F, G, H].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].RemoveBatch(batch Batch, fn func(entity Entity)) func (*Map9)[A, B, C, D, E, F, G, H, I].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*World).RemoveEntities(batch Batch, fn func(entity Entity))
Comp is a helper to pass component types to functions and methods. Use function [C] to create one. Type returns the reflect.Type of the component. func C[T]() Comp func Event.For(comps ...Comp) Event func (*Exchange1)[A].Removes(components ...Comp) *Exchange1[A] func (*Exchange2)[A, B].Removes(components ...Comp) *Exchange2[A, B] func (*Exchange3)[A, B, C].Removes(components ...Comp) *Exchange3[A, B, C] func (*Exchange4)[A, B, C, D].Removes(components ...Comp) *Exchange4[A, B, C, D] func (*Exchange5)[A, B, C, D, E].Removes(components ...Comp) *Exchange5[A, B, C, D, E] func (*Exchange6)[A, B, C, D, E, F].Removes(components ...Comp) *Exchange6[A, B, C, D, E, F] func (*Exchange7)[A, B, C, D, E, F, G].Removes(components ...Comp) *Exchange7[A, B, C, D, E, F, G] func (*Exchange8)[A, B, C, D, E, F, G, H].Removes(components ...Comp) *Exchange8[A, B, C, D, E, F, G, H] func (*Filter0).With(comps ...Comp) *Filter0 func (*Filter0).Without(comps ...Comp) *Filter0 func (*Filter1)[A].With(comps ...Comp) *Filter1[A] func (*Filter1)[A].Without(comps ...Comp) *Filter1[A] func (*Filter2)[A, B].With(comps ...Comp) *Filter2[A, B] func (*Filter2)[A, B].Without(comps ...Comp) *Filter2[A, B] func (*Filter3)[A, B, C].With(comps ...Comp) *Filter3[A, B, C] func (*Filter3)[A, B, C].Without(comps ...Comp) *Filter3[A, B, C] func (*Filter4)[A, B, C, D].With(comps ...Comp) *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].Without(comps ...Comp) *Filter4[A, B, C, D] func (*Filter5)[A, B, C, D, E].With(comps ...Comp) *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Without(comps ...Comp) *Filter5[A, B, C, D, E] func (*Filter6)[A, B, C, D, E, F].With(comps ...Comp) *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Without(comps ...Comp) *Filter6[A, B, C, D, E, F] func (*Filter7)[A, B, C, D, E, F, G].With(comps ...Comp) *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Without(comps ...Comp) *Filter7[A, B, C, D, E, F, G] func (*Filter8)[A, B, C, D, E, F, G, H].With(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Without(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H] func (*Observer).For(comps ...Comp) *Observer func (*Observer).With(comps ...Comp) *Observer func (*Observer).Without(comps ...Comp) *Observer func (*Observer1)[A].For(comps ...Comp) *Observer1[A] func (*Observer1)[A].With(comps ...Comp) *Observer1[A] func (*Observer1)[A].Without(comps ...Comp) *Observer1[A] func (*Observer2)[A, B].For(comps ...Comp) *Observer2[A, B] func (*Observer2)[A, B].With(comps ...Comp) *Observer2[A, B] func (*Observer2)[A, B].Without(comps ...Comp) *Observer2[A, B] func (*Observer3)[A, B, C].For(comps ...Comp) *Observer3[A, B, C] func (*Observer3)[A, B, C].With(comps ...Comp) *Observer3[A, B, C] func (*Observer3)[A, B, C].Without(comps ...Comp) *Observer3[A, B, C] func (*Observer4)[A, B, C, D].For(comps ...Comp) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].With(comps ...Comp) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Without(comps ...Comp) *Observer4[A, B, C, D]
CompInfo provides information about a registered component. Returned by [ComponentInfo]. ID ID IsRelation bool Type reflect.Type func ComponentInfo(w *World, id ID) (CompInfo, bool)
Entity is an identifier for entities. Can be stored safely in components, resources or elsewhere. For stored entities, it may be necessary to check their alive status with [World.Alive]. ⚠️ Always store entities by value, never by pointer! In Ark, entities are returned to a pool when they are removed from the world. These entities can be recycled, with the same ID ([Entity.ID]), but an incremented generation ([Entity.Gen]). This allows to determine whether an entity hold by the user is still alive, despite it was potentially recycled. AppendBinary appends the binary representation of the entity to the given slice, for serialization and networking purposes. Gen returns the entity's generation, primarily for debugging purposes. ID returns the entity's ID, primarily for debugging purposes. IsZero returns whether this entity is the reserved zero entity. MarshalBinary returns a binary representation of the entity, for serialization and networking purposes. MarshalJSON returns a JSON representation of the entity, for serialization purposes. The JSON representation of an entity is a two-element array of entity ID and generation. UnmarshalBinary into an entity. For serialization and networking purposes only. Do not use this to create entities! UnmarshalJSON into an entity. For serialization purposes only. Do not use this to create entities! Entity : github.com/goccy/go-json.Marshaler *Entity : github.com/goccy/go-json.Unmarshaler *Entity : encoding.BinaryAppender *Entity : encoding.BinaryMarshaler *Entity : encoding.BinaryUnmarshaler Entity : encoding/json/v2.Marshaler *Entity : encoding/json/v2.Unmarshaler Entity : go.yaml.in/yaml/v3.IsZeroer Entity : gopkg.in/yaml.v3.IsZeroer func (*Map)[T].GetRelation(entity Entity) Entity func (*Map)[T].GetRelationUnchecked(entity Entity) Entity func (*Map)[T].NewEntity(comp *T, target ...Entity) Entity func (*Map)[T].NewEntityFn(fn func(*T), target ...Entity) Entity func (*Map1)[A].GetRelation(entity Entity, index int) Entity func (*Map1)[A].GetRelationUnchecked(entity Entity, index int) Entity func (*Map1)[A].NewEntity(a *A, rel ...Relation) Entity func (*Map1)[A].NewEntityFn(fn func(*A), rel ...Relation) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].GetRelation(entity Entity, index int) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].GetRelationUnchecked(entity Entity, index int) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].GetRelation(entity Entity, index int) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].GetRelationUnchecked(entity Entity, index int) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].GetRelation(entity Entity, index int) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].GetRelationUnchecked(entity Entity, index int) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) Entity func (*Map2)[A, B].GetRelation(entity Entity, index int) Entity func (*Map2)[A, B].GetRelationUnchecked(entity Entity, index int) Entity func (*Map2)[A, B].NewEntity(a *A, b *B, rel ...Relation) Entity func (*Map2)[A, B].NewEntityFn(fn func(*A, *B), rel ...Relation) Entity func (*Map3)[A, B, C].GetRelation(entity Entity, index int) Entity func (*Map3)[A, B, C].GetRelationUnchecked(entity Entity, index int) Entity func (*Map3)[A, B, C].NewEntity(a *A, b *B, c *C, rel ...Relation) Entity func (*Map3)[A, B, C].NewEntityFn(fn func(*A, *B, *C), rel ...Relation) Entity func (*Map4)[A, B, C, D].GetRelation(entity Entity, index int) Entity func (*Map4)[A, B, C, D].GetRelationUnchecked(entity Entity, index int) Entity func (*Map4)[A, B, C, D].NewEntity(a *A, b *B, c *C, d *D, rel ...Relation) Entity func (*Map4)[A, B, C, D].NewEntityFn(fn func(*A, *B, *C, *D), rel ...Relation) Entity func (*Map5)[A, B, C, D, E].GetRelation(entity Entity, index int) Entity func (*Map5)[A, B, C, D, E].GetRelationUnchecked(entity Entity, index int) Entity func (*Map5)[A, B, C, D, E].NewEntity(a *A, b *B, c *C, d *D, e *E, rel ...Relation) Entity func (*Map5)[A, B, C, D, E].NewEntityFn(fn func(*A, *B, *C, *D, *E), rel ...Relation) Entity func (*Map6)[A, B, C, D, E, F].GetRelation(entity Entity, index int) Entity func (*Map6)[A, B, C, D, E, F].GetRelationUnchecked(entity Entity, index int) Entity func (*Map6)[A, B, C, D, E, F].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) Entity func (*Map6)[A, B, C, D, E, F].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) Entity func (*Map7)[A, B, C, D, E, F, G].GetRelation(entity Entity, index int) Entity func (*Map7)[A, B, C, D, E, F, G].GetRelationUnchecked(entity Entity, index int) Entity func (*Map7)[A, B, C, D, E, F, G].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) Entity func (*Map7)[A, B, C, D, E, F, G].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) Entity func (*Map8)[A, B, C, D, E, F, G, H].GetRelation(entity Entity, index int) Entity func (*Map8)[A, B, C, D, E, F, G, H].GetRelationUnchecked(entity Entity, index int) Entity func (*Map8)[A, B, C, D, E, F, G, H].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) Entity func (*Map8)[A, B, C, D, E, F, G, H].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].GetRelation(entity Entity, index int) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].GetRelationUnchecked(entity Entity, index int) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) Entity func (*Query0).Entities() []Entity func (*Query0).Entity() Entity func (*Query0).EntityAt(index int) Entity func (*Query1)[A].Entities() []Entity func (*Query1)[A].Entity() Entity func (*Query1)[A].EntityAt(index int) Entity func (*Query1)[A].GetRelation(index int) Entity func (*Query2)[A, B].Entities() []Entity func (*Query2)[A, B].Entity() Entity func (*Query2)[A, B].EntityAt(index int) Entity func (*Query2)[A, B].GetRelation(index int) Entity func (*Query3)[A, B, C].Entities() []Entity func (*Query3)[A, B, C].Entity() Entity func (*Query3)[A, B, C].EntityAt(index int) Entity func (*Query3)[A, B, C].GetRelation(index int) Entity func (*Query4)[A, B, C, D].Entities() []Entity func (*Query4)[A, B, C, D].Entity() Entity func (*Query4)[A, B, C, D].EntityAt(index int) Entity func (*Query4)[A, B, C, D].GetRelation(index int) Entity func (*Query5)[A, B, C, D, E].Entities() []Entity func (*Query5)[A, B, C, D, E].Entity() Entity func (*Query5)[A, B, C, D, E].EntityAt(index int) Entity func (*Query5)[A, B, C, D, E].GetRelation(index int) Entity func (*Query6)[A, B, C, D, E, F].Entities() []Entity func (*Query6)[A, B, C, D, E, F].Entity() Entity func (*Query6)[A, B, C, D, E, F].EntityAt(index int) Entity func (*Query6)[A, B, C, D, E, F].GetRelation(index int) Entity func (*Query7)[A, B, C, D, E, F, G].Entities() []Entity func (*Query7)[A, B, C, D, E, F, G].Entity() Entity func (*Query7)[A, B, C, D, E, F, G].EntityAt(index int) Entity func (*Query7)[A, B, C, D, E, F, G].GetRelation(index int) Entity func (*Query8)[A, B, C, D, E, F, G, H].Entities() []Entity func (*Query8)[A, B, C, D, E, F, G, H].Entity() Entity func (*Query8)[A, B, C, D, E, F, G, H].EntityAt(index int) Entity func (*Query8)[A, B, C, D, E, F, G, H].GetRelation(index int) Entity func Unsafe.GetRelation(entity Entity, comp ID) Entity func Unsafe.GetRelationUnchecked(entity Entity, comp ID) Entity func Unsafe.NewEntity(ids ...ID) Entity func Unsafe.NewEntityRel(ids []ID, relations ...Relation) Entity func (*UnsafeQuery).Entity() Entity func (*UnsafeQuery).EntityAt(index int) Entity func (*UnsafeQuery).GetRelation(comp ID) Entity func (*World).CopyEntity(e Entity) Entity func (*World).NewEntity() Entity func github.com/pancsta/asyncmachine-go/pkg/integrations/ark.(*PubSub).AddPeer(id string) (Entity, error) func github.com/pancsta/asyncmachine-go/pkg/integrations/ark.(*PubSub).AddTopic(name string) (Entity, error) func Rel[C](target Entity) Relation func RelID(id ID, target Entity) Relation func RelIdx(index int, target Entity) Relation func Event.Emit(entity Entity) func (*Exchange1)[A].Add(entity Entity, a *A, rel ...Relation) func (*Exchange1)[A].AddFn(entity Entity, fn func(*A), rel ...Relation) func (*Exchange1)[A].Exchange(entity Entity, a *A, rel ...Relation) func (*Exchange1)[A].ExchangeFn(entity Entity, fn func(*A), rel ...Relation) func (*Exchange1)[A].Remove(entity Entity) func (*Exchange2)[A, B].Add(entity Entity, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].AddFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Exchange2)[A, B].Exchange(entity Entity, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].ExchangeFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Exchange2)[A, B].Remove(entity Entity) func (*Exchange3)[A, B, C].Add(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].AddFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].Exchange(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].ExchangeFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].Remove(entity Entity) func (*Exchange4)[A, B, C, D].Add(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].AddFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].Exchange(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].Remove(entity Entity) func (*Exchange5)[A, B, C, D, E].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].Remove(entity Entity) func (*Exchange6)[A, B, C, D, E, F].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].Remove(entity Entity) func (*Exchange7)[A, B, C, D, E, F, G].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].Remove(entity Entity) func (*Exchange8)[A, B, C, D, E, F, G, H].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].Remove(entity Entity) func (*Map)[T].Add(entity Entity, comp *T, target ...Entity) func (*Map)[T].Add(entity Entity, comp *T, target ...Entity) func (*Map)[T].AddBatch(batch Batch, comp *T, target ...Entity) func (*Map)[T].AddBatchFn(batch Batch, fn func(Entity, *T), target ...Entity) func (*Map)[T].AddFn(entity Entity, fn func(*T), target ...Entity) func (*Map)[T].AddFn(entity Entity, fn func(*T), target ...Entity) func (*Map)[T].Get(entity Entity) *T func (*Map)[T].GetRelation(entity Entity) Entity func (*Map)[T].GetRelationUnchecked(entity Entity) Entity func (*Map)[T].GetUnchecked(entity Entity) *T func (*Map)[T].Has(entity Entity) bool func (*Map)[T].HasUnchecked(entity Entity) bool func (*Map)[T].NewBatch(count int, comp *T, target ...Entity) func (*Map)[T].NewBatchFn(count int, fn func(Entity, *T), target ...Entity) func (*Map)[T].NewEntity(comp *T, target ...Entity) Entity func (*Map)[T].NewEntityFn(fn func(*T), target ...Entity) Entity func (*Map)[T].Remove(entity Entity) func (*Map)[T].Set(entity Entity, comp *T) func (*Map)[T].SetRelation(entity Entity, target Entity) func (*Map)[T].SetRelation(entity Entity, target Entity) func (*Map)[T].SetRelationBatch(batch Batch, target Entity, fn func(entity Entity)) func (*Map1)[A].Add(entity Entity, a *A, rel ...Relation) func (*Map1)[A].AddFn(entity Entity, fn func(*A), rel ...Relation) func (*Map1)[A].Get(entity Entity) *A func (*Map1)[A].GetRelation(entity Entity, index int) Entity func (*Map1)[A].GetRelationUnchecked(entity Entity, index int) Entity func (*Map1)[A].GetUnchecked(entity Entity) *A func (*Map1)[A].HasAll(entity Entity) bool func (*Map1)[A].Remove(entity Entity) func (*Map1)[A].Set(entity Entity, a *A) func (*Map1)[A].SetRelations(entity Entity, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J) func (*Map10)[A, B, C, D, E, F, G, H, I, J].GetRelation(entity Entity, index int) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].GetRelationUnchecked(entity Entity, index int) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J) func (*Map10)[A, B, C, D, E, F, G, H, I, J].HasAll(entity Entity) bool func (*Map10)[A, B, C, D, E, F, G, H, I, J].Remove(entity Entity) func (*Map10)[A, B, C, D, E, F, G, H, I, J].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J) func (*Map10)[A, B, C, D, E, F, G, H, I, J].SetRelations(entity Entity, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].GetRelation(entity Entity, index int) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].GetRelationUnchecked(entity Entity, index int) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].HasAll(entity Entity) bool func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].Remove(entity Entity) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].SetRelations(entity Entity, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].GetRelation(entity Entity, index int) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].GetRelationUnchecked(entity Entity, index int) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].HasAll(entity Entity) bool func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].Remove(entity Entity) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].SetRelations(entity Entity, rel ...Relation) func (*Map2)[A, B].Add(entity Entity, a *A, b *B, rel ...Relation) func (*Map2)[A, B].AddFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Map2)[A, B].Get(entity Entity) (*A, *B) func (*Map2)[A, B].GetRelation(entity Entity, index int) Entity func (*Map2)[A, B].GetRelationUnchecked(entity Entity, index int) Entity func (*Map2)[A, B].GetUnchecked(entity Entity) (*A, *B) func (*Map2)[A, B].HasAll(entity Entity) bool func (*Map2)[A, B].Remove(entity Entity) func (*Map2)[A, B].Set(entity Entity, a *A, b *B) func (*Map2)[A, B].SetRelations(entity Entity, rel ...Relation) func (*Map3)[A, B, C].Add(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Map3)[A, B, C].AddFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Map3)[A, B, C].Get(entity Entity) (*A, *B, *C) func (*Map3)[A, B, C].GetRelation(entity Entity, index int) Entity func (*Map3)[A, B, C].GetRelationUnchecked(entity Entity, index int) Entity func (*Map3)[A, B, C].GetUnchecked(entity Entity) (*A, *B, *C) func (*Map3)[A, B, C].HasAll(entity Entity) bool func (*Map3)[A, B, C].Remove(entity Entity) func (*Map3)[A, B, C].Set(entity Entity, a *A, b *B, c *C) func (*Map3)[A, B, C].SetRelations(entity Entity, rel ...Relation) func (*Map4)[A, B, C, D].Add(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Map4)[A, B, C, D].AddFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Map4)[A, B, C, D].Get(entity Entity) (*A, *B, *C, *D) func (*Map4)[A, B, C, D].GetRelation(entity Entity, index int) Entity func (*Map4)[A, B, C, D].GetRelationUnchecked(entity Entity, index int) Entity func (*Map4)[A, B, C, D].GetUnchecked(entity Entity) (*A, *B, *C, *D) func (*Map4)[A, B, C, D].HasAll(entity Entity) bool func (*Map4)[A, B, C, D].Remove(entity Entity) func (*Map4)[A, B, C, D].Set(entity Entity, a *A, b *B, c *C, d *D) func (*Map4)[A, B, C, D].SetRelations(entity Entity, rel ...Relation) func (*Map5)[A, B, C, D, E].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Map5)[A, B, C, D, E].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Map5)[A, B, C, D, E].Get(entity Entity) (*A, *B, *C, *D, *E) func (*Map5)[A, B, C, D, E].GetRelation(entity Entity, index int) Entity func (*Map5)[A, B, C, D, E].GetRelationUnchecked(entity Entity, index int) Entity func (*Map5)[A, B, C, D, E].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E) func (*Map5)[A, B, C, D, E].HasAll(entity Entity) bool func (*Map5)[A, B, C, D, E].Remove(entity Entity) func (*Map5)[A, B, C, D, E].Set(entity Entity, a *A, b *B, c *C, d *D, e *E) func (*Map5)[A, B, C, D, E].SetRelations(entity Entity, rel ...Relation) func (*Map6)[A, B, C, D, E, F].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Map6)[A, B, C, D, E, F].Get(entity Entity) (*A, *B, *C, *D, *E, *F) func (*Map6)[A, B, C, D, E, F].GetRelation(entity Entity, index int) Entity func (*Map6)[A, B, C, D, E, F].GetRelationUnchecked(entity Entity, index int) Entity func (*Map6)[A, B, C, D, E, F].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F) func (*Map6)[A, B, C, D, E, F].HasAll(entity Entity) bool func (*Map6)[A, B, C, D, E, F].Remove(entity Entity) func (*Map6)[A, B, C, D, E, F].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F) func (*Map6)[A, B, C, D, E, F].SetRelations(entity Entity, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G) func (*Map7)[A, B, C, D, E, F, G].GetRelation(entity Entity, index int) Entity func (*Map7)[A, B, C, D, E, F, G].GetRelationUnchecked(entity Entity, index int) Entity func (*Map7)[A, B, C, D, E, F, G].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G) func (*Map7)[A, B, C, D, E, F, G].HasAll(entity Entity) bool func (*Map7)[A, B, C, D, E, F, G].Remove(entity Entity) func (*Map7)[A, B, C, D, E, F, G].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G) func (*Map7)[A, B, C, D, E, F, G].SetRelations(entity Entity, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H) func (*Map8)[A, B, C, D, E, F, G, H].GetRelation(entity Entity, index int) Entity func (*Map8)[A, B, C, D, E, F, G, H].GetRelationUnchecked(entity Entity, index int) Entity func (*Map8)[A, B, C, D, E, F, G, H].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H) func (*Map8)[A, B, C, D, E, F, G, H].HasAll(entity Entity) bool func (*Map8)[A, B, C, D, E, F, G, H].Remove(entity Entity) func (*Map8)[A, B, C, D, E, F, G, H].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H) func (*Map8)[A, B, C, D, E, F, G, H].SetRelations(entity Entity, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].Get(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I) func (*Map9)[A, B, C, D, E, F, G, H, I].GetRelation(entity Entity, index int) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].GetRelationUnchecked(entity Entity, index int) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].GetUnchecked(entity Entity) (*A, *B, *C, *D, *E, *F, *G, *H, *I) func (*Map9)[A, B, C, D, E, F, G, H, I].HasAll(entity Entity) bool func (*Map9)[A, B, C, D, E, F, G, H, I].Remove(entity Entity) func (*Map9)[A, B, C, D, E, F, G, H, I].Set(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I) func (*Map9)[A, B, C, D, E, F, G, H, I].SetRelations(entity Entity, rel ...Relation) func Unsafe.Add(entity Entity, comp ...ID) func Unsafe.AddRel(entity Entity, comps []ID, relations ...Relation) func Unsafe.Exchange(entity Entity, add []ID, remove []ID, relations ...Relation) func Unsafe.Get(entity Entity, comp ID) unsafe.Pointer func Unsafe.GetRelation(entity Entity, comp ID) Entity func Unsafe.GetRelationUnchecked(entity Entity, comp ID) Entity func Unsafe.GetUnchecked(entity Entity, comp ID) unsafe.Pointer func Unsafe.Has(entity Entity, comp ID) bool func Unsafe.HasUnchecked(entity Entity, comp ID) bool func Unsafe.IDs(entity Entity) IDs func Unsafe.Remove(entity Entity, comp ...ID) func Unsafe.SetRelations(entity Entity, relations ...Relation) func (*World).Alive(entity Entity) bool func (*World).CopyEntity(e Entity) Entity func (*World).RemoveEntity(entity Entity)
EntityDump is a dump of the entire entity data of the world. See [Unsafe.DumpEntities] and [Unsafe.LoadEntities]. // IDs of all alive entities in query iteration order. // The number of allocated and available entities in the World's entity pool. // Entities in the World's entity pool. // The next free entity of the World's entity pool. func Unsafe.DumpEntities() EntityDump func Unsafe.LoadEntities(data *EntityDump)
Event is a custom event. Create events using [World.Event]. Create custom event types using an [EventRegistry]. Emit the event for the given entity. For sets the event's component types. Optional. For best performance, store the event after setting component types, and re-use afterwards. func Event.For(comps ...Comp) Event func (*World).Event(tp EventType) Event
EventRegistry for creating new custom event types (see [EventType]). Your application should have a single, global EventRegistry. Using event types from multiple registries in the same [World] leads to conflicts. NewEventType creates a new EventType for custom events. Custom event types should be stored in global variables. The maximum number of event types is limited to 256, with 7 predefined and 249 potential custom types. See [Event] and [World.Event] for using custom events.
EventType is the type for event identifiers. See below for predefined event types. Use an [EventRegistry] to create custom events types. See [Event] and [World.Event] for using custom events. See [Observer] for details on events and observers. func (*EventRegistry).NewEventType() EventType func Observe(evt EventType) *Observer func Observe1[A](evt EventType) *Observer1[A] func Observe2[A, B](evt EventType) *Observer2[A, B] func Observe3[A, B, C](evt EventType) *Observer3[A, B, C] func Observe4[A, B, C, D](evt EventType) *Observer4[A, B, C, D] func (*Observer).New(evt EventType) *Observer func (*Observer1)[A].New(evt EventType) *Observer1[A] func (*Observer2)[A, B].New(evt EventType) *Observer2[A, B] func (*Observer3)[A, B, C].New(evt EventType) *Observer3[A, B, C] func (*Observer4)[A, B, C, D].New(evt EventType) *Observer4[A, B, C, D] func (*World).Event(tp EventType) Event const OnAddComponents const OnAddRelations const OnCreateEntity const OnRemoveComponents const OnRemoveEntity const OnRemoveRelations const OnSetComponents
Type Parameters: A: any Exchange1 allows to exchange components of entities. It adds the given components. Use [Exchange1.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange1.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange1.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange1]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange1.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange1.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange1] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange1[A](world *World) *Exchange1[A] func (*Exchange1)[A].New(world *World) *Exchange1[A] func (*Exchange1)[A].Removes(components ...Comp) *Exchange1[A]
Type Parameters: A: any B: any Exchange2 allows to exchange components of entities. It adds the given components. Use [Exchange2.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange2.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange2.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange2]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. Remove the components previously specified with [Exchange2.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange2.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange2] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange2[A, B](world *World) *Exchange2[A, B] func (*Exchange2)[A, B].New(world *World) *Exchange2[A, B] func (*Exchange2)[A, B].Removes(components ...Comp) *Exchange2[A, B]
Type Parameters: A: any B: any C: any Exchange3 allows to exchange components of entities. It adds the given components. Use [Exchange3.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange3.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange3.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange3]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange3.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange3.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange3] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange3[A, B, C](world *World) *Exchange3[A, B, C] func (*Exchange3)[A, B, C].New(world *World) *Exchange3[A, B, C] func (*Exchange3)[A, B, C].Removes(components ...Comp) *Exchange3[A, B, C]
Type Parameters: A: any B: any C: any D: any Exchange4 allows to exchange components of entities. It adds the given components. Use [Exchange4.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange4.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange4.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange4]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange4.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange4.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange4] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange4[A, B, C, D](world *World) *Exchange4[A, B, C, D] func (*Exchange4)[A, B, C, D].New(world *World) *Exchange4[A, B, C, D] func (*Exchange4)[A, B, C, D].Removes(components ...Comp) *Exchange4[A, B, C, D]
Type Parameters: A: any B: any C: any D: any E: any Exchange5 allows to exchange components of entities. It adds the given components. Use [Exchange5.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange5.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange5.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange5]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange5.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange5.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange5] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange5[A, B, C, D, E](world *World) *Exchange5[A, B, C, D, E] func (*Exchange5)[A, B, C, D, E].New(world *World) *Exchange5[A, B, C, D, E] func (*Exchange5)[A, B, C, D, E].Removes(components ...Comp) *Exchange5[A, B, C, D, E]
Type Parameters: A: any B: any C: any D: any E: any F: any Exchange6 allows to exchange components of entities. It adds the given components. Use [Exchange6.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange6.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange6.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange6]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange6.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange6.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange6] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange6[A, B, C, D, E, F](world *World) *Exchange6[A, B, C, D, E, F] func (*Exchange6)[A, B, C, D, E, F].New(world *World) *Exchange6[A, B, C, D, E, F] func (*Exchange6)[A, B, C, D, E, F].Removes(components ...Comp) *Exchange6[A, B, C, D, E, F]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any Exchange7 allows to exchange components of entities. It adds the given components. Use [Exchange7.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange7.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange7.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange7]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange7.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange7.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange7] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange7[A, B, C, D, E, F, G](world *World) *Exchange7[A, B, C, D, E, F, G] func (*Exchange7)[A, B, C, D, E, F, G].New(world *World) *Exchange7[A, B, C, D, E, F, G] func (*Exchange7)[A, B, C, D, E, F, G].Removes(components ...Comp) *Exchange7[A, B, C, D, E, F, G]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any Exchange8 allows to exchange components of entities. It adds the given components. Use [Exchange8.Removes] to set components to be removed. Instances should be created during initialization and stored, e.g. in systems. See [Exchange2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Exchange performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange8.Removes]. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatch performs the exchange on all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ExchangeBatchFn performs the exchange on all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! ExchangeFn performs the exchange on the given entity, adding the provided components and removing those previously specified with [Exchange8.Removes]. It runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! New creates a new [Exchange8]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Exchange2.New] for an example. Remove the components previously specified with [Exchange8.Removes] from the given entity. RemoveBatch removes the components previously specified with [Exchange8.Removes] from all entities matching the given batch filter, running the given function on each. The function can be nil. Removes sets the components that this [Exchange8] removes. Can be called multiple times in chains, or once with multiple arguments. func NewExchange8[A, B, C, D, E, F, G, H](world *World) *Exchange8[A, B, C, D, E, F, G, H] func (*Exchange8)[A, B, C, D, E, F, G, H].New(world *World) *Exchange8[A, B, C, D, E, F, G, H] func (*Exchange8)[A, B, C, D, E, F, G, H].Removes(components ...Comp) *Exchange8[A, B, C, D, E, F, G, H]
Filter0 is a filter for 0 components. Used to create [Query0] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter0.Relations]. Relation components must be in the filter's parameters or added via [Filter0.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter0.Batch] or [Filter0.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter0.With]. Overwrites components set via [Filter0.Without]. New creates a new [Filter0]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query0] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter0.Relations]. Relation components must be in the filter's parameters or added via [Filter0.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter0.Query] or [Filter0.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter0.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter0(world *World) *Filter0 func (*Filter0).Exclusive() *Filter0 func (*Filter0).New(world *World) *Filter0 func (*Filter0).Register() *Filter0 func (*Filter0).Relations(rel ...Relation) *Filter0 func (*Filter0).With(comps ...Comp) *Filter0 func (*Filter0).Without(comps ...Comp) *Filter0
Type Parameters: A: any Filter1 is a filter for 1 components. Used to create [Query1] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter1.Relations]. Relation components must be in the filter's parameters or added via [Filter1.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter1.Batch] or [Filter1.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter1.With]. Overwrites components set via [Filter1.Without]. New creates a new [Filter1]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query1] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter1.Relations]. Relation components must be in the filter's parameters or added via [Filter1.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter1.Query] or [Filter1.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter1.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter1[A](world *World) *Filter1[A] func (*Filter1)[A].Exclusive() *Filter1[A] func (*Filter1)[A].New(world *World) *Filter1[A] func (*Filter1)[A].Register() *Filter1[A] func (*Filter1)[A].Relations(rel ...Relation) *Filter1[A] func (*Filter1)[A].With(comps ...Comp) *Filter1[A] func (*Filter1)[A].Without(comps ...Comp) *Filter1[A]
Type Parameters: A: any B: any Filter2 is a filter for 2 components. Used to create [Query2] iterators. Instances should be created during initialization and stored, e.g. in systems. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter2.Relations]. Relation components must be in the filter's parameters or added via [Filter2.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter2.Batch] or [Filter2.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter2.With]. Overwrites components set via [Filter2.Without]. New creates a new [Filter2]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. Query creates a [Query2] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter2.Relations]. Relation components must be in the filter's parameters or added via [Filter2.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter2.Query] or [Filter2.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter2.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter2[A, B](world *World) *Filter2[A, B] func (*Filter2)[A, B].Exclusive() *Filter2[A, B] func (*Filter2)[A, B].New(world *World) *Filter2[A, B] func (*Filter2)[A, B].Register() *Filter2[A, B] func (*Filter2)[A, B].Relations(rel ...Relation) *Filter2[A, B] func (*Filter2)[A, B].With(comps ...Comp) *Filter2[A, B] func (*Filter2)[A, B].Without(comps ...Comp) *Filter2[A, B]
Type Parameters: A: any B: any C: any Filter3 is a filter for 3 components. Used to create [Query3] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter3.Relations]. Relation components must be in the filter's parameters or added via [Filter3.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter3.Batch] or [Filter3.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter3.With]. Overwrites components set via [Filter3.Without]. New creates a new [Filter3]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query3] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter3.Relations]. Relation components must be in the filter's parameters or added via [Filter3.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter3.Query] or [Filter3.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter3.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter3[A, B, C](world *World) *Filter3[A, B, C] func (*Filter3)[A, B, C].Exclusive() *Filter3[A, B, C] func (*Filter3)[A, B, C].New(world *World) *Filter3[A, B, C] func (*Filter3)[A, B, C].Register() *Filter3[A, B, C] func (*Filter3)[A, B, C].Relations(rel ...Relation) *Filter3[A, B, C] func (*Filter3)[A, B, C].With(comps ...Comp) *Filter3[A, B, C] func (*Filter3)[A, B, C].Without(comps ...Comp) *Filter3[A, B, C]
Type Parameters: A: any B: any C: any D: any Filter4 is a filter for 4 components. Used to create [Query4] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter4.Relations]. Relation components must be in the filter's parameters or added via [Filter4.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter4.Batch] or [Filter4.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter4.With]. Overwrites components set via [Filter4.Without]. New creates a new [Filter4]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query4] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter4.Relations]. Relation components must be in the filter's parameters or added via [Filter4.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter4.Query] or [Filter4.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter4.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter4[A, B, C, D](world *World) *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].Exclusive() *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].New(world *World) *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].Register() *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].Relations(rel ...Relation) *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].With(comps ...Comp) *Filter4[A, B, C, D] func (*Filter4)[A, B, C, D].Without(comps ...Comp) *Filter4[A, B, C, D]
Type Parameters: A: any B: any C: any D: any E: any Filter5 is a filter for 5 components. Used to create [Query5] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter5.Relations]. Relation components must be in the filter's parameters or added via [Filter5.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter5.Batch] or [Filter5.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter5.With]. Overwrites components set via [Filter5.Without]. New creates a new [Filter5]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query5] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter5.Relations]. Relation components must be in the filter's parameters or added via [Filter5.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter5.Query] or [Filter5.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter5.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter5[A, B, C, D, E](world *World) *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Exclusive() *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].New(world *World) *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Register() *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Relations(rel ...Relation) *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].With(comps ...Comp) *Filter5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Without(comps ...Comp) *Filter5[A, B, C, D, E]
Type Parameters: A: any B: any C: any D: any E: any F: any Filter6 is a filter for 6 components. Used to create [Query6] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter6.Relations]. Relation components must be in the filter's parameters or added via [Filter6.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter6.Batch] or [Filter6.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter6.With]. Overwrites components set via [Filter6.Without]. New creates a new [Filter6]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query6] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter6.Relations]. Relation components must be in the filter's parameters or added via [Filter6.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter6.Query] or [Filter6.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter6.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter6[A, B, C, D, E, F](world *World) *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Exclusive() *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].New(world *World) *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Register() *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Relations(rel ...Relation) *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].With(comps ...Comp) *Filter6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Without(comps ...Comp) *Filter6[A, B, C, D, E, F]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any Filter7 is a filter for 7 components. Used to create [Query7] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter7.Relations]. Relation components must be in the filter's parameters or added via [Filter7.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter7.Batch] or [Filter7.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter7.With]. Overwrites components set via [Filter7.Without]. New creates a new [Filter7]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query7] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter7.Relations]. Relation components must be in the filter's parameters or added via [Filter7.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter7.Query] or [Filter7.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter7.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter7[A, B, C, D, E, F, G](world *World) *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Exclusive() *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].New(world *World) *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Register() *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Relations(rel ...Relation) *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].With(comps ...Comp) *Filter7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Without(comps ...Comp) *Filter7[A, B, C, D, E, F, G]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any Filter8 is a filter for 8 components. Used to create [Query8] iterators. Instances should be created during initialization and stored, e.g. in systems. See [Filter2] for a usage example. Batch creates a [Batch] from this filter. Relation targets provided here are added to those specified with [Filter8.Relations]. Relation components must be in the filter's parameters or added via [Filter8.With] beforehand. ⚠️ The returned [Batch] filter should not be stored, but used immediately and re-generated each time a batch operation is called. Otherwise, changes to the origin filter or calls to [Filter8.Batch] or [Filter8.Query] with different relationship targets may modify stored instances. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. This includes components set via [Filter8.With]. Overwrites components set via [Filter8.Without]. New creates a new [Filter8]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Filter2.New] for an example. Query creates a [Query8] from this filter. This must be used each time before iterating a query. Relation targets provided here are added to those specified with [Filter8.Relations]. Relation components must be in the filter's parameters or added via [Filter8.With] beforehand. Register this filter to the world's filter cache. Registering filters is optional. It avoids a potential slowdown that may be caused by a very high number of archetypes, like hundreds or thousands. Relations sets permanent entity relation targets for this filter. Relation targets set here are included in filter caching. Contrary, relation targets specified in [Filter8.Query] or [Filter8.Batch] are not cached. Relation components used here must be in the filter's parameters or added via [Filter8.With] beforehand. Can be called multiple times in chains, or once with multiple arguments. Unregister this filter from the world's filter cache. With specifies additional components to filter for. Can be called multiple times in chains, or once with multiple arguments. Without specifies components to exclude. Can be called multiple times in chains, or once with multiple arguments. func NewFilter8[A, B, C, D, E, F, G, H](world *World) *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Exclusive() *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].New(world *World) *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Register() *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Relations(rel ...Relation) *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].With(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Without(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H]
ID is the component identifier. It is not relevant when using the default generic API. Index returns the internal component index of this component ID. func ComponentID[T](w *World) ID func ComponentIDs(w *World) []ID func TypeID(w *World, tp reflect.Type) ID func (*IDs).Get(index int) ID func ComponentInfo(w *World, id ID) (CompInfo, bool) func NewUnsafeFilter(world *World, ids ...ID) UnsafeFilter func RelID(id ID, target Entity) Relation func Unsafe.Add(entity Entity, comp ...ID) func Unsafe.AddRel(entity Entity, comps []ID, relations ...Relation) func Unsafe.Exchange(entity Entity, add []ID, remove []ID, relations ...Relation) func Unsafe.Exchange(entity Entity, add []ID, remove []ID, relations ...Relation) func Unsafe.Get(entity Entity, comp ID) unsafe.Pointer func Unsafe.GetRelation(entity Entity, comp ID) Entity func Unsafe.GetRelationUnchecked(entity Entity, comp ID) Entity func Unsafe.GetUnchecked(entity Entity, comp ID) unsafe.Pointer func Unsafe.Has(entity Entity, comp ID) bool func Unsafe.HasUnchecked(entity Entity, comp ID) bool func Unsafe.NewEntity(ids ...ID) Entity func Unsafe.NewEntityRel(ids []ID, relations ...Relation) Entity func Unsafe.Remove(entity Entity, comp ...ID) func UnsafeFilter.Without(ids ...ID) UnsafeFilter func (*UnsafeQuery).Get(comp ID) unsafe.Pointer func (*UnsafeQuery).GetRelation(comp ID) Entity func (*UnsafeQuery).Has(comp ID) bool
IDs is an immutable list of [ID] values. Get returns the ID at the given index. Len returns the number of IDs. func Unsafe.IDs(entity Entity) IDs func (*UnsafeQuery).IDs() IDs
Type Parameters: T: any Map is a mapper to access and manipulate components of an entity. It is equivalent to [Map1], with slightly more convenient methods tailored for a single component. Instances should be created during initialization and stored, e.g. in systems. Add the mapped component to the given entity. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped component to all entities matching the given batch filter. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped component to all entities matching the given batch filter, running the given function on each. The function can be nil. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped component to the given entity and runs a callback instead of using a component for initialization. The callback can be nil. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointer outside of the current context! Get returns the mapped component for the given entity. Returns nil if the entity does not have the mapped component. ⚠️ Do not store the obtained pointer outside of the current context! GetRelation returns the relation target for the entity and the mapped component. GetRelationUnchecked returns the relation target for the entity and the mapped component. In contrast to [Map.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped component for the given entity. In contrast to [Map.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Returns nil if the entity does not have the mapped component. ⚠️ Do not store the obtained pointer outside of the current context! Has return whether the given entity has the mapped component. Using [Map.Get] and checking for nil pointer may be faster than calling [Map.Has] and [Map.Get] subsequently. HasUnchecked return whether the given entity has the mapped component. In contrast to [Map.Has], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. New creates a new [Map]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated specification of the type parameter. NewBatch creates a batch of new entities with the mapped component. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped component. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. If the mapped component is a relationship (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointer outside of the current context! Remove the mapped component from the given entity. RemoveBatch removes the mapped component from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped component of the given entity to the given values. Requires the entity to already have the mapped component. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelation sets the relation target for the entity and the mapped component. SetRelationBatch sets the relation target for all entities matching the given batch filter. func NewMap[T](w *World) *Map[T] func (*Map)[A].New(world *World) *Map[A]
Type Parameters: A: any Map1 is a mapper to access 1 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map1.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map1.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map1.Get] and checking for nil pointer may be faster than calling [Map1.HasAll] and [Map1.Get] subsequently. New creates a new [Map1]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap1[A](world *World) *Map1[A] func (*Map1)[A].New(world *World) *Map1[A]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any Map10 is a mapper to access 10 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map10.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map10.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map10.Get] and checking for nil pointer may be faster than calling [Map10.HasAll] and [Map10.Get] subsequently. New creates a new [Map10]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap10[A, B, C, D, E, F, G, H, I, J](world *World) *Map10[A, B, C, D, E, F, G, H, I, J] func (*Map10)[A, B, C, D, E, F, G, H, I, J].New(world *World) *Map10[A, B, C, D, E, F, G, H, I, J]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any K: any Map11 is a mapper to access 11 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map11.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map11.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map11.Get] and checking for nil pointer may be faster than calling [Map11.HasAll] and [Map11.Get] subsequently. New creates a new [Map11]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap11[A, B, C, D, E, F, G, H, I, J, K](world *World) *Map11[A, B, C, D, E, F, G, H, I, J, K] func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].New(world *World) *Map11[A, B, C, D, E, F, G, H, I, J, K]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any K: any L: any Map12 is a mapper to access 12 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map12.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map12.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map12.Get] and checking for nil pointer may be faster than calling [Map12.HasAll] and [Map12.Get] subsequently. New creates a new [Map12]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap12[A, B, C, D, E, F, G, H, I, J, K, L](world *World) *Map12[A, B, C, D, E, F, G, H, I, J, K, L] func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].New(world *World) *Map12[A, B, C, D, E, F, G, H, I, J, K, L]
Type Parameters: A: any B: any Map2 is a mapper to access 2 components of an entity. Instances should be created during initialization and stored, e.g. in systems. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map2.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map2.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map2.Get] and checking for nil pointer may be faster than calling [Map2.HasAll] and [Map2.Get] subsequently. New creates a new [Map2]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap2[A, B](world *World) *Map2[A, B] func (*Map2)[A, B].New(world *World) *Map2[A, B]
Type Parameters: A: any B: any C: any Map3 is a mapper to access 3 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map3.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map3.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map3.Get] and checking for nil pointer may be faster than calling [Map3.HasAll] and [Map3.Get] subsequently. New creates a new [Map3]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap3[A, B, C](world *World) *Map3[A, B, C] func (*Map3)[A, B, C].New(world *World) *Map3[A, B, C]
Type Parameters: A: any B: any C: any D: any Map4 is a mapper to access 4 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map4.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map4.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map4.Get] and checking for nil pointer may be faster than calling [Map4.HasAll] and [Map4.Get] subsequently. New creates a new [Map4]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap4[A, B, C, D](world *World) *Map4[A, B, C, D] func (*Map4)[A, B, C, D].New(world *World) *Map4[A, B, C, D]
Type Parameters: A: any B: any C: any D: any E: any Map5 is a mapper to access 5 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map5.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map5.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map5.Get] and checking for nil pointer may be faster than calling [Map5.HasAll] and [Map5.Get] subsequently. New creates a new [Map5]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap5[A, B, C, D, E](world *World) *Map5[A, B, C, D, E] func (*Map5)[A, B, C, D, E].New(world *World) *Map5[A, B, C, D, E]
Type Parameters: A: any B: any C: any D: any E: any F: any Map6 is a mapper to access 6 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map6.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map6.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map6.Get] and checking for nil pointer may be faster than calling [Map6.HasAll] and [Map6.Get] subsequently. New creates a new [Map6]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap6[A, B, C, D, E, F](world *World) *Map6[A, B, C, D, E, F] func (*Map6)[A, B, C, D, E, F].New(world *World) *Map6[A, B, C, D, E, F]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any Map7 is a mapper to access 7 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map7.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map7.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map7.Get] and checking for nil pointer may be faster than calling [Map7.HasAll] and [Map7.Get] subsequently. New creates a new [Map7]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap7[A, B, C, D, E, F, G](world *World) *Map7[A, B, C, D, E, F, G] func (*Map7)[A, B, C, D, E, F, G].New(world *World) *Map7[A, B, C, D, E, F, G]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any Map8 is a mapper to access 8 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map8.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map8.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map8.Get] and checking for nil pointer may be faster than calling [Map8.HasAll] and [Map8.Get] subsequently. New creates a new [Map8]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap8[A, B, C, D, E, F, G, H](world *World) *Map8[A, B, C, D, E, F, G, H] func (*Map8)[A, B, C, D, E, F, G, H].New(world *World) *Map8[A, B, C, D, E, F, G, H]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any Map9 is a mapper to access 9 components of an entity. Instances should be created during initialization and stored, e.g. in systems. See [Map2] for a usage example. Add the mapped components to the given entity. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatch adds the mapped components to all entities matching the given batch filter. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. AddBatchFn adds the mapped components to all entities matching the given batch filter, running the given function on each. The function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! AddFn adds the mapped components to the given entity and runs a callback instead of using components for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided. ⚠️ Do not store the obtained pointers outside of the current context! Get returns the mapped components for the given entity. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! GetRelation returns the relation target of an entity for the component at the given index. GetRelationUnchecked returns the relation target of an entity for the component at the given index. In contrast to [Map9.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns the mapped components for the given entity. In contrast to [Map9.Get], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. Return nil for components the entity is missing. ⚠️ Do not store the obtained pointers outside of the current context! HasAll return whether the given entity has all mapped components. Using [Map9.Get] and checking for nil pointer may be faster than calling [Map9.HasAll] and [Map9.Get] subsequently. New creates a new [Map9]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Map2.New] for an example. NewBatch creates a batch of new entities with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewBatchFn creates a batch of new entities with the mapped components, running the given initializer function on each. The initializer function can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! NewEntity creates a new entity with the mapped components. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. NewEntityFn creates a new entity with the mapped component and runs a callback instead of using a component for initialization. The callback can be nil. For each mapped component that is a relationships (see [RelationMarker]), a relation target entity must be provided via the variadic arguments. ⚠️ Do not store the obtained pointers outside of the current context! Remove the mapped components from the given entity. RemoveBatch removes the mapped components from all entities matching the given batch filter, running the given function on each. The function can be nil. Set the mapped components of the given entity to the given values. Requires the entity to already have all the mapped components. Triggers an OnSetComponents event, which is not the case when assigning by pointer dereference or assigning to fields. This can be used to notify observers about component updates. This is not a component operation, so it can be performed on a locked world. SetRelations sets relation targets for the given entity. SetRelationsBatch sets relation targets for all entities matching the given batch filter. func NewMap9[A, B, C, D, E, F, G, H, I](world *World) *Map9[A, B, C, D, E, F, G, H, I] func (*Map9)[A, B, C, D, E, F, G, H, I].New(world *World) *Map9[A, B, C, D, E, F, G, H, I]
Observer for ECS events. Observers react to structural changes, such as entity creation, removal, and component addition/removal. Use the methods Observe, With, Without, and Do to configure the observer before registering it. See [EventType] for available events. See also [Observer1], [Observer2], etc. Do sets the observer's callback. Must be called exactly once before registration. Exclusive makes the observer exclusive in the sense that the components given by [Observer.With] are matched exactly, and no other components are allowed. Overwrites components set via [Observer.Without]. For adds components that the observer observes. The component events, the observer triggers if these components are added to or removed from an entity. If not specified, the observer triggers on any component addition or removal. If multiple components are provided, all must be added/removed at the same time to trigger the observer. For entity events (OnCreateEntity, OnRemoveEntity), is has the same effect as With. Method calls can be chained, which has the same effect as calling with multiple arguments. New creates a new [Observer]. It is safe to call on `nil` instance. It is a helper method, provided for consistency with generic observers like [Observer1]. Register this observer. This is mandatory for the observer to take effect. Unregister this observer. With adds components that entities must have to trigger the observer. If multiple components are provided, the entity must have all of them. Method calls can be chained, which has the same effect as calling with multiple arguments. Without adds components that entities must not have to trigger the observer. If multiple components are provided, the entity must not have any of them. Method calls can be chained, which has the same effect as calling with multiple arguments. func Observe(evt EventType) *Observer func (*Observer).Do(fn func(Entity)) *Observer func (*Observer).Exclusive() *Observer func (*Observer).For(comps ...Comp) *Observer func (*Observer).New(evt EventType) *Observer func (*Observer).Register(w *World) *Observer func (*Observer).Unregister(w *World) *Observer func (*Observer).With(comps ...Comp) *Observer func (*Observer).Without(comps ...Comp) *Observer
Type Parameters: A: any Observer1 is a generic observer for 1 components. See [Observer] for details on events and observers. Do sets the observer's callback. Must be called exactly once before registration. Exclusive makes the observer exclusive in the sense that the components given by [Observer.With] are matched exactly, and no other components are allowed. Overwrites components set via [Observer.Without]. For adds further components that the observer observes, in addition to its generic parameters. Method calls can be chained, which has the same effect as calling with multiple arguments. New creates a new [Observer1]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. Register this observer. This is mandatory for the observer to take effect. Unregister this observer. With adds components that entities must have to trigger the observer. If multiple components are provided, the entity must have all of them. Method calls can be chained, which has the same effect as calling with multiple arguments. Without adds components that entities must not have to trigger the observer. If multiple components are provided, the entity must not have any of them. Method calls can be chained, which has the same effect as calling with multiple arguments. func Observe1[A](evt EventType) *Observer1[A] func (*Observer1)[A].Do(fn func(Entity, *A)) *Observer1[A] func (*Observer1)[A].Exclusive() *Observer1[A] func (*Observer1)[A].For(comps ...Comp) *Observer1[A] func (*Observer1)[A].New(evt EventType) *Observer1[A] func (*Observer1)[A].Register(w *World) *Observer1[A] func (*Observer1)[A].Unregister(w *World) *Observer1[A] func (*Observer1)[A].With(comps ...Comp) *Observer1[A] func (*Observer1)[A].Without(comps ...Comp) *Observer1[A]
Type Parameters: A: any B: any Observer2 is a generic observer for 2 components. See [Observer] for details on events and observers. See [Observer1] for an example. Do sets the observer's callback. Must be called exactly once before registration. Exclusive makes the observer exclusive in the sense that the components given by [Observer.With] are matched exactly, and no other components are allowed. Overwrites components set via [Observer.Without]. See [Observer1.Exclusive] for an example. For adds further components that the observer observes, in addition to its generic parameters. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.For] for an example. New creates a new [Observer2]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Observer1.New] for an example. Register this observer. This is mandatory for the observer to take effect. Unregister this observer. With adds components that entities must have to trigger the observer. If multiple components are provided, the entity must have all of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.With] for an example. Without adds components that entities must not have to trigger the observer. If multiple components are provided, the entity must not have any of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.Without] for an example. func Observe2[A, B](evt EventType) *Observer2[A, B] func (*Observer2)[A, B].Do(fn func(Entity, *A, *B)) *Observer2[A, B] func (*Observer2)[A, B].Exclusive() *Observer2[A, B] func (*Observer2)[A, B].For(comps ...Comp) *Observer2[A, B] func (*Observer2)[A, B].New(evt EventType) *Observer2[A, B] func (*Observer2)[A, B].Register(w *World) *Observer2[A, B] func (*Observer2)[A, B].Unregister(w *World) *Observer2[A, B] func (*Observer2)[A, B].With(comps ...Comp) *Observer2[A, B] func (*Observer2)[A, B].Without(comps ...Comp) *Observer2[A, B]
Type Parameters: A: any B: any C: any Observer3 is a generic observer for 3 components. See [Observer] for details on events and observers. See [Observer1] for an example. Do sets the observer's callback. Must be called exactly once before registration. Exclusive makes the observer exclusive in the sense that the components given by [Observer.With] are matched exactly, and no other components are allowed. Overwrites components set via [Observer.Without]. See [Observer1.Exclusive] for an example. For adds further components that the observer observes, in addition to its generic parameters. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.For] for an example. New creates a new [Observer3]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Observer1.New] for an example. Register this observer. This is mandatory for the observer to take effect. Unregister this observer. With adds components that entities must have to trigger the observer. If multiple components are provided, the entity must have all of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.With] for an example. Without adds components that entities must not have to trigger the observer. If multiple components are provided, the entity must not have any of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.Without] for an example. func Observe3[A, B, C](evt EventType) *Observer3[A, B, C] func (*Observer3)[A, B, C].Do(fn func(Entity, *A, *B, *C)) *Observer3[A, B, C] func (*Observer3)[A, B, C].Exclusive() *Observer3[A, B, C] func (*Observer3)[A, B, C].For(comps ...Comp) *Observer3[A, B, C] func (*Observer3)[A, B, C].New(evt EventType) *Observer3[A, B, C] func (*Observer3)[A, B, C].Register(w *World) *Observer3[A, B, C] func (*Observer3)[A, B, C].Unregister(w *World) *Observer3[A, B, C] func (*Observer3)[A, B, C].With(comps ...Comp) *Observer3[A, B, C] func (*Observer3)[A, B, C].Without(comps ...Comp) *Observer3[A, B, C]
Type Parameters: A: any B: any C: any D: any Observer4 is a generic observer for 4 components. See [Observer] for details on events and observers. See [Observer1] for an example. Do sets the observer's callback. Must be called exactly once before registration. Exclusive makes the observer exclusive in the sense that the components given by [Observer.With] are matched exactly, and no other components are allowed. Overwrites components set via [Observer.Without]. See [Observer1.Exclusive] for an example. For adds further components that the observer observes, in addition to its generic parameters. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.For] for an example. New creates a new [Observer4]. It is safe to call on `nil` instance. It is a helper method, intended to avoid repeated listing of type parameters. See [Observer1.New] for an example. Register this observer. This is mandatory for the observer to take effect. Unregister this observer. With adds components that entities must have to trigger the observer. If multiple components are provided, the entity must have all of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.With] for an example. Without adds components that entities must not have to trigger the observer. If multiple components are provided, the entity must not have any of them. Method calls can be chained, which has the same effect as calling with multiple arguments. See [Observer1.Without] for an example. func Observe4[A, B, C, D](evt EventType) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Do(fn func(Entity, *A, *B, *C, *D)) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Exclusive() *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].For(comps ...Comp) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].New(evt EventType) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Register(w *World) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Unregister(w *World) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].With(comps ...Comp) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Without(comps ...Comp) *Observer4[A, B, C, D]
Query0 is a query for 0 components. Use a [Filter0] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query0.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query0.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query0.Next] instead. Panics if the index is out of range, as indicated by [Query0.Count]. See [Query2.EntityAt] for an example. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query0.NextTable]. NextTable advances the query's cursor to the next table. Use [Query0.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query0.Next]. *Query0 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter0).Query(rel ...Relation) Query0
Type Parameters: A: any Query1 is a query for 1 components. Use a [Filter1] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query1.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query1.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query1.Next] instead. Panics if the index is out of range, as indicated by [Query1.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query1.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query1.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query1.NextTable]. NextTable advances the query's cursor to the next table. Use [Query1.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query1.Next]. *Query1 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter1)[A].Query(rel ...Relation) Query1[A]
Type Parameters: A: any B: any Query2 is a query for 2 components. Use a [Filter2] to create one. Queries are one-time use iterators and must be re-created each time before iterating. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. Entities returns the entities of the current table. Use this with table-based iteration using [Query2.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query2.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query2.Next] instead. Panics if the index is out of range, as indicated by [Query2.Count]. Get returns the queried components of the current entity. Use this with entity iteration using [Query2.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query2.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query2.NextTable]. NextTable advances the query's cursor to the next table. Use [Query2.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query2.Next]. *Query2 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter2)[A, B].Query(rel ...Relation) Query2[A, B]
Type Parameters: A: any B: any C: any Query3 is a query for 3 components. Use a [Filter3] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query3.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query3.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query3.Next] instead. Panics if the index is out of range, as indicated by [Query3.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query3.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query3.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query3.NextTable]. NextTable advances the query's cursor to the next table. Use [Query3.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query3.Next]. *Query3 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter3)[A, B, C].Query(rel ...Relation) Query3[A, B, C]
Type Parameters: A: any B: any C: any D: any Query4 is a query for 4 components. Use a [Filter4] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query4.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query4.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query4.Next] instead. Panics if the index is out of range, as indicated by [Query4.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query4.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query4.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query4.NextTable]. NextTable advances the query's cursor to the next table. Use [Query4.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query4.Next]. *Query4 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter4)[A, B, C, D].Query(rel ...Relation) Query4[A, B, C, D]
Type Parameters: A: any B: any C: any D: any E: any Query5 is a query for 5 components. Use a [Filter5] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query5.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query5.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query5.Next] instead. Panics if the index is out of range, as indicated by [Query5.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query5.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query5.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query5.NextTable]. NextTable advances the query's cursor to the next table. Use [Query5.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query5.Next]. *Query5 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter5)[A, B, C, D, E].Query(rel ...Relation) Query5[A, B, C, D, E]
Type Parameters: A: any B: any C: any D: any E: any F: any Query6 is a query for 6 components. Use a [Filter6] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query6.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query6.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query6.Next] instead. Panics if the index is out of range, as indicated by [Query6.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query6.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query6.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query6.NextTable]. NextTable advances the query's cursor to the next table. Use [Query6.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query6.Next]. *Query6 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter6)[A, B, C, D, E, F].Query(rel ...Relation) Query6[A, B, C, D, E, F]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any Query7 is a query for 7 components. Use a [Filter7] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query7.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query7.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query7.Next] instead. Panics if the index is out of range, as indicated by [Query7.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query7.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query7.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query7.NextTable]. NextTable advances the query's cursor to the next table. Use [Query7.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query7.Next]. *Query7 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter7)[A, B, C, D, E, F, G].Query(rel ...Relation) Query7[A, B, C, D, E, F, G]
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any Query8 is a query for 8 components. Use a [Filter8] to create one. Queries are one-time use iterators and must be re-created each time before iterating. See [Query2] for a usage example. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count counts the entities matching this query. Has some overhead of iterating through archetypes. However, this is still much faster than manual counting via iteration. Does not iterate or close the query. See [Query2.Count] for an example. Entities returns the entities of the current table. Use this with table-based iteration using [Query8.NextTable]. ⚠️ Do not set/replace any of the slice elements! Entity returns the current entity. Use this with entity iteration using [Query8.Next]. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query8.Next] instead. Panics if the index is out of range, as indicated by [Query8.Count]. See [Query2.EntityAt] for an example. Get returns the queried components of the current entity. Use this with entity iteration using [Query8.Next]. ⚠️ Do not store the obtained pointers outside of the current context (i.e. the query loop)! GetColumns returns the queried component columns of the current table. Use this with table-based iteration using [Query8.NextTable]. GetRelation returns the entity relation target of the component at the given index. Can be used for the current entity in entity-based iteration, as well as for the entire current table in table-based iteration. Next advances the query's cursor to the next entity. For alternative, faster iteration over tables, use [Query8.NextTable]. NextTable advances the query's cursor to the next table. Use [Query8.GetColumns] to get the current table's component columns. For alternative iteration over entities, use [Query8.Next]. *Query8 : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func (*Filter8)[A, B, C, D, E, F, G, H].Query(rel ...Relation) Query8[A, B, C, D, E, F, G, H]
Relation is the common type for specifying relationship targets. It can be created with [Rel], [RelIdx] and [RelID]. - [Rel] uses a generic type parameter to identify the component. It is safe, but has some run-time overhead for component [ID] lookup on first usage. - [RelIdx] uses an index to identify the component. It is fast but more error-prone. - [RelID] uses a component ID. It is for use with the [Unsafe] API. func Rel[C](target Entity) Relation func RelID(id ID, target Entity) Relation func RelIdx(index int, target Entity) Relation func (*Exchange1)[A].Add(entity Entity, a *A, rel ...Relation) func (*Exchange1)[A].AddBatch(batch Batch, a *A, rel ...Relation) func (*Exchange1)[A].AddBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Exchange1)[A].AddFn(entity Entity, fn func(*A), rel ...Relation) func (*Exchange1)[A].Exchange(entity Entity, a *A, rel ...Relation) func (*Exchange1)[A].ExchangeBatch(batch Batch, a *A, rel ...Relation) func (*Exchange1)[A].ExchangeBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Exchange1)[A].ExchangeFn(entity Entity, fn func(*A), rel ...Relation) func (*Exchange2)[A, B].Add(entity Entity, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].AddBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].AddBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Exchange2)[A, B].AddFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Exchange2)[A, B].Exchange(entity Entity, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].ExchangeBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Exchange2)[A, B].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Exchange2)[A, B].ExchangeFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Exchange3)[A, B, C].Add(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].AddBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].AddFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].Exchange(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].ExchangeBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Exchange3)[A, B, C].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Exchange3)[A, B, C].ExchangeFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Exchange4)[A, B, C, D].Add(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].AddBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].AddFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].Exchange(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Exchange4)[A, B, C, D].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Exchange5)[A, B, C, D, E].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Exchange5)[A, B, C, D, E].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange6)[A, B, C, D, E, F].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange7)[A, B, C, D, E, F, G].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].Exchange(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Exchange8)[A, B, C, D, E, F, G, H].ExchangeFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Filter0).Batch(rel ...Relation) Batch func (*Filter0).Query(rel ...Relation) Query0 func (*Filter0).Relations(rel ...Relation) *Filter0 func (*Filter1)[A].Batch(rel ...Relation) Batch func (*Filter1)[A].Query(rel ...Relation) Query1[A] func (*Filter1)[A].Relations(rel ...Relation) *Filter1[A] func (*Filter2)[A, B].Batch(rel ...Relation) Batch func (*Filter2)[A, B].Query(rel ...Relation) Query2[A, B] func (*Filter2)[A, B].Relations(rel ...Relation) *Filter2[A, B] func (*Filter3)[A, B, C].Batch(rel ...Relation) Batch func (*Filter3)[A, B, C].Query(rel ...Relation) Query3[A, B, C] func (*Filter3)[A, B, C].Relations(rel ...Relation) *Filter3[A, B, C] func (*Filter4)[A, B, C, D].Batch(rel ...Relation) Batch func (*Filter4)[A, B, C, D].Query(rel ...Relation) Query4[A, B, C, D] func (*Filter4)[A, B, C, D].Relations(rel ...Relation) *Filter4[A, B, C, D] func (*Filter5)[A, B, C, D, E].Batch(rel ...Relation) Batch func (*Filter5)[A, B, C, D, E].Query(rel ...Relation) Query5[A, B, C, D, E] func (*Filter5)[A, B, C, D, E].Relations(rel ...Relation) *Filter5[A, B, C, D, E] func (*Filter6)[A, B, C, D, E, F].Batch(rel ...Relation) Batch func (*Filter6)[A, B, C, D, E, F].Query(rel ...Relation) Query6[A, B, C, D, E, F] func (*Filter6)[A, B, C, D, E, F].Relations(rel ...Relation) *Filter6[A, B, C, D, E, F] func (*Filter7)[A, B, C, D, E, F, G].Batch(rel ...Relation) Batch func (*Filter7)[A, B, C, D, E, F, G].Query(rel ...Relation) Query7[A, B, C, D, E, F, G] func (*Filter7)[A, B, C, D, E, F, G].Relations(rel ...Relation) *Filter7[A, B, C, D, E, F, G] func (*Filter8)[A, B, C, D, E, F, G, H].Batch(rel ...Relation) Batch func (*Filter8)[A, B, C, D, E, F, G, H].Query(rel ...Relation) Query8[A, B, C, D, E, F, G, H] func (*Filter8)[A, B, C, D, E, F, G, H].Relations(rel ...Relation) *Filter8[A, B, C, D, E, F, G, H] func (*Map1)[A].Add(entity Entity, a *A, rel ...Relation) func (*Map1)[A].AddBatch(batch Batch, a *A, rel ...Relation) func (*Map1)[A].AddBatchFn(batch Batch, fn func(Entity, *A), rel ...Relation) func (*Map1)[A].AddFn(entity Entity, fn func(*A), rel ...Relation) func (*Map1)[A].NewBatch(count int, a *A, rel ...Relation) func (*Map1)[A].NewBatchFn(count int, fn func(Entity, *A), rel ...Relation) func (*Map1)[A].NewEntity(a *A, rel ...Relation) Entity func (*Map1)[A].NewEntityFn(fn func(*A), rel ...Relation) Entity func (*Map1)[A].SetRelations(entity Entity, rel ...Relation) func (*Map1)[A].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, rel ...Relation) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J), rel ...Relation) Entity func (*Map10)[A, B, C, D, E, F, G, H, I, J].SetRelations(entity Entity, rel ...Relation) func (*Map10)[A, B, C, D, E, F, G, H, I, J].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, rel ...Relation) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K), rel ...Relation) Entity func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].SetRelations(entity Entity, rel ...Relation) func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, j *J, k *K, l *L, rel ...Relation) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I, *J, *K, *L), rel ...Relation) Entity func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].SetRelations(entity Entity, rel ...Relation) func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map2)[A, B].Add(entity Entity, a *A, b *B, rel ...Relation) func (*Map2)[A, B].AddBatch(batch Batch, a *A, b *B, rel ...Relation) func (*Map2)[A, B].AddBatchFn(batch Batch, fn func(Entity, *A, *B), rel ...Relation) func (*Map2)[A, B].AddFn(entity Entity, fn func(*A, *B), rel ...Relation) func (*Map2)[A, B].NewBatch(count int, a *A, b *B, rel ...Relation) func (*Map2)[A, B].NewBatchFn(count int, fn func(Entity, *A, *B), rel ...Relation) func (*Map2)[A, B].NewEntity(a *A, b *B, rel ...Relation) Entity func (*Map2)[A, B].NewEntityFn(fn func(*A, *B), rel ...Relation) Entity func (*Map2)[A, B].SetRelations(entity Entity, rel ...Relation) func (*Map2)[A, B].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map3)[A, B, C].Add(entity Entity, a *A, b *B, c *C, rel ...Relation) func (*Map3)[A, B, C].AddBatch(batch Batch, a *A, b *B, c *C, rel ...Relation) func (*Map3)[A, B, C].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Map3)[A, B, C].AddFn(entity Entity, fn func(*A, *B, *C), rel ...Relation) func (*Map3)[A, B, C].NewBatch(count int, a *A, b *B, c *C, rel ...Relation) func (*Map3)[A, B, C].NewBatchFn(count int, fn func(Entity, *A, *B, *C), rel ...Relation) func (*Map3)[A, B, C].NewEntity(a *A, b *B, c *C, rel ...Relation) Entity func (*Map3)[A, B, C].NewEntityFn(fn func(*A, *B, *C), rel ...Relation) Entity func (*Map3)[A, B, C].SetRelations(entity Entity, rel ...Relation) func (*Map3)[A, B, C].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map4)[A, B, C, D].Add(entity Entity, a *A, b *B, c *C, d *D, rel ...Relation) func (*Map4)[A, B, C, D].AddBatch(batch Batch, a *A, b *B, c *C, d *D, rel ...Relation) func (*Map4)[A, B, C, D].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Map4)[A, B, C, D].AddFn(entity Entity, fn func(*A, *B, *C, *D), rel ...Relation) func (*Map4)[A, B, C, D].NewBatch(count int, a *A, b *B, c *C, d *D, rel ...Relation) func (*Map4)[A, B, C, D].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D), rel ...Relation) func (*Map4)[A, B, C, D].NewEntity(a *A, b *B, c *C, d *D, rel ...Relation) Entity func (*Map4)[A, B, C, D].NewEntityFn(fn func(*A, *B, *C, *D), rel ...Relation) Entity func (*Map4)[A, B, C, D].SetRelations(entity Entity, rel ...Relation) func (*Map4)[A, B, C, D].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map5)[A, B, C, D, E].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Map5)[A, B, C, D, E].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Map5)[A, B, C, D, E].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Map5)[A, B, C, D, E].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E), rel ...Relation) func (*Map5)[A, B, C, D, E].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, rel ...Relation) func (*Map5)[A, B, C, D, E].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E), rel ...Relation) func (*Map5)[A, B, C, D, E].NewEntity(a *A, b *B, c *C, d *D, e *E, rel ...Relation) Entity func (*Map5)[A, B, C, D, E].NewEntityFn(fn func(*A, *B, *C, *D, *E), rel ...Relation) Entity func (*Map5)[A, B, C, D, E].SetRelations(entity Entity, rel ...Relation) func (*Map5)[A, B, C, D, E].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map6)[A, B, C, D, E, F].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Map6)[A, B, C, D, E, F].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) func (*Map6)[A, B, C, D, E, F].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) func (*Map6)[A, B, C, D, E, F].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F), rel ...Relation) func (*Map6)[A, B, C, D, E, F].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, rel ...Relation) Entity func (*Map6)[A, B, C, D, E, F].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F), rel ...Relation) Entity func (*Map6)[A, B, C, D, E, F].SetRelations(entity Entity, rel ...Relation) func (*Map6)[A, B, C, D, E, F].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G), rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, rel ...Relation) Entity func (*Map7)[A, B, C, D, E, F, G].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G), rel ...Relation) Entity func (*Map7)[A, B, C, D, E, F, G].SetRelations(entity Entity, rel ...Relation) func (*Map7)[A, B, C, D, E, F, G].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, rel ...Relation) Entity func (*Map8)[A, B, C, D, E, F, G, H].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H), rel ...Relation) Entity func (*Map8)[A, B, C, D, E, F, G, H].SetRelations(entity Entity, rel ...Relation) func (*Map8)[A, B, C, D, E, F, G, H].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].Add(entity Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddBatch(batch Batch, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddBatchFn(batch Batch, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].AddFn(entity Entity, fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].NewBatch(count int, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].NewBatchFn(count int, fn func(Entity, *A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].NewEntity(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H, i *I, rel ...Relation) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].NewEntityFn(fn func(*A, *B, *C, *D, *E, *F, *G, *H, *I), rel ...Relation) Entity func (*Map9)[A, B, C, D, E, F, G, H, I].SetRelations(entity Entity, rel ...Relation) func (*Map9)[A, B, C, D, E, F, G, H, I].SetRelationsBatch(batch Batch, fn func(entity Entity), rel ...Relation) func Unsafe.AddRel(entity Entity, comps []ID, relations ...Relation) func Unsafe.Exchange(entity Entity, add []ID, remove []ID, relations ...Relation) func Unsafe.NewEntityRel(ids []ID, relations ...Relation) Entity func Unsafe.SetRelations(entity Entity, relations ...Relation) func UnsafeFilter.Query(relations ...Relation) UnsafeQuery
RelationMarker is a marker for entity relation components. It must be embedded as first field of a component that represent an entity relationship (see the example). Entity relations allow for fast queries using entity relationships. E.g. to iterate over all entities that are the child of a certain parent entity.
ResID is the resource identifier. It is not relevant when using the default generic API. Index returns the internal component index of this resource ID. func AddResource[T](w *World, res *T) ResID func ResourceID[T](w *World) ResID func ResourceIDs(w *World) []ResID func ResourceTypeID(w *World, tp reflect.Type) ResID func ResourceType(w *World, id ResID) (reflect.Type, bool) func (*Resources).Add(id ResID, res any) func (*Resources).Get(id ResID) any func (*Resources).Has(id ResID) bool func (*Resources).Remove(id ResID)
Type Parameters: T: any Resource provides access to a world resource. Create one with [NewResource]. Add adds a resource to the world. Panics if there is already a resource of the given type. Get gets the resource of the given type. Returns nil if there is no such resource. Has returns whether the world has the resource type. New creates a new [Resource]. It is safe to call on an uninitialized instance. It is a helper method, intended to avoid repeated specification of the type parameter. Remove removes a resource from the world. Panics if there is no resource of the given type. See also [ecs.Resources.Remove]. func NewResource[T](w *World) Resource[T] func Resource[T].New(world *World) Resource[T]
Resources manage a world's resources. Access it using [World.Resources]. Although this type provides an ID-based API, the recommended usage is via [Resource]. Add a resource to the world. The resource should always be a pointer. Panics if there is already a resource of the given type. See [Resource.Add] for the recommended type-safe way. Get returns a pointer to the resource of the given type. Returns nil if there is no such resource. See [Resource.Get] for the recommended type-safe way. Has returns whether the world has the given resource. See [Resource.Has] for the recommended type-safe way. Remove a resource from the world. Panics if there is no resource of the given type. See [Resource.Remove] for the recommended type-safe way. func (*World).Resources() *Resources
Unsafe provides access to Ark's unsafe ID-based API. Get an instance via [World.Unsafe]. The unsafe API is significantly slower than the type-safe API, and should only be used when component types are not known at compile time. Add the given components to an entity. AddRel adds the given components and relation targets to an entity. DumpEntities dumps entity information into an [EntityDump] object. This dump can be used with [Unsafe.LoadEntities] to set the World's entity state. For world serialization with components and resources, see module [github.com/mlange-42/ark-serde]. Exchange the given components on entity. Get returns a pointer to the given component of an [Entity]. ⚠️ Do not store the obtained pointer outside of the current context! Panics if the entity does not have the given component. Panics when called for a removed (and potentially recycled) entity. GetRelation returns the relation target for the entity and the mapped component. GetRelationUnchecked returns the relation target for the entity and the mapped component. In contrast to [Unsafe.GetRelation], it does not check whether the entity is alive. Can be used as an optimization when it is certain that the entity is alive. GetUnchecked returns a pointer to the given component of an [Entity]. In contrast to [Unsafe.Get], it does not check whether the entity is alive. ⚠️ Do not store the obtained pointer outside of the current context! Panics if the entity does not have the given component. Has returns whether an [Entity] has the given component. Panics when called for a removed (and potentially recycled) entity. HasUnchecked returns whether an [Entity] has the given component. In contrast to [Unsafe.Has], it does not check whether the entity is alive. Panics when called for a removed (and potentially recycled) entity. IDs returns all component IDs of an entity. LoadEntities resets all entities to the state saved with [Unsafe.DumpEntities]. Use this only on an empty world! Can be used after [World.Reset]. The resulting world will have the same entities (in terms of ID, generation and alive state) as the original world. This is necessary for proper serialization of entity relations. However, the entities will not have any components. Panics if the world has any dead or alive entities. For world serialization with components and resources, see module [github.com/mlange-42/ark-serde]. NewEntity creates a new entity with the given components. NewEntityRel creates a new entity with the given components and relation targets. Remove the given components from an entity. SetRelations sets relation targets for an entity. func (*World).Unsafe() Unsafe
UnsafeFilter is a filter for components. It is significantly slower than type-safe generic filters like [Filter2], and should only be used when component types are not known at compile time. Exclusive makes the filter exclusive in the sense that the component composition is matched exactly, and no other components are allowed. Overwrites components set via [Filter.Without]. Query returns a new query matching this filter and the given entity relation targets. Without specifies components to exclude. Resets previous excludes. func NewUnsafeFilter(world *World, ids ...ID) UnsafeFilter func UnsafeFilter.Exclusive() UnsafeFilter func UnsafeFilter.Without(ids ...ID) UnsafeFilter
UnsafeQuery is an unsafe query. It is significantly slower than type-safe generic queries like [Query2], and should only be used when component types are not known at compile time. Close closes the Query and unlocks the world. Automatically called when iteration completes. Needs to be called only if breaking out of the query iteration or not iterating at all. Count returns the number of entities matching this query. Entity returns the current entity. EntityAt returns the entity at a given index. The method is particularly useful for random sampling of entities from a query. However, performance depends on the number of archetypes in the world and in the query. In worlds with many archetypes, it is recommended to use a registered/cached filter. Do not use this to iterate a query! Use [Query.Next] instead. Panics if the index is out of range, as indicated by [Query.Count]. Get returns the queried components of the current entity. ⚠️ Do not store the obtained pointer outside of the current context (i.e. the query loop)! GetRelation returns the entity relation target of the component at the given index. Has returns whether the current entity has the given component. IDs returns the IDs of all component of the current [Entity]n. Next advances the query's cursor to the next entity. *UnsafeQuery : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool] func UnsafeFilter.Query(relations ...Relation) UnsafeQuery
World is the central type holding entity and component data, as well as resources. Alive return whether the given entity is alive. In Ark, entities are returned to a pool when they are removed from the world. These entities can be recycled, with the same ID ([Entity.ID]), but an incremented generation ([Entity.Gen]). This allows to determine whether an entity held by the user is still alive, despite it was potentially recycled. CopyEntity copies an entity with all its components. Creates a new entity and copies the memory of all components. Note that pointer-like fields in components (incl. slices and maps) are copied shallow. I.e. they will point to the same address as the original. Event creates a new event of the given type. The event can be further configured using [Event.For]. It must be emitted using [Event.Emit] to have an effect. See [Event] and [Observer] for details. IsLocked returns whether the world is locked by any queries. NewEntities creates a batch of new entities without any components, running the given callback function on each. The callback function can be nil. NewEntity creates a new [Entity] without any components. RemoveEntities removes all entities matching the given batch filter, running the given function on each. The function can be nil. RemoveEntity removes the given entity from the world. Reset removes all entities and resources from the world, and un-registers all cached filters and observers. Does NOT free reserved memory, remove archetypes, or clear the registry. However, it removes archetypes with a relation component. Can be used to run systematic simulations without the need to re-allocate memory for each run. Accelerates re-populating the world by a factor of 2-3. Resources of the world. Resources are component-like data that is not associated to an entity, but unique to the world. This is only required for unsafe/id-based usage of resources. For the safe API, see [Resource], [AddResource] and [GetResource]. Shrink reduces memory usage by shrinking the capacity of archetype tables. Capacity is reduced to the next power-of-2 of what is occupied, but never below the initial capacities specified during world initialization. Further, it frees empty tables of archetypes with relations. The optional stopAfter argument sets a time limit for the shrink operation. This allows the method to terminate early if the time budget is exceeded, which is especially useful in real-time environments (e.g., games or simulations) where maintaining frame rate is critical. If the time limit is reached before all shrink operations are completed, the method returns true to indicate that further shrink work remains. This enables incremental cleanup across multiple frames or update cycles. Note that timer resolution is limited, particularly on Windows. On Windows, the shortest effective time limit should be around 0.5ms, while it is in the range of microseconds on Unix systems. This method should not be used regularly! Usually, memory should stay allocated for reuse when new entities are created or moved between archetypes when adding or removing components. However, it might be useful in memory-constrained environments e.g. after initialization. Stats reports statistics for inspecting the World. The underlying [stats.World] object is re-used and updated between calls. The returned pointer should thus not be stored for later analysis. Rather, the required data should be extracted immediately. Unsafe provides access to Ark's unsafe, ID-based API. For details, see [Unsafe]. func NewWorld(initialCapacity ...int) *World func github.com/pancsta/asyncmachine-go/pkg/integrations/ark.New(parent *am.Machine, capacity ...int) (*World, *amgraph.Graph, error) func AddResource[T](w *World, res *T) ResID func ComponentID[T](w *World) ID func ComponentIDs(w *World) []ID func ComponentInfo(w *World, id ID) (CompInfo, bool) func GetResource[T](w *World) *T func NewExchange1[A](world *World) *Exchange1[A] func NewExchange2[A, B](world *World) *Exchange2[A, B] func NewExchange3[A, B, C](world *World) *Exchange3[A, B, C] func NewExchange4[A, B, C, D](world *World) *Exchange4[A, B, C, D] func NewExchange5[A, B, C, D, E](world *World) *Exchange5[A, B, C, D, E] func NewExchange6[A, B, C, D, E, F](world *World) *Exchange6[A, B, C, D, E, F] func NewExchange7[A, B, C, D, E, F, G](world *World) *Exchange7[A, B, C, D, E, F, G] func NewExchange8[A, B, C, D, E, F, G, H](world *World) *Exchange8[A, B, C, D, E, F, G, H] func NewFilter0(world *World) *Filter0 func NewFilter1[A](world *World) *Filter1[A] func NewFilter2[A, B](world *World) *Filter2[A, B] func NewFilter3[A, B, C](world *World) *Filter3[A, B, C] func NewFilter4[A, B, C, D](world *World) *Filter4[A, B, C, D] func NewFilter5[A, B, C, D, E](world *World) *Filter5[A, B, C, D, E] func NewFilter6[A, B, C, D, E, F](world *World) *Filter6[A, B, C, D, E, F] func NewFilter7[A, B, C, D, E, F, G](world *World) *Filter7[A, B, C, D, E, F, G] func NewFilter8[A, B, C, D, E, F, G, H](world *World) *Filter8[A, B, C, D, E, F, G, H] func NewMap[T](w *World) *Map[T] func NewMap1[A](world *World) *Map1[A] func NewMap10[A, B, C, D, E, F, G, H, I, J](world *World) *Map10[A, B, C, D, E, F, G, H, I, J] func NewMap11[A, B, C, D, E, F, G, H, I, J, K](world *World) *Map11[A, B, C, D, E, F, G, H, I, J, K] func NewMap12[A, B, C, D, E, F, G, H, I, J, K, L](world *World) *Map12[A, B, C, D, E, F, G, H, I, J, K, L] func NewMap2[A, B](world *World) *Map2[A, B] func NewMap3[A, B, C](world *World) *Map3[A, B, C] func NewMap4[A, B, C, D](world *World) *Map4[A, B, C, D] func NewMap5[A, B, C, D, E](world *World) *Map5[A, B, C, D, E] func NewMap6[A, B, C, D, E, F](world *World) *Map6[A, B, C, D, E, F] func NewMap7[A, B, C, D, E, F, G](world *World) *Map7[A, B, C, D, E, F, G] func NewMap8[A, B, C, D, E, F, G, H](world *World) *Map8[A, B, C, D, E, F, G, H] func NewMap9[A, B, C, D, E, F, G, H, I](world *World) *Map9[A, B, C, D, E, F, G, H, I] func NewResource[T](w *World) Resource[T] func NewUnsafeFilter(world *World, ids ...ID) UnsafeFilter func ResourceID[T](w *World) ResID func ResourceIDs(w *World) []ResID func ResourceType(w *World, id ResID) (reflect.Type, bool) func ResourceTypeID(w *World, tp reflect.Type) ResID func TypeID(w *World, tp reflect.Type) ID func (*Exchange1)[A].New(world *World) *Exchange1[A] func (*Exchange2)[A, B].New(world *World) *Exchange2[A, B] func (*Exchange3)[A, B, C].New(world *World) *Exchange3[A, B, C] func (*Exchange4)[A, B, C, D].New(world *World) *Exchange4[A, B, C, D] func (*Exchange5)[A, B, C, D, E].New(world *World) *Exchange5[A, B, C, D, E] func (*Exchange6)[A, B, C, D, E, F].New(world *World) *Exchange6[A, B, C, D, E, F] func (*Exchange7)[A, B, C, D, E, F, G].New(world *World) *Exchange7[A, B, C, D, E, F, G] func (*Exchange8)[A, B, C, D, E, F, G, H].New(world *World) *Exchange8[A, B, C, D, E, F, G, H] func (*Filter0).New(world *World) *Filter0 func (*Filter1)[A].New(world *World) *Filter1[A] func (*Filter2)[A, B].New(world *World) *Filter2[A, B] func (*Filter3)[A, B, C].New(world *World) *Filter3[A, B, C] func (*Filter4)[A, B, C, D].New(world *World) *Filter4[A, B, C, D] func (*Filter5)[A, B, C, D, E].New(world *World) *Filter5[A, B, C, D, E] func (*Filter6)[A, B, C, D, E, F].New(world *World) *Filter6[A, B, C, D, E, F] func (*Filter7)[A, B, C, D, E, F, G].New(world *World) *Filter7[A, B, C, D, E, F, G] func (*Filter8)[A, B, C, D, E, F, G, H].New(world *World) *Filter8[A, B, C, D, E, F, G, H] func (*Map)[A].New(world *World) *Map[A] func (*Map1)[A].New(world *World) *Map1[A] func (*Map10)[A, B, C, D, E, F, G, H, I, J].New(world *World) *Map10[A, B, C, D, E, F, G, H, I, J] func (*Map11)[A, B, C, D, E, F, G, H, I, J, K].New(world *World) *Map11[A, B, C, D, E, F, G, H, I, J, K] func (*Map12)[A, B, C, D, E, F, G, H, I, J, K, L].New(world *World) *Map12[A, B, C, D, E, F, G, H, I, J, K, L] func (*Map2)[A, B].New(world *World) *Map2[A, B] func (*Map3)[A, B, C].New(world *World) *Map3[A, B, C] func (*Map4)[A, B, C, D].New(world *World) *Map4[A, B, C, D] func (*Map5)[A, B, C, D, E].New(world *World) *Map5[A, B, C, D, E] func (*Map6)[A, B, C, D, E, F].New(world *World) *Map6[A, B, C, D, E, F] func (*Map7)[A, B, C, D, E, F, G].New(world *World) *Map7[A, B, C, D, E, F, G] func (*Map8)[A, B, C, D, E, F, G, H].New(world *World) *Map8[A, B, C, D, E, F, G, H] func (*Map9)[A, B, C, D, E, F, G, H, I].New(world *World) *Map9[A, B, C, D, E, F, G, H, I] func (*Observer).Register(w *World) *Observer func (*Observer).Unregister(w *World) *Observer func (*Observer1)[A].Register(w *World) *Observer1[A] func (*Observer1)[A].Unregister(w *World) *Observer1[A] func (*Observer2)[A, B].Register(w *World) *Observer2[A, B] func (*Observer2)[A, B].Unregister(w *World) *Observer2[A, B] func (*Observer3)[A, B, C].Register(w *World) *Observer3[A, B, C] func (*Observer3)[A, B, C].Unregister(w *World) *Observer3[A, B, C] func (*Observer4)[A, B, C, D].Register(w *World) *Observer4[A, B, C, D] func (*Observer4)[A, B, C, D].Unregister(w *World) *Observer4[A, B, C, D] func Resource[T].New(world *World) Resource[T] func github.com/pancsta/asyncmachine-go/pkg/graph.NewWithWorld(parentMach *am.Machine, world *World) (*graph.Graph, error) func github.com/pancsta/asyncmachine-go/pkg/integrations/ark.NewPubSub(world *World, graph *amgraph.Graph) *ark.PubSub func github.com/pancsta/asyncmachine-go/pkg/integrations/ark.NewWithWorld(parent *am.Machine, world *World) (*amgraph.Graph, error)
Package-Level Functions (total 52)
Type Parameters: T: any AddResource adds a resource to the world. Returns the ID for the added resource. Panics if there is already such a resource. Uses reflection. For more efficiency when used repeatedly, use [Resource]. The number of resources per [World] is limited to 256 (64 with build tag ark_tiny). See also [GetResource].
Type Parameters: T: any C creates a [Comp] instance for the given type.
Type Parameters: T: any ComponentID returns the [ID] for a component type via generics. Registers the type if it is not already registered. The number of unique component types per [World] is limited to 256 (64 with build tag ark_tiny). Panics if called on a locked world and the type is not registered yet. Note that type aliases are not considered separate component types. Type re-definitions, however, are separate types. ⚠️ Warning: Using IDs that are outside of the range of registered IDs anywhere in [World] or other places will result in undefined behavior!
ComponentIDs returns a list of all registered component IDs.
ComponentInfo returns the [CompInfo] for a component [ID], and whether the ID is assigned.
Type Parameters: T: any GetResource returns a pointer to the given resource type in the world. Returns nil if there is no such resource. Uses reflection. For more efficient repeated access, use [Resource]. Once created, it is more than 20 times faster than the GetResource function. See also [AddResource].
Type Parameters: A: any NewExchange1 creates an [Exchange1]. See also [Exchange1.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any NewExchange2 creates an [Exchange2]. See also [Exchange2.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any NewExchange3 creates an [Exchange3]. See also [Exchange3.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any NewExchange4 creates an [Exchange4]. See also [Exchange4.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any NewExchange5 creates an [Exchange5]. See also [Exchange5.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any NewExchange6 creates an [Exchange6]. See also [Exchange6.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any NewExchange7 creates an [Exchange7]. See also [Exchange7.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any NewExchange8 creates an [Exchange8]. See also [Exchange8.New] for a shortcut when constructing an already defined instance.
NewFilter0 creates a new [Filter0]. Use [Filter0.Query] to obtain a [Query0]. See also [Filter0.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any NewFilter1 creates a new [Filter1]. Use [Filter1.Query] to obtain a [Query1]. See also [Filter1.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any NewFilter2 creates a new [Filter2]. Use [Filter2.Query] to obtain a [Query2]. See also [Filter2.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any NewFilter3 creates a new [Filter3]. Use [Filter3.Query] to obtain a [Query3]. See also [Filter3.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any NewFilter4 creates a new [Filter4]. Use [Filter4.Query] to obtain a [Query4]. See also [Filter4.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any NewFilter5 creates a new [Filter5]. Use [Filter5.Query] to obtain a [Query5]. See also [Filter5.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any NewFilter6 creates a new [Filter6]. Use [Filter6.Query] to obtain a [Query6]. See also [Filter6.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any NewFilter7 creates a new [Filter7]. Use [Filter7.Query] to obtain a [Query7]. See also [Filter7.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any NewFilter8 creates a new [Filter8]. Use [Filter8.Query] to obtain a [Query8]. See also [Filter8.New] for a shortcut when constructing an already defined instance.
Type Parameters: T: any NewMap creates a new [Map]. See also [Map.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any NewMap1 creates a new [Map1]. See also [Map1.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any NewMap10 creates a new [Map10]. See also [Map10.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any K: any NewMap11 creates a new [Map11]. See also [Map11.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any J: any K: any L: any NewMap12 creates a new [Map12]. See also [Map12.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any NewMap2 creates a new [Map2]. See also [Map2.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any NewMap3 creates a new [Map3]. See also [Map3.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any NewMap4 creates a new [Map4]. See also [Map4.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any NewMap5 creates a new [Map5]. See also [Map5.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any NewMap6 creates a new [Map6]. See also [Map6.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any NewMap7 creates a new [Map7]. See also [Map7.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any NewMap8 creates a new [Map8]. See also [Map8.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any E: any F: any G: any H: any I: any NewMap9 creates a new [Map9]. See also [Map9.New] for a shortcut when constructing an already defined instance.
Type Parameters: T: any NewResource creates a new [Resource] mapper for a resource type. This does not add a resource to the world, but only creates a mapper for resource access! See also [World.Resources].
NewUnsafeFilter creates a new [UnsafeFilter] matching the given components.
NewWorld creates a new [World]. Accepts zero, one or two arguments. The first argument is the initial capacity of the world, and of normal archetypes. The second argument is the initial capacity of relation archetypes. If only one argument is provided, it is used for both capacities. If no arguments are provided, the defaults are 1024 and 128, respectively.
Observe creates a new ECS event observer for the specified event type. Observers react to structural changes, such as entity creation, removal, and component addition/removal. Use the methods For, With, Without, Exclusive, and Do to configure the observer before registering it. See also [Observe1], [Observe2], etc.
Type Parameters: A: any Observe1 creates a new Observer1. See also [Observer1.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any Observe2 creates a new Observer2. See also [Observer2.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any Observe3 creates a new Observer3. See also [Observer3.New] for a shortcut when constructing an already defined instance.
Type Parameters: A: any B: any C: any D: any Observe4 creates a new Observer4. See also [Observer4.New] for a shortcut when constructing an already defined instance.
Type Parameters: C: any Rel creates a new [Relation] for a component type. It can be used as a safer but slower alternative to [RelIdx]. Requires a component ID lookup when used the first time. On reuse, it is as fast as [RelIdx].
RelID creates a new [Relation] for a component ID. It is used in Ark's unsafe, ID-based API.
RelIdx creates a new [Relation] for a component index. The index refers to the position of the component in the generics of e.g. a [Map2] or [Filter2]. For filters, components specified by [Filter2.With] are also covered by the index. It can be used as faster but less safe alternative to [Rel]. Note that the index should not be confused with a component [ID] as obtained by [ComponentID]! For component IDs, use [RelID].
Type Parameters: T: any ResourceID returns the [ResID] for a resource type via generics. Registers the type if it is not already registered. The number of resources per [World] is limited to 256 (64 with build tag ark_tiny).
ResourceIDs returns a list of all registered resource IDs.
ResourceType returns the reflect.Type for a resource [ResID], and whether the ID is assigned.
ResourceTypeID returns the [ResID] for a resource type. Registers the type if it is not already registered. See [ResourceID] for a more commonly used generic variant.
TypeID returns the [ID] for a component type. Registers the type if it is not already registered. The number of unique component types per [World] is limited to 256 (64 with build tag ark_tiny).
Package-Level Constants (total 7)
OnAddComponents event. Emitted after components are added to an entity.
OnAddRelations event. Emitted after relation targets are added to an entity. Includes creating entities, added components as well as setting relation targets.
OnCreateEntity event. Emitted after an entity is created.
OnRemoveComponents event. Emitted before components are removed from an entity.
OnRemoveEntity event. Emitted before an entity is removed.
OnRemoveRelations event. Emitted before relation targets are removed from an entity. Includes removing entities, removing components as well as setting relation targets.
OnSetComponents event. Emitted after components are set from an entity.