Cleaned folder structure
This commit is contained in:
parent
3b40d555c8
commit
2b5408eace
@ -7,14 +7,15 @@
|
|||||||
<script type="text/javascript" src="scripts/modules/line.js"></script>
|
<script type="text/javascript" src="scripts/modules/line.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts/layer.js"></script>
|
<script type="text/javascript" src="scripts/layer.js"></script>
|
||||||
<script type="text/javascript" src="scripts/grid.js"></script>
|
<script type="text/javascript" src="scripts/layers/grid.js"></script>
|
||||||
<script type="text/javascript" src="scripts/guide.js"></script>
|
<script type="text/javascript" src="scripts/layers/guide.js"></script>
|
||||||
|
<script type="text/javascript" src="scripts/layers/render.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts/io.js"></script>
|
<script type="text/javascript" src="scripts/io.js"></script>
|
||||||
<script type="text/javascript" src="scripts/query.js"></script>
|
<script type="text/javascript" src="scripts/query.js"></script>
|
||||||
<script type="text/javascript" src="scripts/keyboard.js"></script>
|
<script type="text/javascript" src="scripts/keyboard.js"></script>
|
||||||
<script type="text/javascript" src="scripts/cursor.js"></script>
|
<script type="text/javascript" src="scripts/cursor.js"></script>
|
||||||
<script type="text/javascript" src="scripts/hint.js"></script>
|
<script type="text/javascript" src="scripts/hint.js"></script>
|
||||||
<script type="text/javascript" src="scripts/render.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/commander.js"></script>
|
<script type="text/javascript" src="scripts/commander.js"></script>
|
||||||
<script type="text/javascript" src="scripts/ronin.js"></script>
|
<script type="text/javascript" src="scripts/ronin.js"></script>
|
||||||
|
|
||||||
|
@ -14,7 +14,9 @@ function Keyboard()
|
|||||||
|
|
||||||
if(e.key == "Escape"){
|
if(e.key == "Escape"){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ronin.commander.input_el.blur();;
|
ronin.commander.input_el.blur();
|
||||||
|
ronin.commander.input_el.value = "";
|
||||||
|
ronin.guide.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(e.key == "]"){
|
if(e.key == "]"){
|
||||||
|
@ -8,10 +8,11 @@ function Frame()
|
|||||||
|
|
||||||
this.methods.resize = function(q)
|
this.methods.resize = function(q)
|
||||||
{
|
{
|
||||||
if(q.indexOf("x") == -1){ return; }
|
var data = ronin.render.select(0,0,ronin.frame.settings.width,ronin.frame.settings.height);
|
||||||
|
|
||||||
var size = {width:parseInt(q.split("x")[0]),height:parseInt(q.split("x")[1])};
|
ronin.render.clear();
|
||||||
ronin.frame.resize(size);
|
ronin.frame.resize_to(q);
|
||||||
|
ronin.render.context().putImageData(data, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.methods.rescale = function(p)
|
this.methods.rescale = function(p)
|
||||||
|
@ -3,20 +3,27 @@ function Ronin()
|
|||||||
this.el = document.createElement('yu');
|
this.el = document.createElement('yu');
|
||||||
this.el.id = "ronin";
|
this.el.id = "ronin";
|
||||||
|
|
||||||
this.grid = new Grid();
|
|
||||||
this.io = new IO();
|
this.io = new IO();
|
||||||
this.keyboard = new Keyboard();
|
this.keyboard = new Keyboard();
|
||||||
this.commander = new Commander();
|
this.commander = new Commander();
|
||||||
this.cursor = new Cursor();
|
this.cursor = new Cursor();
|
||||||
this.render = new Render();
|
|
||||||
this.hint = new Hint();
|
this.hint = new Hint();
|
||||||
|
|
||||||
|
this.grid = new Grid();
|
||||||
this.guide = new Guide();
|
this.guide = new Guide();
|
||||||
|
this.render = new Render();
|
||||||
|
|
||||||
this.brush = new Brush();
|
this.brush = new Brush();
|
||||||
this.eraser = new Eraser();
|
this.eraser = new Eraser();
|
||||||
this.frame = new Frame();
|
this.frame = new Frame();
|
||||||
this.line = new Line();
|
this.line = new Line();
|
||||||
|
|
||||||
|
this.layers = {
|
||||||
|
grid : this.grid,
|
||||||
|
guide : this.guide,
|
||||||
|
render : this.render,
|
||||||
|
};
|
||||||
|
|
||||||
this.modules = {
|
this.modules = {
|
||||||
brush : this.brush,
|
brush : this.brush,
|
||||||
eraser : this.eraser,
|
eraser : this.eraser,
|
||||||
@ -28,6 +35,9 @@ function Ronin()
|
|||||||
{
|
{
|
||||||
document.body.appendChild(this.el);
|
document.body.appendChild(this.el);
|
||||||
|
|
||||||
|
this.frame.settings.width = window.innerWidth;
|
||||||
|
this.frame.settings.height = window.innerHeight;
|
||||||
|
|
||||||
this.grid.install();
|
this.grid.install();
|
||||||
this.guide.install();
|
this.guide.install();
|
||||||
this.render.install();
|
this.render.install();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user