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

@bscotch/sprite-source

v1.6.0

Published

Art pipeline scripting module for GameMaker sprites.

Readme

Sprite Source

This project provides utilities for creating art asset pipelines for GameMaker games. It is used in Stitch for VSCode and developed against the pipeline and team requirements of Butterscotch Shenanigans. It may or may not be applicable to other use cases.

⚠️ This package will make irreversible changes to your files! Use it at your own risk, and use version control to keep everything safe.

Core Concepts

An "art pipeline" is the process by which an artist gets from their art from editing/creating tools (like Clip Studio Paint or Photoshop) to having an in-game sprite. For the approach taken by this package, an art pipeline consists of the following:

  1. Art Generator. The tools used by artists to create art assets. In our case, Clip Studio Paint.
  2. A "Sprite Source". A Sprite Source is a collection of raw art exports created by the Art Generator, placed into "staging" areas. This is documented by a sprites.source.json configuration file. Staging areas are listed in this file, where each consists of:
    • A directory where raw exports can be found.
    • Configuration information for how raw files should be transformed. For example, whether images should be renamed, cropped, and/or bled.
  3. A "Sprite Destination" (SpriteDest). This is assumed to be a GameMaker project, where final versions of art assets should end up as sprite frames (or Spine sprites). This is all governed by a sprites/.stitch/sprites.import.json config file in the GameMaker project. This config file contains an array of "sources", where each source includes:
    • The path to a Sprite Source
    • Optional paths to "Collaborator Sources". These are other Sprite Sources that are not used for import, but if sprites are found in both the source and the collaborator sources, then imports will only happen if
    • Options to ignore source files or auto-prefix them

Configuration

Your pipelines are configured by a combination of config files:

  • A config called .stitch/sprites.import.json will be added to your project's sprites folder. This config lists your Sprite Sources and adds some options for how to handle them, like prefixing incoming sprite names.
  • A config called .stitch/sprites.source.json will be added to each of your root Sprite Source folders. These folders are what the project's sprites.import.json references. These configs are used to describe your "stages", which are a collection of subconfigs describing which image files within the root Sprite Source folder should be exported and how to transform them (e.g. adding bleeds, cropping, or renaming).

This config files include a field called $schema, pointing to a JSON Schema that describes their content. If you open these config files in editors that understand that information, like VSCode and many other IDEs and code editors, you'll be able to hover over things to get descriptions, get autocompletes, and see warnings if something looks invalid.

Usage

You can create and use pipelines using this package from Stitch for VSCode, the CLI, or programmatically.

Requirements

To create an art pipeline, you'll need:

  • A folder (of folders) of source images
    • Spine sprites are allowed
    • Only PNGs are supported
    • Each terminal folder containing one or more PNGs is treated as a "Sprite", with each PNG treated as a subimage for that sprite
      • The terminal folder name is used as the sprite name (⚠️ make sure each one is unique!)
      • The subimage order in GameMaker will match the alphabetical sort order of the PNG names
  • A GameMaker project using a fairly current version of GameMaker
  • Git. (Not strictly required, but a really good idea!)

Stitch for VSCode

Stitch for VSCode has this package built right into it, and has an option to turn on a "watch" mode so that as you make changes to your source images they'll immediately get imported into your GameMaker project.

To use it, get VSCode and install the Stitch extension, then open the Stitch panel and look for the "Sprite Sources" sub-panel (it's probably the bottom-most one). From there you can find buttons to add sprite source folders, add stages to them, open the config files for direct editing, toggle the import watcher, manually run an import, and see a list of sprites updated in the current session.

CLI

To get some CLI commands, you can install this globally via npm install -g @bscotch/sprite-source (or pnpm add -g @bscotch-sprite-source). This will make the CLI command spsrc available in you your terminal (run spsrc --help to see your options).

As of writing, there are two CLI commands:

  • spsrc add-source path/to/image/collection path/to/project.yyp will initialize the two configuration files you need to create a default pipeline
  • spsrc import path/to/project.yyp will run the transform/import process on any changed source images, syncing your source images with your GameMaker sprites

Programmatic

If you have a Typescript-aware code editor, you can write Node scripts in Typescript or JavaScript and get information from your editor about the programmatic API.

The main entrypoints are:

import { SpriteSource, SpriteDest } from '@bscotch/sprite-source';

const source = await SpriteSource.from('path/to/raw/exports');
// Ensure that the cached data about the raw images is up to date.
await source.update();

// Import into a project
const dest = await SpriteDest.from('my/project.yyp');
await dest.import({
  sources: [
    {
      source: source.configFile,
      prefix: 'sp_',
    },
  ],
});