@adatechnology/game-characters-three 0.8.1 → 0.9.0

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Three, B as BestSpec, a as BestPose, P as PersonSpec, b as PersonCharacter, c as PersonGroupSpec, L as LegRig, A as ArmRig, d as PersonExtra, R as RichRig, e as BloodLook, F as FluidsBridge, C as CharacterSound, f as AvatarItemUsePose, g as AvatarViewMode, h as ReachView, i as PlayerAvatar } from './testing-CsC-BhNN.js';
2
- export { j as AVATAR_AREA_ID, k as AreaContext, l as AvatarEvent, m as AvatarTestOptions, n as AvatarUpdate, o as BODY_MATERIAL_DEF, p as BODY_SOUNDS, q as BloodAge, r as BloodLookOptions, s as BloodSink, t as BodySegment, u as BodySoundRule, v as CHARACTERS_AREA_ID, w as CharacterSoundOptions, x as CharacterSoundSink, y as CharacterSoundStyle, z as CharactersTestOptions, D as FilmSink, E as FluidsBridgeOptions, H as HIT_PRESETS, G as HitPreset, I as PERSON_ITEM_PREFIX, J as PLAYER_SOUNDS, K as PlayPoseOptions, M as PlayerAvatarColors, N as PlayerAvatarOptions, O as PlayerAvatarSpec, Q as PoseTargets, S as ProfessionCard, U as RigAnimator, V as RigAnimatorOptions, W as UNDEAD_VOICES, X as UNDEAD_VOICE_SOURCES, Y as UndeadCard, Z as UndeadLike, _ as UndeadVoice, $ as VoiceMoment, a0 as VoiceStep, a1 as WoundSpray, a2 as ZOMBIE_ITEM_PREFIX, a3 as bloodLookOfAge, a4 as createAvatarTestModule, a5 as createCharacterSound, a6 as createCharactersTestModule, a7 as createFluidsBridge, a8 as createPlayerAvatar, a9 as createRigAnimator, aa as personSpecOf, ab as registerBodyMaterial } from './testing-CsC-BhNN.js';
1
+ import { T as Three, B as BestSpec, a as BestPose, P as PersonSpec, b as PersonCharacter, c as PersonGroupSpec, L as LegRig, A as ArmRig, d as PersonExtra, R as RichRig, e as BloodLook, F as FluidsBridge, C as CharacterSound, f as AvatarItemUsePose, g as AvatarViewMode, h as ReachView, i as PlayerAvatar } from './testing-CqU1CJ_y.js';
2
+ export { j as AVATAR_AREA_ID, k as AreaContext, l as AvatarEvent, m as AvatarTestOptions, n as AvatarUpdate, o as BODY_MATERIAL_DEF, p as BODY_SOUNDS, q as BloodAge, r as BloodLookOptions, s as BloodSink, t as BodySegment, u as BodySoundRule, v as CHARACTERS_AREA_ID, w as CharacterSoundOptions, x as CharacterSoundSink, y as CharacterSoundStyle, z as CharactersTestOptions, D as FilmSink, E as FluidsBridgeOptions, H as HIT_PRESETS, G as HitPreset, I as PERSON_ITEM_PREFIX, J as PLAYER_SOUNDS, K as PlayPoseOptions, M as PlayerAvatarColors, N as PlayerAvatarOptions, O as PlayerAvatarSpec, Q as PoseTargets, S as ProfessionCard, U as RigAnimator, V as RigAnimatorOptions, W as UNDEAD_VOICES, X as UNDEAD_VOICE_SOURCES, Y as UndeadCard, Z as UndeadLike, _ as UndeadVoice, $ as VoiceMoment, a0 as VoiceStep, a1 as WoundSpray, a2 as ZOMBIE_ITEM_PREFIX, a3 as bloodLookOfAge, a4 as createAvatarTestModule, a5 as createCharacterSound, a6 as createCharactersTestModule, a7 as createFluidsBridge, a8 as createPlayerAvatar, a9 as createRigAnimator, aa as personSpecOf, ab as registerBodyMaterial } from './testing-CqU1CJ_y.js';
3
3
  import { BodySpec, SegmentId, PoseClip, PoseClipEvent, FirstPersonClip } from '@adatechnology/game-characters';
4
4
  import * as THREE_NS from 'three';
5
5
  import { LightBudget, SourceHandle } from '@adatechnology/game-render-three';
@@ -965,6 +965,7 @@ type RoomAvatarLike = {
965
965
  running: boolean;
966
966
  crouch: boolean;
967
967
  down: boolean;
968
+ fallForward?: boolean;
968
969
  armed: boolean;
969
970
  pitch: number;
970
971
  push?: {
@@ -11703,9 +11703,9 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
11703
11703
  const pivot = new THREE.Vector3(0, HIP_HEIGHT, 0).applyEuler(tilt.rotation);
11704
11704
  tilt.position.set(0, hip, 0).sub(pivot);
11705
11705
  };
11706
- const placeBody = (progress) => {
11706
+ const placeBody = (progress, forward) => {
11707
11707
  const fk = progress * progress * (3 - 2 * progress);
11708
- const flip = fract(cycles * 1.7) >= 0.5 ? 1 : 0;
11708
+ const flip = forward === void 0 ? fract(cycles * 1.7) >= 0.5 ? 1 : 0 : forward ? 1 : 0;
11709
11709
  tilt.rotation.set((-DOWN.tilt + flip * 2 * DOWN.tilt) * fk, 0, Math.sin(cycles * 7) * DOWN.roll * fk, "XYZ");
11710
11710
  const hip = new THREE.Vector3(0, HIP_HEIGHT, 0);
11711
11711
  const target = new THREE.Vector3(0, DOWN.hipY, -DOWN.hipZ + flip * DOWN.hipZFlip);
@@ -11796,7 +11796,7 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
11796
11796
  }
11797
11797
  }
11798
11798
  if (seat?.pose === "lie") layBody(seat.hip);
11799
- else placeBody(fall);
11799
+ else placeBody(fall, state.fallForward);
11800
11800
  stepClip(dt, down, Boolean(state.crouch || seat));
11801
11801
  const cascadeDt = run && !run.clip.loop ? dt * clipCascade : dt;
11802
11802
  const targetWithoutBob = rig.fig.position.y - bob;
@@ -12342,7 +12342,8 @@ ${accessoryHead}`).replace("{ vec3 _nn = objectNormal; bodyAnim(position, _nn);"
12342
12342
  ...state.itemUse !== void 0 ? { itemUse: state.itemUse } : {},
12343
12343
  ...state.push !== void 0 ? { push: state.push } : {},
12344
12344
  ...state.seat !== void 0 ? { seat: state.seat } : {},
12345
- ...state.door !== void 0 ? { door: state.door } : {}
12345
+ ...state.door !== void 0 ? { door: state.door } : {},
12346
+ ...state.fallForward !== void 0 ? { fallForward: state.fallForward } : {}
12346
12347
  });
12347
12348
  readFeet();
12348
12349
  },