Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
aseprite-loader
Advanced tools
This is a webpack loader that loads [Aseprite](https://www.aseprite.org/) [`.ase` and `.aseprite` files](https://github.com/aseprite/aseprite/blob/master/docs/ase-file-specs.md) via [ase-parser](https://github.com/TheCyberRonin/ase-parser).
aseprite-loader
This is a webpack loader that loads Aseprite .ase
and .aseprite
files via ase-parser.
It sets module.exports
of the file you're importing to an object of the type AsepriteLoader.Data
as defined below:
declare namespace AsepriteLoader {
interface Data {
frames: Array<AsepriteLoader.Frame>;
layers: Array<AsepriteLoader.Layer>;
tags: Array<AsepriteLoader.Tag>;
palette?: AsepriteLoader.Palette;
fileSize: number;
width: number;
height: number;
numFrames: number;
colorDepth: number;
numColors: number;
pixelRatio: string;
colorProfile: {
type: string;
flag: number;
fGamma: number;
};
}
interface Palette {
paletteSize: number;
firstColor: number;
lastColor: number;
colors: Array<Color>;
}
interface Color {
red: number;
green: number;
blue: number;
alpha: number;
name: string;
}
interface Cel {
layerIndex: number;
xpos: number;
ypos: number;
opacity: number;
celType: number;
w: number;
h: number;
rawCelData: Uint8Array;
}
interface Tag {
name: string;
from: number;
to: number;
animDirection: string;
color: string;
}
interface Layer {
flags: number;
type: number;
layerChildLevel: number;
blendMode: number;
opacity: number;
name: string;
}
interface Frame {
bytesInFrame: number;
frameDuration: number;
numChunks: number;
cels: Array<Cel>;
}
}
NOTE: Even if a Cel is of type 2 (zlib compressed), the
rawCelData
will always be inflated, as if it was type 0. See the Aseprite File Format Specification for more info.
// webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.ase(prite)?$/i,
use: ["aseprite-loader"],
},
],
},
};
const blueSlime = require("./blue-slime.aseprite");
console.log(blueSlime);
// Object { frames: [...], layers: [...], ... };
MIT
FAQs
This is a webpack loader that loads [Aseprite](https://www.aseprite.org/) [`.ase` and `.aseprite` files](https://github.com/aseprite/aseprite/blob/master/docs/ase-file-specs.md) via [ase-parser](https://github.com/TheCyberRonin/ase-parser).
We found that aseprite-loader 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.