
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
tweed-spritepacker
Advanced tools
A Node.js script for creating spritesheets for use in games.
Currently it outputs layout/animation data suitable for using with CreateJS, though support for other engines could be added in the future.
After sprites = require('gamesprites')
, call sprites.compile(dir, outname)
where dir
is a path to a directory of images to be
packed into a spritesheet, and outname
is where to save the output image and data, sans extension.
For example, sprites.compile("resources/sprites", "static/images/spritesheet")
will pack
all of the images in resources/sprites and output static/images/spritesheet.png and static/images/spritesheet.json.
The script will pack all valid images in the provided directory into a single texture atlas, and assign names to the animations based on the source images' filenames. If a filename ends with an underscore followed by a number, it'll truncate that and use the number as a cue for ordering within an animation. For example:
idle.png
will generate a single-frame animation called "idle".walk_0.png
, walk_1.png
, walk_2.png
will generate a three-frame animation called "walk".Other options can be set by adding a suffix to the filename followed by the options. The options are:
s and p affect the whole animation, but only need to be marked on the first frame of that animation.
For example:
idle__bc.png
will generate a single frame with a registration point at the bottom-center of the sprite.walk_0__s0.5cm.png
, walk_1.png
, walk_2.png
will generate a three-frame animation with a registration point at the center/middle of each frame at half speed.The frames will just be ordered by the frame number given. That is, x_0.png
, x_3.png
, x_5.png
will generate a three-frame animation in that order; the "missing" frames 1, 2, and 4 won't break anything.
FAQs
Sprite packing tool for HTML5 games
We found that tweed-spritepacker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.