abr-js
v0.1.1
Published
JavaScript abr format parser
Downloads
2
Readme
Abr.js
JavaScript abr format parser based on the Krita Abr Storage.
Quick Start
- Import the async functions
loadAbrBrushes
forFile
objects orloadAbrFromArrayBuffer
forArrayBuffer
. - User either use a callback function
loadAbrBrushes(file).then(callback)
or await syntaxlet brushes = await loadAbrBrushes(file)
, to get the brushes data in an array ofAbrBrush
.
const { loadAbrBrushes } from 'abr-js';
const filePicker = document.createElement('input');
filePicker.type = 'file';
filePicker.onchange = async ()=>{
const file = filePicker.files[0]
if(file){
let brushes = await loadAbrBrushes(file);
console.log(brushes);
}
}
document.body.appendChild(filePicker)
Built With
- TypeScript
- RollUp
Author
👤 Juan Luis Palacios
- GitHub: @JuanLPalacios
- Twitter: @JuanLuisPalac20
- LinkedIn: LinkedIn
🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Show your support
Give a ⭐️ if you like this project!
Acknowledgments
The Krita contributors
📝 License
This project is GPL-2.0 licensed.