@spearwolf/shadow-objects v0.20.0
hi! welcome to ..
shadow-objects 🧛
Introduction
Shadow-objects is a standalone, reactive entity←component framework 🔥
The original idea is visualized in this overview:
ents is short for latin "entitatis", which translates to "shadow entities"
!IMPORTANT Dear adventurer, be warned: everything here is highly experimental and in active development and constant flux!
The components are created in the view space. Hierarchical. In your browser. There is a JavaScript API for this. But to keep things simple, there are also ready-to-use web components.
<shae-worker-env local? src="./my-personal-shadow-objects.js" />
<shae-ent ns? token="foo">
<shae-ent ns? token="bar">
<shae-prop name="myNumbers" value="1 2 3" type="integer[]" />
</shae-ent>
</shae-ent>
In the shadows, the shadow objects come and go with the entities. An entity can cover many shadows. But all are united by the entity token. That token, which is specified by the view components.
The shadow object module stores which shadow objects are hidden behind a token. Either a function or a class.
shadowObjects.define('token', function() {
console.log('The simplest shadow object ever.');
});
@ShadowObject('token')
class Foo {
constructor({
entity,
provideContext,
useContext,
useProperty,
onDestroy,
}: ShadowObjectParams) {
console.log('hello');
onDestroy(() => {
console.log('bye');
});
}
}
!WARNING Sorry, at this point there should be a precise and crisp introduction to the concepts of the framework, but unfortunately this is not currently available. Instead of that, a few insights into the implementation will follow
TODO ... add documentation here ... !
Here is the big class graph overview:
More in-depth docs here:
4 months ago
2 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
9 months ago
9 months ago
11 months ago
11 months ago
11 months ago
12 months ago