@dcl/ecs 7.0.3-3584826534.commit-9df0cb7 → 7.0.3-3584900424.commit-d08747d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -15
- package/dist/engine/index.js +2 -6
- package/dist/runtime/invariant.d.ts +3 -1
- package/dist/runtime/invariant.js +3 -1
- package/dist/schemas/Map.js +0 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,18 +8,3 @@ Run `make build`
|
|
|
8
8
|
|
|
9
9
|
## Testing
|
|
10
10
|
Run `make test`, you can also debug the test in VS code, selecting the launch `Jest current file` or just `Jest` (this will run all test)
|
|
11
|
-
|
|
12
|
-
## Wishlist
|
|
13
|
-
Use this project as template for TypeScript libraries
|
|
14
|
-
- [x] as any MutableGroupOf
|
|
15
|
-
- [x] Tests for system
|
|
16
|
-
- [ ] Basic Components ( Transform ) w/Tests
|
|
17
|
-
- [ ] Sync Component W/Tests
|
|
18
|
-
- [x] CRDT System
|
|
19
|
-
- [ ] Kindof Scene Tests. Component & Systems. Maybe physics system? SolarSystem
|
|
20
|
-
- [ ] Integration with old ecs ( CRDT/Door Scene )
|
|
21
|
-
- [ ] RPC Transport. JSON { entityId, componentId, data: } vs Protocol Buffers
|
|
22
|
-
- [ ] EntityID generator
|
|
23
|
-
- [ ] Static vs Dynamic entities.
|
|
24
|
-
- [ ] Sync Components ?
|
|
25
|
-
- [ ] Where the state lives ? State cross realms/islands ? StateFull questions. StorableComponent ?
|
package/dist/engine/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { defineComponent as defComponent } from './component';
|
|
|
5
5
|
import { EntityContainer } from './entity';
|
|
6
6
|
import { SystemContainer, SYSTEMS_REGULAR_PRIORITY } from './systems';
|
|
7
7
|
export * from './input';
|
|
8
|
+
import { checkNotThenable } from '../runtime/invariant';
|
|
8
9
|
export * from './readonly';
|
|
9
10
|
export * from './types';
|
|
10
11
|
function preEngine() {
|
|
@@ -109,11 +110,7 @@ export function Engine() {
|
|
|
109
110
|
crdtSystem.receiveMessages();
|
|
110
111
|
for (const system of engine.getSystems()) {
|
|
111
112
|
const ret = system.fn(dt);
|
|
112
|
-
|
|
113
|
-
if (ret && typeof ret === 'object' && typeof ret.then === 'function') {
|
|
114
|
-
throw new Error(`A system (${system.name || 'anonymous'}) returned a thenable. Systems cannot be async functions. Documentation: https://dcl.gg/sdk/sync-systems`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
113
|
+
checkNotThenable(ret, `A system (${system.name || 'anonymous'}) returned a thenable. Systems cannot be async functions. Documentation: https://dcl.gg/sdk/sync-systems`);
|
|
117
114
|
}
|
|
118
115
|
// TODO: Perf tip
|
|
119
116
|
// Should we add some dirtyIteratorSet at engine level so we dont have
|
|
@@ -156,7 +153,6 @@ export function Engine() {
|
|
|
156
153
|
removeEntityWithChildren,
|
|
157
154
|
addSystem: engine.addSystem,
|
|
158
155
|
removeSystem: engine.removeSystem,
|
|
159
|
-
// TODO: fix this type
|
|
160
156
|
defineComponent: engine.defineComponent,
|
|
161
157
|
defineComponentFromSchema: engine.defineComponentFromSchema,
|
|
162
158
|
getEntitiesWith: engine.getEntitiesWith,
|
package/dist/schemas/Map.js
CHANGED
|
@@ -5,14 +5,12 @@ export function IMap(spec) {
|
|
|
5
5
|
return {
|
|
6
6
|
serialize(value, builder) {
|
|
7
7
|
for (const key in spec) {
|
|
8
|
-
// TODO: as any
|
|
9
8
|
spec[key].serialize(value[key], builder);
|
|
10
9
|
}
|
|
11
10
|
},
|
|
12
11
|
deserialize(reader) {
|
|
13
12
|
const newValue = {};
|
|
14
13
|
for (const key in spec) {
|
|
15
|
-
// TODO: as any
|
|
16
14
|
;
|
|
17
15
|
newValue[key] = spec[key].deserialize(reader);
|
|
18
16
|
}
|
|
@@ -21,7 +19,6 @@ export function IMap(spec) {
|
|
|
21
19
|
create() {
|
|
22
20
|
const newValue = {};
|
|
23
21
|
for (const key in spec) {
|
|
24
|
-
// TODO: as any
|
|
25
22
|
;
|
|
26
23
|
newValue[key] = spec[key].create();
|
|
27
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
|
-
"version": "7.0.3-
|
|
3
|
+
"version": "7.0.3-3584900424.commit-d08747d",
|
|
4
4
|
"description": "Decentraland ECS",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"dist",
|
|
36
36
|
"etc"
|
|
37
37
|
],
|
|
38
|
-
"commit": "
|
|
38
|
+
"commit": "d08747dea26ba46738fda26e28689bbc03603b71"
|
|
39
39
|
}
|