{"_id":"@doot-games/judge","name":"@doot-games/judge","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@doot-games/judge","version":"0.1.0","description":"Timing windows, judgment, scoring, combo, life, and hold handling. Pure logic driven by song time.","type":"module","sideEffects":false,"main":"./src/index.js","module":"./src/index.js","exports":{".":"./src/index.js"},"license":"MIT","author":{"name":"Moheeb Zara"},"_id":"@doot-games/judge@0.1.0","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-UcyesXzhHqZcjfn5nUNmoQyfsxcGeFGHWJ2hbyv0f542Uht8jHPTLTPkzqc9rNxjWBLhft6HUD4F5JxXS+2ADw==","shasum":"100d217b000bde4788e4ebe95d70af35377d0ad4","tarball":"https://registry.npmjs.org/@doot-games/judge/-/judge-0.1.0.tgz","fileCount":3,"unpackedSize":7632,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDKCQo1Gz3Cc2Or1URmIph+E4bVY3aF/BX2udq0Vp8AOAiBKuJTa/Upg43mmNwd5LdrOmLJWIcAljOaFUoOu5baVPQ=="}]},"_npmUser":{"name":"virgilvox","email":"moheeb.698@gmail.com"},"directories":{},"maintainers":[{"name":"virgilvox","email":"moheeb.698@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/judge_0.1.0_1782937992932_0.7871721731299284"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T20:33:12.793Z","0.1.0":"2026-07-01T20:33:13.051Z","modified":"2026-07-01T20:33:13.338Z"},"maintainers":[{"name":"virgilvox","email":"moheeb.698@gmail.com"}],"description":"Timing windows, judgment, scoring, combo, life, and hold handling. Pure logic driven by song time.","author":{"name":"Moheeb Zara"},"license":"MIT","readme":"# @doot-games/judge\n\nTiming windows, judgment, scoring, combo, life, and hold handling. Pure logic\ndriven by song time, no DOM and no audio. The renderer reads its public fields\n(`lastJudge`, `combo`, `holdActive`, `life`, `score`) each frame.\n\n## Windows\n\nHalf-windows in seconds, the modern StepMania 5 defaults verified against\n`src/Player.cpp`:\n\n| Judgment | half-window |\n|---|---|\n| Marvelous | 22.5 ms |\n| Perfect | 45 ms |\n| Great | 90 ms |\n| Good | 135 ms |\n| Boo | 180 ms |\n\nFreeze release grace is 0.25 s: a hold may be released for up to that long before\nit drops. Combo follows ITG: Marvelous, Perfect, and Great keep it; Good, Boo, and\nMiss break it.\n\n## API\n\n`new Judge(chart, options?)` or `createJudge(chart, options?)`.\n\n- `hit(lane, t)` register a tap at song time `t`. Returns the judgment name or null.\n- `update(t, held)` advance to song time `t`; `held` is the per-lane key-down array, used for the freeze grace. Sweeps missed taps and finishes or drops holds.\n- `accuracy()` percent over the note total. `results()` the end-of-song summary with counts, `maxCombo`, `score`, `accuracy`, `grade`, and `fullCombo`.\n- `WINDOWS`, `HOLD_GRACE`, and `gradeFor(accuracyPct)` are exported for reuse.\n\nOptions: `maxScore` (default 1000000), `onJudge(event)`, and `now()` for a\ndeterministic clock in tests. Score is accuracy over the note total plus a flat\nbonus per freeze fully held, kept in one place so a completed hold and a judged\ntap agree.\n","readmeFilename":"README.md","_rev":"1-261f6eac7e65a416946a99d1b6fee656"}