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
Replace the defcomponent macro with IEntity protocol.
The IEntity protocol allows users to register custom entities with threeagent. IEntity implementations will then be passed in to the threeagent.core/render function as a map, in the same manner as ISystem. This should provide a more consistent dev experience, and allows for more flexibility in defining new types of entities.
The protocol should have these methods:
create - creates an instance of this entity type, which should be a ThreeJS object
destroy - destroys an instance of this entity type
update - does an in-place update of an instance of this entity type, provided the original ThreeJS object and updated parameters
All built-in defcomponent should be replaced with this protocol.
The text was updated successfully, but these errors were encountered:
Replace the
defcomponent
macro withIEntity
protocol.The
IEntity
protocol allows users to register custom entities with threeagent.IEntity
implementations will then be passed in to thethreeagent.core/render
function as a map, in the same manner asISystem
. This should provide a more consistent dev experience, and allows for more flexibility in defining new types of entities.The protocol should have these methods:
create
- creates an instance of this entity type, which should be a ThreeJS objectdestroy
- destroys an instance of this entity typeupdate
- does an in-place update of an instance of this entity type, provided the original ThreeJS object and updated parametersAll built-in
defcomponent
should be replaced with this protocol.The text was updated successfully, but these errors were encountered: