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

hikarin-vn-viewer

v1.1.6

Published

![NPM Version](https://img.shields.io/npm/v/hikarin-vn-viewer) ![License](https://img.shields.io/npm/l/hikarin-vn-viewer)

Downloads

33

Readme

HikarinVN Viewer

NPM Version License

A lightweight, web-based runtime for Visual Novels.
This library renders the story data generated by the Hikarin Framework.

⚠️ Important: This viewer is designed to play scripts created using the Hikarin Framework Python SDK. You do not need to write the JSON manually.

👉 Get the SDK here: github.com/Iteranya/hikarin-framework


📦 Installation

Option 1: Via CDN (Fastest)

Great for static sites or quick testing. Add this to your HTML <head>:

<script src="https://unpkg.com/hikarin-vn-viewer@latest/dist/hikarin-vn-viewer.umd.js"></script>

Option 2: Via NPM

Great for bundlers (Vite, Webpack, React, Vue).

npm install hikarin-vn-viewer

🚀 Quick Start

  1. Export your script using the Python SDK (e.g., story.json).
  2. Create a container in your HTML.
  3. Initialize the viewer by fetching your JSON.
<!DOCTYPE html>
<html>
<head>
    <script src="https://unpkg.com/hikarin-vn-viewer@latest/dist/hikarin-vn-viewer.umd.js"></script>
</head>
<body>

    <!-- 1. The Container (Set a width/height or let it fill the screen) -->
    <div id="vn-container" style="width: 1000px; margin: 0 auto;"></div>

    <script>
        // 2. Fetch the JSON generated by the Python SDK
        fetch('./story.json')
            .then(res => res.json())
            .then(scriptData => {

                // 3. Initialize the Engine
                const vn = new window.HikarinVN('vn-container', scriptData, {
                    assetsPath: "./assets/",   // Path to your images folder
                    debug: false,              // Set to true during development
                    globals: {}                // Initial Save Data (optional)
                });

                // 4. Start the game
                vn.start();

            })
            .catch(err => console.error("Could not load script:", err));
    </script>

</body>
</html>

⚙️ Configuration Options

| Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | assetsPath | string | "" | The base URL or local folder where your images are stored. The SDK generates relative paths (e.g., chars/cupa.png), and the viewer prepends this path to them. | | debug | boolean | false | Enables the visual Debug Panel, showing active variables, engine state, and sprite bounding boxes. | | globals | object | {} | Inject an object here to load Save Data or set initial flags (e.g., { affection: 10 }). |


🐞 Debugging Tools

If your story isn't behaving correctly, set debug: true in the configuration.

  1. The Debug Panel: A UI will appear below the game window.
    • Globals: Shows persistent variables (Affection, Story Flags).
    • Locals: Shows temporary variables for the current scene.
    • Status: Shows the current engine state (PLAYING, WAITING, CHOICE).
  2. Sprite Boxes: Sprites will have colored borders to help you visualize their alignment and padding.
  3. Console Logs: Open your browser's Developer Tools (F12). The engine provides color-coded logs for every step, logic check, and jump.

📂 Asset Management

The Hikarin Framework SDK defines image paths in your Python script.

  • If your Python script says: characters/cupa/happy.png
  • And your Viewer config is: assetsPath: "https://my-game.com/static/"
  • The browser will load: https://my-game.com/static/characters/cupa/happy.png

Ensure your web server's folder structure matches the folder structure used in your Python project.