@forgeax/engine-ecs 0.1.23 → 0.1.25
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 +42 -1
- package/dist/buffer-pool.d.ts +4 -5
- package/dist/buffer-pool.d.ts.map +1 -1
- package/dist/component.d.ts +9 -6
- package/dist/component.d.ts.map +1 -1
- package/dist/errors/query-and-component-errors.d.ts +1 -1
- package/dist/errors/query-and-component-errors.d.ts.map +1 -1
- package/dist/externalization/index.mjs.map +1 -1
- package/dist/index.mjs +597 -152
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +3 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +6 -1
- package/dist/internal.mjs.map +1 -1
- package/dist/projection/index.mjs.map +1 -1
- package/dist/query/derived-range-writer.d.ts +14 -0
- package/dist/query/derived-range-writer.d.ts.map +1 -1
- package/dist/query/query.d.ts.map +1 -1
- package/dist/shared.mjs.map +1 -1
- package/dist/world-component-access.d.ts +63 -18
- package/dist/world-component-access.d.ts.map +1 -1
- package/dist/world-component-storage.d.ts +26 -10
- package/dist/world-component-storage.d.ts.map +1 -1
- package/dist/world-entity-lifecycle.d.ts.map +1 -1
- package/dist/world-internal.d.ts +1 -1
- package/dist/world-internal.d.ts.map +1 -1
- package/dist/world.d.ts +5 -0
- package/dist/world.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/archetype.unit.test.ts +38 -10
- package/src/__tests__/relationship-index.test.ts +147 -1
- package/src/buffer-pool.ts +47 -74
- package/src/component.ts +9 -6
- package/src/errors/query-and-component-errors.ts +4 -1
- package/src/internal.ts +3 -0
- package/src/query/derived-range-writer.ts +111 -0
- package/src/query/query.ts +26 -1
- package/src/world-component-access.ts +427 -127
- package/src/world-component-storage.ts +104 -18
- package/src/world-entity-lifecycle.ts +49 -9
- package/src/world-internal.ts +5 -0
- package/src/world.ts +52 -3
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './component';
|
|
2
|
+
export type { WorldInternal } from './world-internal';
|
|
3
|
+
export { worldInternal } from './world-internal';
|
|
2
4
|
import type { Result } from '@forgeax/engine-types';
|
|
3
5
|
import type { Component } from './component';
|
|
4
6
|
import type { QuerySpanUnavailableError } from './errors';
|
|
@@ -12,5 +14,5 @@ export declare const DERIVED_WRITER: unique symbol;
|
|
|
12
14
|
* the public Query and QuerySpan surfaces remain read/write-only contracts.
|
|
13
15
|
*/
|
|
14
16
|
export declare function getDerivedWriter<R extends readonly Component[], W extends readonly Component[], O extends readonly Component[], C extends W[number]>(query: Query<R, W, O>, component: C): Result<DerivedRangeWriter<R[number], C>, QuerySpanUnavailableError>;
|
|
15
|
-
export type { DerivedColumnBinding, DerivedRangeRowCommit, DerivedRangeRowProbe, DerivedRangeWriter, } from './query/derived-range-writer';
|
|
17
|
+
export type { DerivedColumnBinding, DerivedRangeCursor, DerivedRangeRowCommit, DerivedRangeRowProbe, DerivedRangeWriter, } from './query/derived-range-writer';
|
|
16
18
|
//# sourceMappingURL=internal.d.ts.map
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AASA,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AASA,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,OAAO,MAEC,CAAC;AAYtC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,SAAS,SAAS,EAAE,EAC9B,CAAC,SAAS,SAAS,SAAS,EAAE,EAC9B,CAAC,SAAS,SAAS,SAAS,EAAE,EAC9B,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAEnB,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACrB,SAAS,EAAE,CAAC,GACX,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,yBAAyB,CAAC,CAGrE;AAED,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
|
package/dist/internal.mjs
CHANGED
|
@@ -42,6 +42,11 @@ function assertComponentStorage(value) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// src/world-internal.ts
|
|
46
|
+
var worldInternal = /* @__PURE__ */ Symbol.for(
|
|
47
|
+
"forgeax.ecs.worldInternal"
|
|
48
|
+
);
|
|
49
|
+
|
|
45
50
|
// src/errors.ts
|
|
46
51
|
var SchemaUnsupportedFieldError = class extends Error {
|
|
47
52
|
name = "SchemaUnsupportedFieldError";
|
|
@@ -487,6 +492,6 @@ function getDerivedWriter(query, component) {
|
|
|
487
492
|
return internalQuery[DERIVED_WRITER](component);
|
|
488
493
|
}
|
|
489
494
|
|
|
490
|
-
export { ComponentCatalog, ComponentInUseError, ComponentNameConflictError, DERIVED_WRITER, MANAGED_ARRAY_ELEMENT_TYPES, TYPE_METADATA, bufferFieldByteLength, componentDefinition, componentId, componentSchema, defineComponent, fieldTypeToMetaKey, getDerivedWriter, isComponentDefinitionOrderValid, isEntityField, isManagedArrayField, isManagedBufferField, isManagedField, isSchemaVocabKeyword, parseManagedArraySchema };
|
|
495
|
+
export { ComponentCatalog, ComponentInUseError, ComponentNameConflictError, DERIVED_WRITER, MANAGED_ARRAY_ELEMENT_TYPES, TYPE_METADATA, bufferFieldByteLength, componentDefinition, componentId, componentSchema, defineComponent, fieldTypeToMetaKey, getDerivedWriter, isComponentDefinitionOrderValid, isEntityField, isManagedArrayField, isManagedBufferField, isManagedField, isSchemaVocabKeyword, parseManagedArraySchema, worldInternal };
|
|
491
496
|
//# sourceMappingURL=internal.mjs.map
|
|
492
497
|
//# sourceMappingURL=internal.mjs.map
|