-
Notifications
You must be signed in to change notification settings - Fork 6
Feature: World with components definable after initialization #431
Copy link
Copy link
Open
Labels
featureFeature requests and ideasFeature requests and ideas
Description
For now a world can only contain components passed to it at initialization. I saw that Flecs allows also to pass components after that. We could also support that as an optional feature, creating an underlying RunTimeWorld or similar like so
mutable struct RunTimeWorld <: _AbstractWorld
world::World
endand if one does add_components!(world, (...)) (maybe also support remove_components!?) we use the still unimplemented #158 to reconstruct the world and then we swap it inside the RunTimeWorld struct. One will pay compile time again but if the user cooperates and uses function barriers no perf penalty should occur. In practice this means the user should unwrap the world autonomously though I think.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureFeature requests and ideasFeature requests and ideas