Updated presets
This commit is contained in:
@@ -8,7 +8,7 @@ function Brush(rune)
|
||||
this.add_mode(new Mode("erase","shift"));
|
||||
this.add_setting(new Setting("color","#000000"));
|
||||
this.add_setting(new Setting("size","2"));
|
||||
this.add_method(new Method("add",["Position","Color","Scale"],["mirror_x","mirror_y"]));
|
||||
this.add_method(new Method("add",["Position","Color","Scale","Angle"],["mirror_x","mirror_y"]));
|
||||
this.add_method(new Method("clear"));
|
||||
|
||||
this.add = function(cmd, preview = false)
|
||||
@@ -30,6 +30,7 @@ function Brush(rune)
|
||||
pointer.offset = cmd.position() ? cmd.position() : new Position("0,0");
|
||||
pointer.color = cmd.color() ? cmd.color().hex : this.settings["color"].value;
|
||||
pointer.scale = cmd.value() ? cmd.value().float : 1;
|
||||
pointer.angle = cmd.angle() ? cmd.angle().degrees : 0;
|
||||
|
||||
if(mirror_x){ pointer.mirror_x = mirror_x; }
|
||||
if(mirror_y){ pointer.mirror_y = mirror_y; }
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
function Pointer(offset = new Position(), color = null, scale = 1)
|
||||
function Pointer(offset = new Position(), color = null, scale = 1, angle = 1)
|
||||
{
|
||||
this.offset = offset;
|
||||
this.color = color;
|
||||
this.scale = scale;
|
||||
this.angle = null;
|
||||
|
||||
this.mirror_x = null;
|
||||
this.mirror_y = null;
|
||||
|
||||
this.position_prev = null;
|
||||
this.angle = null;
|
||||
this.distance = 0;
|
||||
|
||||
// Parameters
|
||||
@@ -112,7 +112,7 @@ function Pointer(offset = new Position(), color = null, scale = 1)
|
||||
|
||||
this.position_rotation = function()
|
||||
{
|
||||
var angle_radian = this.angle.degrees * Math.PI / 180;
|
||||
var angle_radian = this.angle * Math.PI / 180;
|
||||
var deltaX = ronin.cursor.position.x - this.offset.x;
|
||||
var deltaY = ronin.cursor.position.y - this.offset.y;
|
||||
var t = Math.atan2(deltaY, deltaX) + angle_radian;
|
||||
|
||||
Reference in New Issue
Block a user