Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/AustinEast/heaps-aseprite
Load and render sprites and animations in Aseprite format. Based on the ase and openfl-aseprite libraries. Sample Aseprite files all borrowed from openfl-aseprite
.
.aseprite
or .ase
file.png
and .asedata
files)AseAnim
Class to easily render Animations (based on the Heaps Engine's Anim
Class)heaps-aseprite requires Haxe 4 and the Heaps Engine to run.
Install the library from haxelib:
haxelib install heaps-aseprite
Alternatively the dev version of the library can be installed from github:
haxelib git heaps-aseprite https://github.com/AustinEast/heaps-aseprite.git
Install heaps-aseprite's dependency, ase.
haxelib install ase
Then include the library in your project's .hxml
:
-lib heaps-aseprite
// Get the whole sprite as a Tile
var spr1 = new Bitmap(Res.single_frame_sprite.toAseprite().toTile(), s2d);
// Alternatively get the sprite directly as an Image
var image = new Bitmap(Res.single_frame_sprite.toImage().toTile(), s2d);
// Get an animation from the sprite's tag
var spr2 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk'), s2d);
spr2.loop = true;
// Override the direction of a tagged animation
var spr3 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk', AnimationDirection.REVERSE), s2d);
spr3.loop = true;
// Get an animation based on tag and slice
var spr4 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk', -1, 'Head'), s2d);
spr4.loop = true;
// Get a single frame from a slice
var slice = new Bitmap(Res.slices.toAseprite().getSlice('Slice 1').tile, s2d);
// Get all frames from a slice
var slice2 = new AseAnim(Res.slices.toAseprite().getSlices('Slice 1'), s2d);
slice2.loop = true;
// Get a 9-Slice ScaleGrid from a slice
var nineSlice = Res.nine_slices.toAseprite().toScaleGrid('9-Slices', 0, s2d);
// Live Resource Updatng
var animation = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk'), s2d);
animation.loop = true;
Res.animated_sprite.watch(() -> {
// Make sure to call the default `watch()` callback!
Res.animated_sprite.updateData();
// Replay the animation to get the updated frames
animation.play(Res.animated_sprite.toAseprite().getTag('walk'));
});
// Want type-safe Tags and Slices? Use the `Dictionary` class to get typed references from an Aseprite resource
var typeSafeTags = Dictionary.getTags(Res.animated_sprite);
new AseAnim(Res.animated_sprite.toAseprite().getTag(typeSafeTags.walk), flow);
var typeSafeSlices = Dictionary.getSlices(Res.slices);
new Bitmap(Res.slices.toAseprite().getSlice(typeSafeSlices.Slice_1).tile, flow);
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.