diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 726961b..25f9f6b 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -4,16 +4,6 @@ function Library (ronin) { return path } - this.folder = (path = ronin.source.path) => { - const a = [] - if (path) { - if (fs.existsSync(path)) { - return fs.readdirSync(path) - } - } - return a - } - this.save = (path = ronin.source.folder(), type = 'png', quality = 1.0) => { if (!path) { console.warn('Missing save path'); return path } var fullQuality = ronin.surface.el.toDataURL('image/png', quality) @@ -47,8 +37,12 @@ function Library (ronin) { return rect } + this.folder = (path = ronin.source.path) => { + return fs.existsSync(path) ? fs.readdirSync(path) : [] + } + this.exit = () => { - // TODO: Closes Ronin + ronin.source.quit() } // Logic @@ -293,16 +287,10 @@ function Library (ronin) { // Generics this.echo = (...args) => { - const msg = args.reduce((acc, val) => { return acc + val + ' ' }, '') - ronin.log(msg) + ronin.log(args) return args } - this.print = (msg) => { - ronin.log(msg) - return msg - } - this.str = (...args) => { return args.reduce((acc, val) => { return acc + val }, '') } diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 5620108..ec6e9c4 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -40,7 +40,6 @@ function Ronin () { this.source.start() this.commander.start() this.surface.start() - console.log('Ronin', 'Started') } @@ -50,7 +49,7 @@ function Ronin () { this.log = function (msg) { console.log(msg) - this.commander.setStatus(msg) + this.commander.setStatus(msg.reduce((acc, val) => { return acc + val + ' ' }, '')) } this.load = function (content = this.default()) { diff --git a/desktop/sources/scripts/surface.js b/desktop/sources/scripts/surface.js index b5e7854..ef054ae 100644 --- a/desktop/sources/scripts/surface.js +++ b/desktop/sources/scripts/surface.js @@ -4,7 +4,6 @@ function Surface (ronin) { this._guide = document.createElement('canvas') this._guide.id = 'guide' this.ratio = window.devicePixelRatio - // Contexts this.context = this.el.getContext('2d') this.guide = this.el.getContext('2d') @@ -22,11 +21,6 @@ function Surface (ronin) { this.start = function () { this.maximize() - console.log('Surface', `Ratio:${this.ratio}`) - } - - this.update = function () { - } // Shape diff --git a/examples/load.lisp b/examples/load.lisp deleted file mode 100644 index fa9c31e..0000000 --- a/examples/load.lisp +++ /dev/null @@ -1,5 +0,0 @@ -; load file - -((clear) - (print (folder)) -) \ No newline at end of file