Added some presets to README.md
This commit is contained in:
@@ -69,6 +69,10 @@ function Keyboard()
|
||||
if(multi[1]){commander.active(multi[1].split(" "));}
|
||||
if(multi[2]){commander.active(multi[2].split(" "));}
|
||||
if(multi[3]){commander.active(multi[3].split(" "));}
|
||||
if(multi[4]){commander.active(multi[4].split(" "));}
|
||||
if(multi[5]){commander.active(multi[5].split(" "));}
|
||||
if(multi[6]){commander.active(multi[6].split(" "));}
|
||||
if(multi[7]){commander.active(multi[7].split(" "));}
|
||||
}
|
||||
else{
|
||||
commander.active(cmd.split(" "));
|
||||
|
||||
@@ -45,14 +45,13 @@ function Pointer(offset = new Position(), color = new Color('000000'))
|
||||
this.position = function()
|
||||
{
|
||||
if(this.angle){
|
||||
|
||||
var angle_radian = this.angle * Math.PI / 180;
|
||||
var deltaX = ronin.brush.position.x - this.offset.x;
|
||||
var deltaY = ronin.brush.position.y - this.offset.y;
|
||||
var t = Math.atan2(deltaY, deltaX);
|
||||
var radius = 45;
|
||||
var t = Math.atan2(deltaY, deltaX) + angle_radian;
|
||||
var radius = ronin.brush.position.distance_to(this.offset);
|
||||
var x = Math.cos(t) * radius;
|
||||
var y = Math.sin(t) * radius;
|
||||
|
||||
return new Position(x + this.offset.x,y + this.offset.y);
|
||||
}
|
||||
else if(this.mirror && this.mirror.width > 0){
|
||||
|
||||
@@ -6,7 +6,7 @@ function Canvas(element)
|
||||
|
||||
this.active = function(cmd)
|
||||
{
|
||||
if(cmd.bang()){ clear(); }
|
||||
if(cmd.bang()){ this.clear(); }
|
||||
|
||||
if(cmd.rect()){
|
||||
this.resize(cmd.rect());
|
||||
|
||||
Reference in New Issue
Block a user