@vworlds/vecs 1.0.41 → 1.0.42

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vworlds/vecs",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -181,9 +181,12 @@ world.query("ByCell").with(Networked, Position).groupBy(InCell); // index by tar
181
181
  - **`Relationship.target` is an `Entity` — not directly serialisable, but
182
182
  relationships can be networked** when listed in `networkComponents`.
183
183
  `vecs-protocol` registers `Relationship.prototype.target` as an `"entity"`
184
- wire field (u32 eid), so subclasses like `ChildOf` serialise their target
185
- as a raw entity id. The client resolves the id to a live entity (creating a
186
- ghost placeholder if the parent hasn't arrived yet).
184
+ wire field (u32 eid), so subclasses serialise their target as a raw entity
185
+ id. The client resolves the id to a live entity (creating a ghost
186
+ placeholder if the parent hasn't arrived yet). Use a dedicated relationship
187
+ class per concern — e.g. `ChildOf` for server-local ownership/lifecycle,
188
+ `DrawIn` (in vecs-phaser) for networked display hierarchy — so the two
189
+ concerns don't overload a single relationship.
187
190
  - **Retargeting is a plain data change** (no archetype churn). Prefer retargeting a relationship
188
191
  over swapping marker components to express "which bucket this entity is in."
189
192
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vworlds/vecs",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",