Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.