diff --git a/README.md b/README.md index 63f568e..fa4c871 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,14 @@ $ new_name.jpg ; Create a new file with name / 3 ; Load history id ``` -##Brush -``` -& 10 ; Size 10 -& -4 ; Eraser, Size 4 -& 4 #ff0000 ; Red brush, Size 4 -& ? ; Size 1, black -``` - -##Pointers +##Brush(Pointers) ``` +> 10 ; Size 10 +> -4 ; Eraser, Size 4 > 10,0 ; Add pointer at pos -> 0,0 400,0 ; Mirror X, at 400px -> ? ; Remove pointers +> -400,0 ; Add mirror pointer, at 400x +> 4 #ff0000 ; Red brush, Size 4 +> ? ; Remove last pointer ``` ##Guides diff --git a/scripts/ronin.brush.js b/scripts/ronin.brush.js index 4593071..b3958d7 100644 --- a/scripts/ronin.brush.js +++ b/scripts/ronin.brush.js @@ -1,10 +1,27 @@ function Brush() { + Module.call(this); + this.position = new Position(); this.is_drawing = false; this.size = 1; this.opacity = 1; + // Module + + this.active = function(cmd) + { + if(cmd.position()){ + var pointer = new Pointer(cmd.position()); + this.add_pointer(pointer); + } + } + + this.passive = function(cmd) + { + console.log("Nothing to do."); + } + // Commander this.settings = function(p)