diff options
author | Devine Lu Linvega <[email protected]> | 2019-04-03 11:49:29 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-04-03 11:49:29 +0900 |
commit | 1bd2ca718dfe3009c0dd4f26860de064532b1817 (patch) | |
tree | 4c58657d1b8ce082b01de838bb000e56099a94ef | |
parent | 069936956cab560824d11dd0b81f5f0157086d16 (diff) | |
download | Orca-1bd2ca718dfe3009c0dd4f26860de064532b1817.tar.gz Orca-1bd2ca718dfe3009c0dd4f26860de064532b1817.zip |
Fixed pendulum example
-rw-r--r-- | desktop/core/library/o.js | 1 | ||||
-rw-r--r-- | desktop/core/library/q.js | 1 | ||||
-rw-r--r-- | desktop/core/library/t.js | 2 | ||||
-rw-r--r-- | examples/pendulum.orca | 9 |
4 files changed, 5 insertions, 8 deletions
diff --git a/desktop/core/library/o.js b/desktop/core/library/o.js index c54fab3..4deeedd 100644 --- a/desktop/core/library/o.js +++ b/desktop/core/library/o.js @@ -18,7 +18,6 @@ function OperatorO (orca, x, y, passive) { const y = this.listen(this.ports.haste.y, true) this.ports.input.val = { x: x + 1, y: y } orca.lock(this.x + x + 1, this.y + y) - const res = this.listen(this.ports.input.val) this.output(`${res}`, true) } diff --git a/desktop/core/library/q.js b/desktop/core/library/q.js index f0d10c2..8de4256 100644 --- a/desktop/core/library/q.js +++ b/desktop/core/library/q.js @@ -25,7 +25,6 @@ function OperatorQ (orca, x, y, passive) { const len = this.listen(this.ports.haste.len, true, 1) const x = this.listen(this.ports.haste.x, true) const y = this.listen(this.ports.haste.y, true) - for (let i = 1; i <= len; i++) { this.ports.input[`val${i}`] = { x: x + i, y: y } orca.lock(this.x + x + i, this.y + y) diff --git a/desktop/core/library/t.js b/desktop/core/library/t.js index 2bee74c..259944e 100644 --- a/desktop/core/library/t.js +++ b/desktop/core/library/t.js @@ -23,9 +23,7 @@ function OperatorT (orca, x, y, passive) { this.run = function () { const len = this.listen(this.ports.haste.len, true, 1) const key = this.listen(this.ports.haste.key, true) - this.ports.input.val = { x: (key % len) + 1, y: 0 } - const res = this.listen(this.ports.input.val) this.output(`${res}`, true) } diff --git a/examples/pendulum.orca b/examples/pendulum.orca index 77859b5..cab0f27 100644 --- a/examples/pendulum.orca +++ b/examples/pendulum.orca @@ -3,14 +3,15 @@ ......................................... ......................................... ......................................... -............U.W............U............. +............U........W.....U............. ....................J.................... -...................B.H................... -....................xS................... +.....................B................... +......................H.................. +.....................xS.................. +......................................... ......................................... ......................................... ......................................... ......................................... ......................................... -....................*.................... .........................................
\ No newline at end of file |