@forgeax/engine-scene 0.1.26 → 0.1.28

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.
@@ -1 +1 @@
1
- {"version":3,"file":"malformed-hierarchy-edge.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/malformed-hierarchy-edge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAM/D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,YAAY,GACnB,IAAI,CAmBN"}
1
+ {"version":3,"file":"malformed-hierarchy-edge.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/malformed-hierarchy-edge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAsD/D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,YAAY,GACnB,IAAI,CAoBN"}
package/dist/index.mjs CHANGED
@@ -1239,9 +1239,9 @@ import {
1239
1239
  Update
1240
1240
  } from "@forgeax/engine-ecs";
1241
1241
  import {
1242
- getDerivedWriter,
1243
- worldInternal
1242
+ getDerivedWriter
1244
1243
  } from "@forgeax/engine-ecs/internal";
1244
+ import { worldRead } from "@forgeax/engine-ecs/world-read";
1245
1245
  import { mat4 } from "@forgeax/engine-math";
1246
1246
  import { err as err5, ok as ok5 } from "@forgeax/engine-types";
1247
1247
  var PROPAGATE_TRANSFORMS_SYSTEM = "propagateTransforms";
@@ -1432,7 +1432,7 @@ function propagateFlat(world, scratch) {
1432
1432
  return pairError(0, "dense Transform and GlobalTransform derived bindings");
1433
1433
  }
1434
1434
  const transformBindings = transformWriter.bindings;
1435
- const structureEpoch = world[worldInternal].getStructureEpoch();
1435
+ const structureEpoch = world.getStructureEpoch();
1436
1436
  if (scratch.flatStructureEpoch === structureEpoch) return ok5(void 0);
1437
1437
  ensureFlatBuffers(scratch, transformBindings);
1438
1438
  resetFlatBuffers(scratch);
@@ -1442,7 +1442,7 @@ function propagateFlat(world, scratch) {
1442
1442
  if (binding === void 0 || changed === void 0) continue;
1443
1443
  for (let row = 0; row < binding.rowCapacity; row += 1) {
1444
1444
  const entity = binding.entities[row] ?? 0;
1445
- const parentRaw = world[worldInternal].getFieldValue(entity, ChildOf, "parent");
1445
+ const parentRaw = world[worldRead].getFieldValue(entity, ChildOf, "parent");
1446
1446
  if (parentRaw !== void 0 && parentRaw !== ENTITY_NULL_RAW2) continue;
1447
1447
  countPropagation("flatStructuralRootRows");
1448
1448
  composeBindingRow(binding, row, void 0, 0, scratch, changed);
@@ -1779,7 +1779,7 @@ function walkChildren(world, root, writer, bindings, transformWriter, transformB
1779
1779
  stackChildren[top] = 0;
1780
1780
  continue;
1781
1781
  }
1782
- const childrenLength = world[worldInternal].getArrayLength(current, Children, "entities") ?? 0;
1782
+ const childrenLength = world[worldRead].getArrayLength(current, Children, "entities") ?? 0;
1783
1783
  if (nextChild >= childrenLength) {
1784
1784
  stackEntities.pop();
1785
1785
  stackChildren.pop();
@@ -1795,7 +1795,7 @@ function walkChildren(world, root, writer, bindings, transformWriter, transformB
1795
1795
  }
1796
1796
  stackChildren[top] = nextChild + 1;
1797
1797
  countPropagation("hierarchyEdgesVisited");
1798
- const childRaw = world[worldInternal].getArrayElement(current, Children, "entities", nextChild);
1798
+ const childRaw = world[worldRead].getArrayElement(current, Children, "entities", nextChild);
1799
1799
  if (childRaw === void 0 || childRaw === ENTITY_NULL_RAW2) {
1800
1800
  report(
1801
1801
  hierarchyError(
@@ -2034,7 +2034,7 @@ function propagateHierarchy(world, scratch) {
2034
2034
  const entities = binding.entities;
2035
2035
  for (let row = 0; row < binding.rowCapacity; row += 1) {
2036
2036
  const entity = entities[row] ?? 0;
2037
- const parentRaw = world[worldInternal].getFieldValue(entity, ChildOf, "parent");
2037
+ const parentRaw = world[worldRead].getFieldValue(entity, ChildOf, "parent");
2038
2038
  if (parentRaw === void 0 || parentRaw === ENTITY_NULL_RAW2) {
2039
2039
  walkChildren(
2040
2040
  world,