DougHamil / threeagent

ClojureScript library for building Three.js apps in a reagent-like fashion
MIT License
134 stars 10 forks source link

v1.0 - IEntity protocol #34

Closed DougHamil closed 3 years ago

DougHamil commented 3 years ago

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:

All built-in defcomponent should be replaced with this protocol.