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

sekai-sus2img

v1.0.0

Published

A standalone sus to image rendering library for Project Sekai.

Readme

sekai-sus2img

A standalone SUS (Sliding Universal Score) to SVG/PNG rendering library for Project Sekai, extracted from Uni-PJSK-Viewer.

This project is a TypeScript rewrite of the python SUS rendering engine from pjsekai/scores.

Features

  • Parses .sus files into typed Score models
  • Supports custom timing rebase rules (rebase.json)
  • Renders standard notes (Taps, Flicks, Directionals) and complex Slide paths
  • Cross-platform: Uses DOM Canvas in Browser for PNG, and raw SVG string parsing
  • Generates SVG vector and static PNG outputs.

Usage

import { renderSusToPng, renderSusToSvg } from 'sekai-sus2img';

const result = await renderSusToPng(
    {
        sus: '...sus file content...',
        difficulty: 'MASTER',
        playlevel: '33',
        title: 'Example',
        // Optional pixel height per second, affects the length of the score
        pixel: 240, 
    },
    {
        // Optional: Provide the base origin URL where static note assets are stored
        // The library expects to find `logo.png` and `static/notes_new/custom01/` folder inside this path.
        // If omitted, it will default to the current root `/`.
        assetOrigin: 'https://example.com' 
    }
);

console.log(result.url); // A blob: URL to display the generated PNG image

About assetOrigin

The assetOrigin option is crucial for loading note asset images (e.g. Taps, Flicks, Long notes) during the rendering process. You must host the required Project Sekai note assets on a web server because the canvas needs to fetch them via HTTP.

  • Structure: Host the assets such that [assetOrigin]/static/notes_new/custom01/ contains the sliced note images (note_normal.png, note_flick.png, etc.).
  • Default Behavior: If you do NOT provide assetOrigin, the library falls back to loading from / (the root of the host where the script is running), meaning it will look for /static/notes_new/....
  • CORS Notice: If your assetOrigin points to a different domain, ensure the server has proper Cross-Origin Resource Sharing (CORS) headers, otherwise the SVG/Canvas will fail to fetch and embed the images.

Example Ready-to-use Asset Origins:

  • You can directly use the viewer's asset origin if you don't want to host your own:
    assetOrigin: 'https://viewer.unipjsk.com'
  • Or you can refer to the folder structure from the original repository and host it on your own CDN: 👉 watagashi-uni/Uni-PJSK-Viewer - public/static/notes_new

Setup & Dev

npm install
npm run build

License

MIT