You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great! We picked an ECS, legion. Now comes the fun part - implementing it.
I think the best place to start is Hotham::Program. Ultimately one of the most important things in hotham is making sure that the interface a developer will use to create an app is as simple as possible.
The asteroid could look something like:
structAsteroid{model:Model,transform:Transform,// new functionality like physics, sound etc. will go here}structTransform{position:Vector3<f32>,rotation:Quaternion<f32>,scale:Vector3<f32>,}letmut world = World::new();let asteroid = Asteroid{model: asteroid_model,transform:Transform{position:vec3(0.0,1.0,0.0),rotation:Default::default(),scale:vec3(1.0,1.0,1.0),}}
world.push(asteroid);
That's pretty straightforward. The refinery is the same, except we need to make sure its parent is the asteroid, somehow.
This is pretty different from our current Node based structure, which is just lifted from gltf. We'll need to approach the migration of Node to legion based components separately.
What's even trickier is things like Hands, for instance.
Overview
Great! We picked an ECS, legion. Now comes the fun part - implementing it.
I think the best place to start is
Hotham::Program
. Ultimately one of the most important things in hotham is making sure that the interface a developer will use to create an app is as simple as possible.The asteroid could look something like:
That's pretty straightforward. The refinery is the same, except we need to make sure its parent is the asteroid, somehow.
This is pretty different from our current
Node
based structure, which is just lifted fromgltf
. We'll need to approach the migration ofNode
tolegion
based components separately.What's even trickier is things like Hands, for instance.
We'd then have something like a
HandsSystem
that takes the current XR state and updates theAnimation
andTransform
components accordingly.TODO
legion
dependencyHotham::Program
to return aWorld
legion
#47legion
architecture #50Hands
usinglegion
#51The text was updated successfully, but these errors were encountered: