diff options
author | Devine Lu Linvega <[email protected]> | 2018-12-02 12:09:54 +1200 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2018-12-02 12:09:54 +1200 |
commit | e577ccce1a91cae1bd6f01b3b913dd4037d3f815 (patch) | |
tree | 7290350d0af2842e7b4e4740a94314cc99adc6ff | |
parent | ad9873a44481e70652eeddd9f6338f60a6925345 (diff) | |
download | Orca-e577ccce1a91cae1bd6f01b3b913dd4037d3f815.tar.gz Orca-e577ccce1a91cae1bd6f01b3b913dd4037d3f815.zip |
Standardizing O, P, T, X
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | desktop/core/library/o.js | 4 | ||||
-rw-r--r-- | desktop/core/library/t.js | 2 | ||||
-rw-r--r-- | examples/_benchmark.orca | 92 | ||||
-rw-r--r-- | examples/_inactive.orca | 11 |
5 files changed, 64 insertions, 47 deletions
@@ -59,6 +59,8 @@ There really are 4 types of operators: - Those that do not need bang to operate, passive operator. (uppercase, no bang) - Those that needs bang to operate, default operator. (lowercase, needs bang) (edited) +* Aberants `T`, `X`, `O`, `P`. + The `L`, `Q` & `T` operators are always passive(the lowercase operator works like their uppercase version). The passive `G`, `O`, `P`, `V`, `X`, `:` & `;` also require bang to operate. ## Controls diff --git a/desktop/core/library/o.js b/desktop/core/library/o.js index 41ad17f..ce328f9 100644 --- a/desktop/core/library/o.js +++ b/desktop/core/library/o.js @@ -3,7 +3,7 @@ const Operator = require('../operator') function OperatorO (orca, x, y, passive) { - Operator.call(this, orca, x, y, 'o', passive) + Operator.call(this, orca, x, y, 'o', true) this.name = 'offset' this.info = 'Reads a distant operator with offset.' @@ -20,6 +20,8 @@ function OperatorO (orca, x, y, passive) { } this.run = function () { + if (!passive && !this.bang()) { return } + const res = this.listen(this.ports.input.val) this.output(`${res}`) } diff --git a/desktop/core/library/t.js b/desktop/core/library/t.js index 449c692..75dd104 100644 --- a/desktop/core/library/t.js +++ b/desktop/core/library/t.js @@ -23,6 +23,8 @@ function OperatorT (orca, x, y, passive) { } this.run = function () { + if (!passive && !this.bang()) { return } + const res = this.listen(this.ports.input.val) this.output(`${res}`) } diff --git a/examples/_benchmark.orca b/examples/_benchmark.orca index 856b876..7f26dd6 100644 --- a/examples/_benchmark.orca +++ b/examples/_benchmark.orca @@ -1,46 +1,46 @@ -#.......A.......B.......C.......D.......E.......F.......G.......H.......I.......J.......K.......L........M......# -................................................................................................................. -........A.......B.......C.......D...............F.......G.......H.......I.......J.......K.......Lc.......M....... -........0...............0.......................1.......................4................................0....... -................................................................................................................. -........A2......B1......C2.....0D...............F2......................I2.....................0Lc.......M2...... -........................0.......................0.......................6................................0....... -................................................................................................................. -........A.2.....B0......Cc.....2D...............F.2.....................I.2....................1Lc.......M.2..... -........................0.......................0.......................0................................0....... -................................................................................................................. -........A22.....Bw.....0C......3D0..............F22.....................I22....................2Lc.......M22..... -........................0.......................1.......................2................................0....... -................................................................................................................. -........A23.....Bs.....1C2.....4D1..............F23.....................I23....................3L.c......M23..... -........................0.......................0.......................2................................2....... -................................................................................................................. -........A2K.....Be.....2Cc.....4D2..............F2K.....................I2K..............................M9K..... -........................0.......................0.......................2................................9....... -................................................................................................................. -........AK2.....Bw.....3C4.....gD8..............FKK.....................IK2..............................MK6..... -........................0.......................1.......................k................................2....... -................................................................................................................. -#.......N.......O.......P.......Q.......R.......S.......T.......U.......V.......W.......X.......Y........Z......# -................................................................................................................. -................O.......P.......Q.......R...............Tc......U.......V...............X.......Y................ -........................................0........................................................................ -................................................................................................................. -..............0.O2.............1Q2......R2.............3Tc............................0.X2....................... -................2.......................1........................................................................ -................................................................................................................. -...............0O2.............2Q2......R.2...........4.Tc.............................0X2....................... -................2.......................0........................................................................ -................................................................................................................. -..............20O23............3Q22.....R22...........03Tc............................20X23...................... -................3.......................2........................................................................ -................................................................................................................. -..............10O23............4Q23.....R24...........13Tc............................10X23...................... -................2.......................2........................................................................ -................................................................................................................. -..............11O..............4Q9K.....R2K...........c3Tc............................11X........................ -................44......................3................................................4....................... -................................................................................................................. -...............................0Q.......RKK...........50T........................................................ -........................................k........................................................................ -.................................................................................................................
\ No newline at end of file +#.......A.......B.......C.......D.......E.......F.......G.......H.......I.......J.......K.......L.......M......# +................................................................................................................ +........A.......B.......C.......D...............F.......G.......H.......I.......J.......K.......Lc......M....... +........0...............0.......................1.......................4...............................0....... +................................................................................................................ +........A2......B1......C2.....0D...............F2......................I2.....................0Lc......M2...... +........................0.......................0.......................6...............................0....... +................................................................................................................ +........A.2.....B0......Cc.....2D...............F.2.....................I.2....................1Lc......M.2..... +........................0.......................0.......................0...............................0....... +................................................................................................................ +........A22.....Bw.....0C......3D0..............F22.....................I22....................2Lc......M22..... +........................0.......................1.......................2...............................0....... +................................................................................................................ +........A23.....Bs.....1C2.....4D1..............F23.....................I23....................3L.c.....M23..... +........................0.......................0.......................2...............................2....... +................................................................................................................ +........A2K.....Be.....2Cc.....4D2..............F2K.....................I2K.............................M9K..... +........................0.......................0.......................2...............................9....... +................................................................................................................ +........AK2.....Bw.....3C4.....gD8..............FKK.....................IK2.............................MK6..... +........................0.......................1.......................k...............................2....... +................................................................................................................ +#.......N.......O.......P.......Q.......R.......S.......T.......U.......V.......W.......X.......Y.......Z......# +................................................................................................................ +................O......2P1......Q.......R...............Tc......U.......V...............X.......Y............... +........................................0....................................................................... +................................................................................................................ +..............0.O2......P1.....1Q2......R2.............3Tc............................0.X2...................... +................2.......................1....................................................................... +................................................................................................................ +...............0O2....2.P......2Q2......R.2...........4.Tc.............................0X2...................... +................2.......................0....................................................................... +................................................................................................................ +..............20O23............3Q22.....R22...........03Tc............................20X23..................... +................3.......................2....................................................................... +................................................................................................................ +..............10O23............4Q23.....R24...........13Tc............................10X23..................... +................2.......................2....................................................................... +................................................................................................................ +..............11O..............4Q9K.....R2K...........c3Tc............................11X....................... +................44......................3................................................4...................... +................................................................................................................ +...............................0Q.......RKK...........50T....................................................... +........................................k....................................................................... +................................................................................................................
\ No newline at end of file diff --git a/examples/_inactive.orca b/examples/_inactive.orca new file mode 100644 index 0000000..e28d5bd --- /dev/null +++ b/examples/_inactive.orca @@ -0,0 +1,11 @@ +....................................................... +....................................................... +....................................................... +...a...b...c...d...e...f...g...h...i...j...k...l...m... +....................................................... +....................................................... +....................................................... +...n...o...p...q...r...s...t...u...v...w...x...y...z... +....................................................... +....................................................... +.......................................................
\ No newline at end of file |