Misc
This commit is contained in:
parent
a2ec49f3aa
commit
d9677f0fea
15
README.md
15
README.md
@ -3,7 +3,20 @@
|
||||
Ronin is my web based drawing tool it's under constant development.
|
||||
The repository comes with a script that fires Ronin from within Localhost.
|
||||
|
||||
Enjoy
|
||||
## Example file
|
||||
|
||||
```
|
||||
surface.resize 300x300
|
||||
layer.fill #AAAAAA
|
||||
magnet.grid 15x15 4,4
|
||||
path:line_width 2
|
||||
path.stroke M60,60 A1,1 0 0,0 240,60 A1,1 0 0,0 240,240
|
||||
path.stroke M240,240 A1,1 0 0,0 60,240 A1,1 0 0,0 60,60
|
||||
```
|
||||
|
||||
## Load a preset
|
||||
|
||||
Where `http://localhost:8022` will load the /presets/default.rin file, `http://localhost:8022/blank` will load /presets/blank.rin.
|
||||
|
||||
## TODOs
|
||||
General
|
||||
|
@ -32,7 +32,7 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_medium"
|
||||
#terminal #widget li.inactive { color:#fff; }
|
||||
#terminal #widget li.managed { color:#777; }
|
||||
|
||||
#terminal hint { display: block;position: fixed;top: 100px;width: calc(40vw - 45px);height: calc(100vh - 130px);padding: 0px 15px;line-height: 20px;font-size: 12px;background: none;color: #999;border-left:1px solid #333;margin-left:15px;}
|
||||
#terminal hint { display: none;position: fixed;top: 100px;width: calc(40vw - 45px);height: calc(100vh - 130px);padding: 0px 15px;line-height: 20px;font-size: 12px;background: none;color: #999;border-left:1px solid #333;margin-left:15px;white-space: pre;}
|
||||
#terminal hint line { display: inline; width:calc(100% - 30px); }
|
||||
#terminal hint line .input { opacity:1; }
|
||||
#terminal hint line .status { position: absolute;right:30px; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
~ Blank Setup
|
||||
~ Setup
|
||||
|
||||
frame.resize 400x400
|
||||
layer.fill #A1A1A1
|
||||
|
@ -1,4 +1,4 @@
|
||||
~ Default
|
||||
~ Setup
|
||||
|
||||
frame.resize 300x300
|
||||
frame.select main
|
||||
|
@ -1,6 +1,8 @@
|
||||
frame.resize 240x360 ;
|
||||
frame.select background ;
|
||||
layer.fill #A1A1A1 ;
|
||||
brush:color #ff0000 ;
|
||||
magnet.grid 15x15 4,4 ;
|
||||
frame.select main ;
|
||||
~ Setup
|
||||
|
||||
frame.resize 240x360
|
||||
layer.fill #A1A1A1
|
||||
magnet.grid 15x15 4,4
|
||||
|
||||
~ Stroke
|
||||
|
||||
|
@ -31,6 +31,9 @@ starting_canvas.height = window.innerHeight - 300;
|
||||
starting_canvas.width = parseInt(starting_canvas.width/40) * 40;
|
||||
starting_canvas.height = parseInt(starting_canvas.height/40) * 40;
|
||||
|
||||
// ronin.terminal.load("default.rin");
|
||||
ronin.terminal.load("blank.rin");
|
||||
|
||||
var target_file = window.location.hash ? window.location.hash : "default";
|
||||
target_file = target_file.substr(1,target_file.length-1);
|
||||
|
||||
ronin.terminal.load(window.location.hash ? target_file+".rin" : "default.rin");
|
||||
ronin.widget.update();
|
||||
|
@ -63,7 +63,7 @@ function Terminal(rune)
|
||||
this.hint_element.innerHTML = "";
|
||||
var queue = ronin.terminal.textarea.value.split("\n")
|
||||
for(id in queue){
|
||||
this.hint_element.innerHTML += "<line><text class='input'>"+this.syntax_highlight(queue[id])+"</text><text class='status'>"+this.run_line(queue.length - id,queue[id])+"</text></line><br />";
|
||||
this.hint_element.innerHTML += "<line><text class='input'>"+this.syntax_highlight(queue[id])+"</text><text class='status'>"+this.run_line(queue.length - id,queue[id])+"</text></line>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,8 +120,6 @@ function Terminal(rune)
|
||||
{
|
||||
var line = line;
|
||||
|
||||
console.log(line[0])
|
||||
|
||||
// Comment
|
||||
if(line[0] == "~"){ line = "<span class='comment'>"+line+"</span>"; }
|
||||
|
||||
@ -177,8 +175,11 @@ function Terminal(rune)
|
||||
|
||||
}
|
||||
|
||||
this.filename = "default.rin";
|
||||
|
||||
this.load = function readTextFile(name)
|
||||
{
|
||||
this.filename = name;
|
||||
var file = "presets/"+name+'?'+new Date().getTime();
|
||||
var rawFile = new XMLHttpRequest();
|
||||
rawFile.open("GET", file, false);
|
||||
@ -194,6 +195,7 @@ function Terminal(rune)
|
||||
}
|
||||
}
|
||||
rawFile.send(null);
|
||||
ronin.widget.update();
|
||||
}
|
||||
|
||||
this.cmd = function()
|
||||
|
@ -13,11 +13,8 @@ function Widget(rune)
|
||||
this.update = function()
|
||||
{
|
||||
var s = "";
|
||||
|
||||
s += ronin.cursor.widget();
|
||||
// for (var key in ronin.modules){
|
||||
// s += ronin.modules[key].widget() ? "<span class='"+key+"'><name>"+key+"</name>"+ronin.modules[key].widget()+"</span> " : "";
|
||||
// }
|
||||
s += ronin.terminal.file_name+" ";
|
||||
s += "Cursor: "+ronin.cursor.widget();
|
||||
|
||||
this.element.innerHTML = s;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user