@adatechnology/game-characters-three 0.8.0 → 0.8.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.
package/dist/index.js CHANGED
@@ -78,7 +78,7 @@ import {
78
78
  walkPoseVertex,
79
79
  woundBodyOf,
80
80
  woundDecal
81
- } from "./chunk-3CHBEUHW.js";
81
+ } from "./chunk-XSMP7T6O.js";
82
82
 
83
83
  // src/instanced/body-geometry.ts
84
84
  import { shapeGeometries } from "@adatechnology/game-shapes-three";
@@ -1005,7 +1005,7 @@ var createPlayerAvatar = (THREE, options = {}) => {
1005
1005
  for (const key of ["skin", "hair"]) if (typeof spec[key] === "string") spec[key] = hexOf(spec[key]);
1006
1006
  const best = createBestBuilder(THREE, { types: [{ name: String(spec.type), eye: 0 }], random: createRng2(Number(spec.seed ?? 1)) });
1007
1007
  const body = best.build(spec);
1008
- best.topM().color.setHex(options.shirtColor ?? hexOf(player_avatar_default.shirtColor));
1008
+ best.topM()?.color.setHex(options.shirtColor ?? hexOf(player_avatar_default.shirtColor));
1009
1009
  const rig = body.userData.rig;
1010
1010
  const profile = { f: 1.1, a: 0.28, k: 0.35, arm: WALK_ARM, bob: WALK_BOB };
1011
1011
  const animator = createRigAnimator({ gaits: { [rig.type]: profile } });