diff --git a/src/app/features/scene/creatures.test.ts b/src/app/features/scene/creatures.test.ts index 011f19e3..938c217f 100644 --- a/src/app/features/scene/creatures.test.ts +++ b/src/app/features/scene/creatures.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { BUCKET_SCALE, creatureScale, NEUTRAL_SCALE, SizeBucket } from './creatures'; +import { BUCKET_SCALE, creatureScale, SizeBucket } from './creatures'; const buckets: SizeBucket[] = ['small', 'medium', 'large']; @@ -17,7 +17,7 @@ describe('creature scale', () => { it('does not crash or default to medium when a non-neutral creature has no sizeBucket', () => { expect(creatureScale({ neutral: false })).toBeNull(); - expect(creatureScale({ sizeBucket: undefined, neutral: false })).not.toBe(BUCKET_SCALE.medium); + expect(creatureScale({ sizeBucket: undefined, neutral: false })).toBeNull(); }); it('draws nothing for an unknown bucket, including inherited property names', () => { diff --git a/src/app/features/scene/creatures.ts b/src/app/features/scene/creatures.ts index b67a423c..a0b2bd29 100644 --- a/src/app/features/scene/creatures.ts +++ b/src/app/features/scene/creatures.ts @@ -33,5 +33,5 @@ export const BUCKET_SCALE: Readonly> = { /** The draw scale, or null when nothing is drawn: a neutral creature, or a bucket that is absent or unknown. */ export function creatureScale(c: Pick): number | null { if (c.neutral || c.sizeBucket === undefined) return null; - return Object.hasOwn(BUCKET_SCALE, c.sizeBucket) ? BUCKET_SCALE[c.sizeBucket] : null; + return Object.prototype.hasOwnProperty.call(BUCKET_SCALE, c.sizeBucket) ? BUCKET_SCALE[c.sizeBucket] : null; } diff --git a/src/app/features/scene/world.ts b/src/app/features/scene/world.ts index ba366a6e..e9594a68 100644 --- a/src/app/features/scene/world.ts +++ b/src/app/features/scene/world.ts @@ -25,9 +25,9 @@ export const WORLD = { erodeNorm: 0.5, // Bound on |grad| of the phasor's cos component for the side and norm above. Libby measured a // sup of 6.63 at |side| = 1.5, n = 0 (CultLib PR #1 head 990521b3); 7.0 adds margin. - // The sup was measured, not proved. The - // shader passes roughness n = 0 as a literal, so the doc envelope max(10, 1.25|side|)/(1-n) - // needs no 1/(1-n) factor here; if n ever becomes nonzero, divide this bound by (1 - n). + // The sup was measured, not proved. The shader passes roughness n = 0 as a literal, so the doc + // envelope max(10, 1.25|side|)/(1-n) needs no 1/(1-n) factor here; if n ever becomes nonzero, + // divide this bound by (1 - n). // |value| <= 1 holds by construction (the output is a normalized phasor). // Typed number, not the literal 7, so callers can build variants such as { ...WORLD, phacelleGradBound: 0 }. phacelleGradBound: 7.0 as number,