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

kaplay-atb-plugin

v0.2.0

Published

A KAPLAY plugin to create active time bar!

Readme

KAPLAY ATB Plugin

A KAPLAY plugin to create active time bar!

Install

npm i kaplay-atb-plugin

Usage

Import the plugin into your kaplay game.

import kaplay from "kaplay";
import ATB from 'kaplay-atb-plugin'

const k = kaplay({
    width: 800,
    height: 600,
    plugins: [ATB],
});

const atb = k.createATB(3, 200, 20, { x: 100, y: 100 }, () => { console.log("ATB filled!"), { outline: 4 } });

To pause or resume the bar.

atb.pause()

By default. The bar will be destroyed when it is filled. If you wish to end it early.

atb.remove()

Since both the wrapper and bar are GameObj. It is easy to expand it by adding components or change param value.

// Add text to the center of the bar
atb.bar.add([
    k.text('Flexible ATB', { size: 16, font: "monospace", width: atb.bar.width, align: 'center' }),
])

// Change outline color
atb.wrapper.outline.color = k.color(200, 150, 200).color

Parameters

  • time - Number of seconds for the ATB to fill
  • width - Width of the ATB bar
  • height - Height of the ATB bar
  • pos - Position of the ATB bar in the game world
  • action - Things to do when the ATB bar is filled
  • options - Optional parameters for customizing the ATB bar

Options

  • wrapperColor - Optional color for the wrapper of the ATB bar in rgb format
  • barColor - Optional color for the ATB bar in rgb format
  • radious - A number to set radius for the corners of the ATB bar (default: null)
  • reverse - If true, the bar will go in reverse order (from right to left)
  • outline - A number to set the width of outline (default : null)
  • stay - If true, the bar will stay on the screen after filling (default: false)

P.S

Just in case if you need to change the color with option reverse set to true. Please noted that the color for both wrapper and bar are swapped to simulate the effect.