michalbe / cervus

:video_game: tiny WebGL 3d game engine
MIT License
28 stars 4 forks source link

Remove get_entities_by_component in favor of game.components #137

Open stasm opened 6 years ago

stasm commented 6 years ago

game.components.get() may now be used to get sets of component instances by constructor. Use component.entity to get to the entity containing the instance.

stasm commented 6 years ago

@michalbe It looks like #135 broke a few examples (I'll fix it). I tested this in LOGOUT and it worked fine.