README
pixi-paint-brush
This tool is a easy way of implementing paint bush into your project.
This project is still in development, and more tools will be added to hopefully help you out on your project
How to use this project
Firstval you have to clone this project and open in a code editor of your choice, and make sure you have node js installed.
Open your terminal at the root project folder and type:
npm install
(this command will make sure all dependences will be installed).
After all dependence is in the right place, lets start the project by typing:
npm start
(this project uses babel + webpack to initialize the application).
By default the project will run at http://localhost:8080/, it can change if you already running an application on port 8080.
For testing, open the browser developer console, and start to drag the mouse, you will see log messages telling what direction you are swaping.
How to use
Import PaintCanvas.js that is located at script folder
Create a PaintCanvas
// create a PainCanvas passinf an image as parameter
let image = new PIXI.Sprite.fromImage(url);
let paintCanvas = new PaintCanvas(image);
// Done!
Set Color
paintCanvas.SetColor(color);
Set Brush Size
paintCanvas.SetSize(size);
NPM install
Yes! you can import using npm
npm i pixi-paint-brush
import and use on your project
import { PaintCanvas } from 'pixi-paint-brush/src/script/PaintCanvas'