Giter Club home page Giter Club logo

js13k-ecs's People

Contributors

hectate avatar kutuluk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

js13k-ecs's Issues

option to extend Entity class?

I'm using js13k-ecs in a roguelike project for pretty much everything in the game. It's going along great but I ran into a little hurdle that I hadn't quite decided how to overcome. Basically, I created a set of Entity classes that collected all the necessary bits and threw them into the ECS for me during the constructor. Essentially freeing me up to simply put down let player = new Player(...); and end up with everything in place.
All fine and dandy until I realized that my player object was not a part of the Entity class itself and therefore would need constant workaround of stuff like player.entity to access the ECS belonging to the object, and by extension any related components.
To simplify, I thought I could extend the js13k-ecs Entity class so that the Player class would play well (hah) with the ECS directly. Sadly, the Entity class is not exported so that's not possible.

What I'm curious about is, am I breaking something or doing something wrong if I simply added the export keyword to the Entity class in my version (and, should we add it to the entire module this way)? I'm self-taught at JS and it's entirely possible that I've missed something obvious. I appreciate any feedback you have. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.