tdzienniak / entropy Goto Github PK
View Code? Open in Web Editor NEWFramework for making games and not only games in entity system manner.
License: MIT License
Framework for making games and not only games in entity system manner.
License: MIT License
Write some getting stared guide and tutorials:
In packages/entropy/src/System.js
, the this.stopResponding();
and this.startResponding();
look swapped. The comments basically rephrase the code, explaining only that it's about events, but what I wonder a lot more is: Why should a system respond to events when disabled, and not respond when enabled?
Hi,
I'm the author of BitSet.js and as you rely on this lib (even a quite old version), I want to notify you, that I changed the API of BitSet with version 3.0.0 that method invocations no longer change the state of the actual object, but return a new object.
Making BitSet immutable was a big step, but I think it makes things more reliable. I just browsed your code and found 3 occurrences which should be changed in order to work with 3.0.
Sorry for any inconveniences.
Robert
Hi, I wondered about the "prop" requirement in "Writing plugins" and for me it didn't "become clear, when [I saw] the code". Why won't the plugin system add the "prop" property to my plugin factory in case it's missing?
On most systems any function has a name property that can be used, but my gut feeling is that you should add some unique ID (e.g. counter) anyway to avoid conflict between multiple plugins that happen to have the same name, like when you use multiple copies of a "recoverSpellPoints" plugin for different kinds of magic.
Example:
function registerPlugin(plug) {
var propUid;
if (!plug.prop) {
propUid = (+registerPlugin.propUid || 0) + 1;
registerPlugin.propUid = propUid;
plug.prop = (plug.name || 'anon') + '#' + propUid;
console.log('registered with generated prop:', plug.prop);
} else {
console.log('registered with existing prop:', plug.prop);
}
}
var PluginA = (opts) => {};
var PluginB = (opts) => {};
var PluginC = (opts) => {};
registerPlugin(PluginA); // prints: registered with generated prop: PluginA#1
registerPlugin(PluginA); // prints: registered with existing prop: PluginA#1
registerPlugin(PluginB); // prints: registered with generated prop: PluginB#2
registerPlugin(PluginB); // prints: registered with existing prop: PluginB#2
registerPlugin(PluginC); // prints: registered with generated prop: PluginC#3
registerPlugin(PluginC); // prints: registered with existing prop: PluginC#3
In an execution environment where functions don't have .name
s, they'll just be all "anon" but still get unique .prop
s.
Update: Fixed to avoid repeated console messages. (They weren't silent, I just didn't see the "ร2".)
User should be able to write a query which will match entities with some component OR some other component.
Documentation for modules:
Tested funcionality:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.