diff options
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | desktop/core/library.js | 1 | ||||
-rw-r--r-- | desktop/sources/index.html | 4 | ||||
-rw-r--r-- | desktop/sources/scripts/terminal.js | 6 | ||||
-rw-r--r-- | examples/bang.orca | 13 |
5 files changed, 29 insertions, 6 deletions
@@ -52,7 +52,6 @@ You can follow the [guide](GUIDE.md) to get started and play your first sounds. - `*` **bang**: Bangs neighboring operators. - `;` **udp**('len): Sends a string via UDP to localhost. - `:` **midi**('velocity, 'length, channel, octave, note): Sends Midi a midi note. -- `!` **keys**(key): Bangs on keyboard input. - `#` **comment**: Comments a line, or characters until the next hash. ## Controls @@ -87,6 +86,12 @@ You can follow the [guide](GUIDE.md) to get started and play your first sounds. - `ctrl/meta+}` increase program size horizontally. - `ctrl/meta+{` decrease program size horizontally. +### Window + +- `ctrl+=` Zoom In. +- `ctrl+-` Zoom Out. +- `ctrl+0` Zoom Reset. + ## Special Operators ### Midi Output @@ -105,10 +110,6 @@ Note length is a value from `1`(1/16) to `g`(16/16), which is a ratio of a full The [UDP](https://nodejs.org/api/dgram.html#dgram_socket_send_msg_offset_length_port_address_callback) operator `;`, takes one haste input that is a string length and locks the eastwardly ports. It sends the message on bang to the port `49160`. You can use the [listener.js](https://github.com/hundredrabbits/Orca/blob/master/listener.js) to test UDP messages. See it in action with [udp.orca](https://github.com/hundredrabbits/Orca/blob/master/examples/_udp.orca). -### Keyboard Input - -The keys operator `!` will bang on a corresponding keyboard keypress when the cursor is in **keyboard mode**(toggle with `/`). For instance, `!a`, will output a bang when pressing the `a` key in **keyboard mode**. See it in action with the [keys.orca](https://github.com/hundredrabbits/Orca/blob/master/examples/_keys.orca). - <img src='https://raw.githubusercontent.com/hundredrabbits/Orca/master/resources/preview.hardware.jpg' width="600"/> ## Base36 Table diff --git a/desktop/core/library.js b/desktop/core/library.js index 163ba6b..fd8d9d3 100644 --- a/desktop/core/library.js +++ b/desktop/core/library.js @@ -41,6 +41,5 @@ module.exports = { '#': require('./library/_comment'), ';': require('./library/_udp'), ':': require('./library/_midi'), - '!': require('./library/_keys'), '/': require('./library/_door') } diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 01b6149..6e6f7fa 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -53,6 +53,10 @@ terminal.controller.add("default","Program","Incr. Row",() => { terminal.modGrid(0,1); },"}") terminal.controller.add("default","Program","Decr. Row",() => { terminal.modGrid(0,-1); },"{") + terminal.controller.add("default","View","Zoom In",() => { terminal.modZoom(0.25); },"CmdOrCtrl+=") + terminal.controller.add("default","View","Zoom Out",() => { terminal.modZoom(-0.25); },"CmdOrCtrl+-") + terminal.controller.add("default","View","Zoom Reset",() => { terminal.modZoom(1,true); },"CmdOrCtrl+0") + terminal.controller.add("default","Theme","Open Theme",() => { terminal.theme.open(); },"CmdOrCtrl+Shift+o") terminal.controller.add("default","Theme","Reset Theme",() => { terminal.theme.reset(); },"CmdOrCtrl+Shift+Backspace") terminal.controller.add("default","Theme","Download Themes..",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes'); }) diff --git a/desktop/sources/scripts/terminal.js b/desktop/sources/scripts/terminal.js index e223f1f..9f9c089 100644 --- a/desktop/sources/scripts/terminal.js +++ b/desktop/sources/scripts/terminal.js @@ -151,6 +151,12 @@ function Terminal (tile = { w: 20, h: 30 }) { this.setSize(w, h) } + this.modZoom = function (mod = 0, set = false) { + const { webFrame } = require('electron') + const currentZoomFactor = webFrame.getZoomFactor() + webFrame.setZoomFactor(set ? mod : currentZoomFactor + mod) + } + // this.isCursor = function (x, y) { diff --git a/examples/bang.orca b/examples/bang.orca new file mode 100644 index 0000000..2c63f8f --- /dev/null +++ b/examples/bang.orca @@ -0,0 +1,13 @@ +......................................... +.#.BANG.#................................ +......................................... +......................................... +......................................... +..............8D.H....................... +................xE....................... +.................E......0................ +......................................... +......................................... +......................................... +......................................... +.........................................
\ No newline at end of file |