@adatechnology/game-weapons-three 0.11.0 → 0.11.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.
@@ -39055,9 +39055,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
39055
39055
  /** How far the shooting hand slides on its grip so the thumb reaches the safety lever. */
39056
39056
  thumbReach: 0.02,
39057
39057
  /** How fast the supporting hand goes to the magazine and back, per second. */
39058
- magRate: 7,
39059
- /** The hands shrink with the tool: a tool drawn at scale `s` takes hands at `s ** handScaleExponent`. */
39060
- handScaleExponent: 0.55
39058
+ magRate: 7
39061
39059
  };
39062
39060
  var handFrame = (THREE, x, y) => {
39063
39061
  const ax = x.clone().normalize();
@@ -39147,7 +39145,8 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
39147
39145
  right,
39148
39146
  left,
39149
39147
  leftMagazine,
39150
- scale: holderScale ** HAND_HOLD.handScaleExponent,
39148
+ // the hands at the tool's scale: a tool drawn smaller than the hands looks like a toy in them
39149
+ scale: holderScale,
39151
39150
  grip: HAND_HOLD.closed,
39152
39151
  gripLeft: HAND_HOLD.forend
39153
39152
  };
@@ -39162,7 +39161,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
39162
39161
  const long = head && ["smg", "carbine", "rifle", "sniper", "shotgun", "crossbow", "flame"].includes(category);
39163
39162
  const headSize = head ? size(head) : null;
39164
39163
  const left = long && head && headSize ? { part: group, offset: head.position.clone().add(V(THREE, -headSize.x * 0.15, -headSize.y / 2 - HAND_HOLD.palm, 0)), quaternion: forendFrame(THREE) } : null;
39165
- return { right, left, leftMagazine: null, scale: scale ** HAND_HOLD.handScaleExponent, grip: HAND_HOLD.closed, gripLeft: HAND_HOLD.forend };
39164
+ return { right, left, leftMagazine: null, scale, grip: HAND_HOLD.closed, gripLeft: HAND_HOLD.forend };
39166
39165
  }
39167
39166
 
39168
39167
  // ../game-fluids/dist/index.js
@@ -60364,7 +60363,7 @@ void main(){vec2 d=gl_PointCoord-.5;float r=length(d)*2.;if(r>1.)discard;float a
60364
60363
  ahead.set(0, 0, -1).applyQuaternion(camera2.quaternion);
60365
60364
  if (reach === 0) reach = Math.max(0.01, measureReach(session));
60366
60365
  const free = options.contact(camera2.position, ahead, WALL_PULL.probe);
60367
- const want = free === null ? 0 : Math.max(0, Math.min(WALL_PULL.max, reach + WALL_PULL.margin - free));
60366
+ const want = free === null ? 0 : Math.max(0, Math.min(Math.max(WALL_PULL.max, session.lengthMetres * session.holderScale), reach + WALL_PULL.margin - free));
60368
60367
  pull += (want - pull) * Math.min(1, dt * WALL_PULL.rate);
60369
60368
  if (pull < 1e-4) return;
60370
60369
  hand.position.addScaledVector(ahead, -pull);