Spaces:
Running
Running
Cheek squish: stronger early growth
Browse files116 unmodified lines117118119120121122309 unmodified lines432433434435436437438116 unmodified lines// The current logo's source, so a sweet spot can be reloaded exactly.let logoSource: { name: string; sample: boolean; svg: string } | null = null;let debug = false;let firstFit = true; // the first logo snaps the camera into place; later ones glidefunction setStatus(msg: string) {309 unmodified lines// 0 until the logo is really pressing near the cheek; full once it reaches the cheek point.const near = coverReach > 0 ? Math.max(0, Math.min(1, (coverReach - dist) / coverReach)) : 0;// v8: the cheek squishes in step with the logo (same squish level), not before it.coverTarget = version.cheekFollowsSquish ? near * squish : near;}[cover, coverVel] = springScalar(cover, coverVel, coverTarget, 120, 16, dt);[heartScale, heartVel] = springScalar(heartScale, heartVel, engaged ? 1 : 0, 160, 12, dt);116 unmodified lines117118119120121122123309 unmodified lines433434435436437438439440116 unmodified lines// The current logo's source, so a sweet spot can be reloaded exactly.let logoSource: { name: string; sample: boolean; svg: string } | null = null;let debug = false;const CHEEK_EASE = 0.7; // < 1: the cheek squish grows faster in the early part (1 = linear with the squish level)let firstFit = true; // the first logo snaps the camera into place; later ones glidefunction setStatus(msg: string) {309 unmodified lines// 0 until the logo is really pressing near the cheek; full once it reaches the cheek point.const near = coverReach > 0 ? Math.max(0, Math.min(1, (coverReach - dist) / coverReach)) : 0;// v8: the cheek squishes in step with the logo (same squish level), not before it.// (Eased out: it starts with the logo squish but builds a bit faster early on.)coverTarget = version.cheekFollowsSquish ? near * Math.pow(squish, CHEEK_EASE) : near;}[cover, coverVel] = springScalar(cover, coverVel, coverTarget, 120, 16, dt);[heartScale, heartVel] = springScalar(heartScale, heartVel, engaged ? 1 : 0, 160, 12, dt);
src/main.ts+3-1