npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gamewota/beatmap-editor

v1.1.2

Published

A React component library for editing rhythm game beatmaps

Downloads

392

Readme

Beatmap Editor

A React component library for editing 5-lane rhythm-game beatmaps. Ships as an npm package, a UMD bundle, and a framework-agnostic Web Component.

  • Demo: https://gamewota.github.io/beatmap-editor/
  • npm: @gamewota/beatmap-editor
  • Source: https://github.com/gamewota/beatmap-editor

Install

npm install @gamewota/beatmap-editor

Peer dependencies: React 18 or 19.

Quick start

import { useState } from 'react'
import { BeatmapEditor, Note } from '@gamewota/beatmap-editor'
import '@gamewota/beatmap-editor/style.css'

function App() {
  const [notes, setNotes] = useState<Note[]>([])

  return (
    <BeatmapEditor
      duration={180}            // seconds
      bpm={175}
      offsetMs={670}            // ms before first beat
      snapDivision={8}          // 1/8 grid (default)
      notes={notes}
      onNotesChange={setNotes}
    />
  )
}

Click a lane to place a tap note. Right-click a note to delete it. Pick Hold, click once to set the start, click again on the same lane to set the end.

Features

  • Canvas-based timeline with batched rendering (handles long songs without UI lag)
  • Sub-beat grid: visible subdivisions follow the snap setting (1/1 → 1/16)
  • All note placement always snaps to the grid — no off-grid notes
  • 5 lanes, tap + hold notes with cross-note links
  • Audio waveform display with shared zoom/scroll
  • Preview SFX on playback
  • Exports to a JSON schema designed for game runtimes (see below)
  • Available as React component, UMD bundle, and Web Component

Beatmap JSON schema

The editor reads and writes this exact shape:

{
  "bpm": 175,
  "offset": 670,
  "charts": [
    {
      "uuid": "807c1493-05a8-46e8-ae11-e2bca474d5f1",
      "laneCount": 5,
      "notes": [
        { "uuid": "...", "songPos": 0,    "beat": 0, "label": "", "lane": 1 },
        { "uuid": "...", "songPos": 1371.4285714285713, "beat": 4, "label": "", "lane": 3 }
      ],
      "links": [
        {
          "uuid": "...",
          "startNote": { "uuid": "...", "songPos": 27428.57, "beat": 80, "label": "", "lane": 0 },
          "endNote":   { "uuid": "...", "songPos": 28800.00, "beat": 84, "label": "", "lane": 0 }
        }
      ]
    }
  ]
}
  • songPos is in ms relative to offset (audio time = songPos + offset).
  • beat = songPos / (60000 / bpm) (fractional values are allowed for sub-beat snaps).
  • lane is 0-indexed (0 = leftmost, 4 = rightmost).
  • Tap notes appear only in notes[]. Hold notes appear as two entries in notes[] plus one entry in links[] referencing them (full object copies, not pointers).

Full schema reference: INTEGRATION.md → Beatmap JSON schema.

Snap convention

The snap denominator follows music notation — it divides the whole note (1 measure in 4/4), not a beat:

| Setting | Snap interval | Lines per measure | |---|---|---| | 1/1 (Whole) | 1 measure (4 beats) | 1 — measures only | | 1/2 (Half) | 2 beats | 2 | | 1/4 (Quarter) | 1 beat | 4 | | 1/8 (Eighth) | 1/2 beat | 8 (default) | | 1/16 (Sixteenth)| 1/4 beat | 16 |

Sub-beat subdivisions are rendered as thin lines between measure and beat lines.

Docs

License

MIT