2018-08-18 09:34:24 +12:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
2016-12-31 08:00:57 -07:00
|
|
|
<html>
|
|
|
|
|
<head>
|
2018-08-18 09:34:24 +12:00
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2019-01-10 09:00:52 +12:00
|
|
|
<!-- Generics -->
|
2018-01-30 09:48:58 +13:00
|
|
|
<script type="text/javascript" src="scripts/lib/theme.js"></script>
|
2018-02-01 09:21:59 +13:00
|
|
|
<script type="text/javascript" src="scripts/lib/history.js"></script>
|
2019-01-10 09:00:52 +12:00
|
|
|
<script type="text/javascript" src="scripts/lib/controller.js"></script>
|
|
|
|
|
<!-- Dotgrid -->
|
2018-10-06 22:59:21 +07:00
|
|
|
<script type="text/javascript" src="scripts/dotgrid.js"></script>
|
2019-01-10 09:00:52 +12:00
|
|
|
<script type="text/javascript" src="scripts/manager.js"></script>
|
2018-05-11 10:06:03 +12:00
|
|
|
<script type="text/javascript" src="scripts/renderer.js"></script>
|
2019-01-10 09:00:52 +12:00
|
|
|
<script type="text/javascript" src="scripts/cursor.js"></script>
|
2017-11-15 10:11:09 +13:00
|
|
|
<script type="text/javascript" src="scripts/interface.js"></script>
|
2018-02-06 12:39:25 +13:00
|
|
|
<script type="text/javascript" src="scripts/tool.js"></script>
|
2018-05-10 09:56:55 +12:00
|
|
|
<script type="text/javascript" src="scripts/generator.js"></script>
|
2018-03-07 13:50:41 +13:00
|
|
|
<script type="text/javascript" src="scripts/picker.js"></script>
|
2019-01-12 15:02:29 +12:00
|
|
|
<script type="text/javascript" src="scripts/listener.js"></script>
|
2019-01-10 09:00:52 +12:00
|
|
|
<!-- Styles -->
|
2016-12-31 08:00:57 -07:00
|
|
|
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="links/main.css"/>
|
2018-09-12 13:20:31 +12:00
|
|
|
<link rel="stylesheet" type="text/css" href="links/theme.css"/>
|
2017-01-04 10:51:45 -07:00
|
|
|
<title>Dotgrid(Icon)</title>
|
2016-12-31 08:00:57 -07:00
|
|
|
</head>
|
|
|
|
|
<body>
|
2018-09-12 15:27:01 +12:00
|
|
|
<script>
|
2018-10-04 16:24:28 +12:00
|
|
|
'use strict'
|
2018-10-02 07:38:14 +12:00
|
|
|
|
2018-05-13 09:50:19 +12:00
|
|
|
const webFrame = require('electron').webFrame
|
2017-11-16 21:42:46 +13:00
|
|
|
const {dialog,app} = require('electron').remote;
|
|
|
|
|
const fs = require('fs');
|
2018-05-08 21:05:19 +12:00
|
|
|
|
2018-10-05 11:52:17 +12:00
|
|
|
DOTGRID.controller = new Controller();
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add("default","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
2019-01-10 09:00:52 +12:00
|
|
|
DOTGRID.controller.add("default","*","Fullscreen",() => { app.toggleFullscreen(); },"CmdOrCtrl+Enter");
|
|
|
|
|
DOTGRID.controller.add("default","*","Hide",() => { app.toggleVisible(); },"CmdOrCtrl+H");
|
2018-10-05 11:52:17 +12:00
|
|
|
DOTGRID.controller.add("default","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
|
|
|
|
DOTGRID.controller.add("default","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
|
|
|
|
DOTGRID.controller.add("default","*","Quit",() => { app.exit(); },"CmdOrCtrl+Q");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add("default","File","New",() => { DOTGRID.new(); },"CmdOrCtrl+N");
|
|
|
|
|
DOTGRID.controller.add("default","File","Open",() => { DOTGRID.open(); },"CmdOrCtrl+O");
|
|
|
|
|
DOTGRID.controller.add("default","File","Save(.grid)",() => { DOTGRID.save(); },"CmdOrCtrl+S");
|
|
|
|
|
DOTGRID.controller.add("default","File","Render(.png)",() => { DOTGRID.render(); },"CmdOrCtrl+R");
|
|
|
|
|
DOTGRID.controller.add("default","File","Export(.svg)",() => { DOTGRID.export(); },"CmdOrCtrl+E");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add_role("default","Edit","copy");
|
2018-11-21 20:11:27 +12:00
|
|
|
DOTGRID.controller.add_role("default","Edit","cut");
|
2018-10-05 11:52:17 +12:00
|
|
|
DOTGRID.controller.add_role("default","Edit","paste");
|
|
|
|
|
DOTGRID.controller.add("default","Edit","Undo",() => { DOTGRID.tool.undo() },"CmdOrCtrl+Z");
|
|
|
|
|
DOTGRID.controller.add("default","Edit","Redo",() => { DOTGRID.tool.redo() },"CmdOrCtrl+Shift+Z");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Line",() => { DOTGRID.tool.cast("line"); },"A");
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Arc",() => { DOTGRID.tool.cast("arc_c"); },"S"); // 0,1
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Arc Rev",() => { DOTGRID.tool.cast("arc_r")},"D"); // 0,0
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Bezier",() => { DOTGRID.tool.cast("bezier") },"F");
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Close",() => { DOTGRID.tool.cast("close") },"Z");
|
2018-11-16 12:17:17 +13:00
|
|
|
DOTGRID.controller.add("default","Stroke","Arc(full)",() => { DOTGRID.tool.cast("arc_c_full"); },"T"); // 1,1
|
|
|
|
|
DOTGRID.controller.add("default","Stroke","Arc Rev(full)",() => { DOTGRID.tool.cast("arc_r_full")},"Y"); // 1,0
|
2018-11-21 19:29:22 +12:00
|
|
|
DOTGRID.controller.add("default","Stroke","Clear Selection",() => { DOTGRID.tool.clear(); },"Escape");
|
2018-10-05 11:52:17 +12:00
|
|
|
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Linecap",() => { DOTGRID.tool.toggle("linecap"); },"Q");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Linejoin",() => { DOTGRID.tool.toggle("linejoin"); },"W");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Mirror",() => { DOTGRID.tool.toggle("mirror"); },"E");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Fill",() => { DOTGRID.tool.toggle("fill"); },"R");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Thicker",() => { DOTGRID.tool.toggle("thickness",1) },"}");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Thinner",() => { DOTGRID.tool.toggle("thickness",-1) },"{");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Thicker +5",() => { DOTGRID.tool.toggle("thickness",5) },"]");
|
|
|
|
|
DOTGRID.controller.add("default","Effect","Thinner -5",() => { DOTGRID.tool.toggle("thickness",-5) },"[");
|
2019-01-10 10:43:17 +12:00
|
|
|
DOTGRID.controller.add("default","Effect","Toggle Crest",() => { DOTGRID.tool.toggleCrest(); }, "CmdOrCtrl+K");
|
2018-10-05 11:52:17 +12:00
|
|
|
|
2019-01-09 15:49:34 +12:00
|
|
|
DOTGRID.controller.add("default","Manual","Add Point",() => { DOTGRID.tool.addVertex(DOTGRID.cursor.pos); DOTGRID.renderer.update() },"Enter");
|
2019-01-09 15:12:18 +12:00
|
|
|
DOTGRID.controller.add("default","Manual","Move Up",() => { DOTGRID.cursor.pos.y -= 15; DOTGRID.renderer.update() },"Up");
|
|
|
|
|
DOTGRID.controller.add("default","Manual","Move Right",() => { DOTGRID.cursor.pos.x += 15; DOTGRID.renderer.update() },"Right");
|
|
|
|
|
DOTGRID.controller.add("default","Manual","Move Down",() => { DOTGRID.cursor.pos.y += 15; DOTGRID.renderer.update() },"Down");
|
|
|
|
|
DOTGRID.controller.add("default","Manual","Move Left",() => { DOTGRID.cursor.pos.x -= 15; DOTGRID.renderer.update() },"Left");
|
2019-01-09 15:49:34 +12:00
|
|
|
DOTGRID.controller.add("default","Manual","Remove Point",() => { DOTGRID.tool.removeSegmentsAt(DOTGRID.cursor.pos); },"Shift+Backspace");
|
|
|
|
|
DOTGRID.controller.add("default","Manual","Remove Segment",() => { DOTGRID.tool.removeSegment(); },"Backspace");
|
2018-10-05 11:52:17 +12:00
|
|
|
|
2019-01-09 15:49:34 +12:00
|
|
|
DOTGRID.controller.add("default","Layers","Foreground",() => { DOTGRID.tool.selectLayer(0) },"CmdOrCtrl+1");
|
|
|
|
|
DOTGRID.controller.add("default","Layers","Middleground",() => { DOTGRID.tool.selectLayer(1) },"CmdOrCtrl+2");
|
|
|
|
|
DOTGRID.controller.add("default","Layers","Background",() => { DOTGRID.tool.selectLayer(2) },"CmdOrCtrl+3");
|
2019-01-12 16:22:38 +12:00
|
|
|
DOTGRID.controller.add("default","Layers","Next Layer",() => { DOTGRID.tool.selectNextLayer() });
|
|
|
|
|
DOTGRID.controller.add("default","Layers","Prev Layer",() => { DOTGRID.tool.selectPrevLayer() });
|
2019-01-08 10:34:57 +12:00
|
|
|
DOTGRID.controller.add("default","Layers","Merge Layers",() => { DOTGRID.tool.merge() },"M");
|
2018-10-05 11:52:17 +12:00
|
|
|
|
|
|
|
|
DOTGRID.controller.add("default","View","Color Picker",() => { DOTGRID.picker.start(); },"G");
|
2019-01-09 15:12:18 +12:00
|
|
|
DOTGRID.controller.add("default","View","Toggle Grid",() => { DOTGRID.renderer.toggle(); },"H");
|
2019-01-12 16:22:38 +12:00
|
|
|
DOTGRID.controller.add("default","View","Toggle Interface",() => { DOTGRID.interface.toggle(); },"Tab");
|
2018-10-05 11:52:17 +12:00
|
|
|
|
2018-12-22 10:07:46 +12:00
|
|
|
DOTGRID.controller.add("default","Theme","Open Theme",() => { DOTGRID.theme.open(); },"CmdOrCtrl+Shift+o")
|
|
|
|
|
DOTGRID.controller.add("default","Theme","Reset Theme",() => { DOTGRID.theme.reset(); },"CmdOrCtrl+Shift+Backspace")
|
|
|
|
|
DOTGRID.controller.add("default","Theme","Download Themes..",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes'); })
|
2018-10-05 11:52:17 +12:00
|
|
|
|
|
|
|
|
DOTGRID.controller.add("picker","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
2019-01-10 09:00:52 +12:00
|
|
|
DOTGRID.controller.add("picker","*","Fullscreen",() => { app.toggleFullscreen(); },"CmdOrCtrl+Enter");
|
|
|
|
|
DOTGRID.controller.add("picker","*","Hide",() => { app.toggleVisible(); },"CmdOrCtrl+H");
|
2018-10-05 11:52:17 +12:00
|
|
|
DOTGRID.controller.add("picker","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
|
|
|
|
DOTGRID.controller.add("picker","*","Documentation",() => { DOTGRID.controller.docs(); },"CmdOrCtrl+Esc");
|
|
|
|
|
DOTGRID.controller.add("picker","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
|
|
|
|
DOTGRID.controller.add("picker","*","Quit",() => { app.exit(); },"CmdOrCtrl+Q");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","undo");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","redo");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","cut");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","copy");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","paste");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","delete");
|
|
|
|
|
DOTGRID.controller.add_role("picker","Edit","selectall");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.add("picker","Mode","Stop Picker Mode",() => { DOTGRID.picker.stop(); },"Escape");
|
|
|
|
|
|
|
|
|
|
DOTGRID.controller.commit();
|
|
|
|
|
|
|
|
|
|
DOTGRID.install(document.body);
|
|
|
|
|
DOTGRID.start();
|
2017-11-16 21:42:46 +13:00
|
|
|
</script>
|
2016-12-31 08:00:57 -07:00
|
|
|
</body>
|
|
|
|
|
</html>
|