Comments (7)
Thanks! The actual file in the repo is up-to-date, but for some reason readthedocs isn't. I'll take a look.
from entity-system-js.
Yes I saw.
Maybe hosting it in the gh-pages could be easier.
from entity-system-js.
It was a configuration issue with rtfd. It's solved now: https://entity-system-js.readthedocs.io/en/latest/#components (you might have to refresh your cache).
from entity-system-js.
Oh I just saw the commit fixing the documentation.
from entity-system-js.
This error still exists in the Processors section.
https://github.com/adngdb/entity-system-js/blob/master/docs/index.md#processors
That said; is there not a way to query the manager for all entities with a component? The example requires an entity ID to be passed to manager.getEntityWithComponent()
but I'm looking for a way to get an array (or similar) of all entity ids that have the component assigned without knowing the IDs beforehand.
from entity-system-js.
Reviewing the Concentration example I came across this:
RenderingProcessor.prototype.initTiles = function () {
var cards = this.manager.getComponentsData('Card');
for (var entityId in cards) {
this.createCardTile(entityId, cards[entityId]);
}
};
Is that the recommended approach?
from entity-system-js.
@Hectate Yes, getComponentsData
is how to get all entities that have the specified component. In version 1.5.0, that method returns an object of entityID
-> componentData
. Thanks for noticing the mismatch in documentation, I'm on it!
from entity-system-js.
Related Issues (20)
- Add documentation for assemblages
- Add link to gdpjam8 game HOT 2
- Parameters order for addComponentsToEntity method
- Remove processor-manager.js file HOT 1
- Why are component props put behind getter/setters? HOT 2
- Internal representation question/suggestion HOT 3
- Add performance tests around ensy
- Collect use cases and difficulties from users to improve documentation HOT 4
- entityHasComponent method should return falseinstead of throwing an Error object when unknown component is found. HOT 1
- Send events to Processors HOT 1
- Implement export and import to JSON
- Publish v1.4.0 HOT 1
- 1.4 API change not usable? HOT 4
- Proposal; `addComponents()`
- Proposals; `addAssemblages` and `addProcessors`
- [Idea] Having a way of creating an entity with an initial state HOT 2
- Make a minified version available HOT 7
- Merge processor-manager.js into entity-system.js HOT 1
- Make entity-system a npm module HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entity-system-js.