Skip to content

JuanLPalacios/Abr.js

Repository files navigation

Abr.js

npm license

JavaScript abr format parser based on the Krita Abr Storage.

Quick Start

  1. Import the async functions loadAbrBrushes for File objects or loadAbrFromArrayBuffer for ArrayBuffer.
  2. User either use a callback function loadAbrBrushes(file).then(callback) or await syntax let brushes = await loadAbrBrushes(file), to get the brushes data in an array of AbrBrush.
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

🤝 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published