@adatechnology/game-animals-three 0.3.0 → 0.3.1

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.
@@ -92,6 +92,15 @@ var GameAnimalsThree = (() => {
92
92
  return outcome === "dies" ? "dead" : "alive";
93
93
  };
94
94
 
95
+ // ../game-contracts/dist/index.js
96
+ var KIT_ORIGIN_KEY = "kitOrigin";
97
+ function markKitOrigin(object2, origin) {
98
+ const node = object2;
99
+ node.userData = node.userData ?? {};
100
+ node.userData[KIT_ORIGIN_KEY] = { ...origin };
101
+ return object2;
102
+ }
103
+
95
104
  // ../game-shapes/dist/chunk-R4RY23RH.js
96
105
  function canonicalJson(value) {
97
106
  if (value === null) return "null";
@@ -3155,6 +3164,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
3155
3164
  else if (species.body.kind === "bird") buildBird(THREE, rig, { extra: BIRD_EXTRAS[species.id] });
3156
3165
  else buildQuadruped(THREE, rig, { document: species.body.texture ? documentOf() : void 0, extra: QUADRUPED_EXTRAS[species.id] });
3157
3166
  rig.triangles = countTriangles(rig.root);
3167
+ markKitOrigin(rig.root, { owner: "game-animals-three", kind: "animal", id: species.id });
3158
3168
  rig.root.traverse((object2) => {
3159
3169
  if (object2.isMesh) object2.userData.speciesId = species.id;
3160
3170
  });