7. 通常のプログラミングと Origami Studio の違い
function myFunc(a, b, c) {
const result = ...
return result;
}
関数とパッチ
?パッチでは左が入力、右が出力
▼コードでの関数 ▼パッチでの関数
8. 通常のプログラミングと Origami Studio の違い
function myFunc(a, b, c) {
const total = a + b + c;
const num = 100;
return total * 2 + num;
}
処理の流れ
▼コード ▼パッチ
?コードは上から下の流れ
?Origami studio では左から右の流れ
9. 通常のプログラミングと Origami Studio の違い
function myFunc(a, b, c) {
const total = a + b + c;
const num = 100;
const result1 = total * 2 + num;
const result2 = total * 2 - num;
const result3 = total * 2 * num;
const result4 = total * 2 / num;
return [result1, result2, result3, result4];
}
複数の出力
▼コード ▼パッチ
?コードでは複数出力の際は配列化など必要
?Origami studio ではそのままでOK
15. アニメーションの仕組みを理解する
https://origami.design/documentation/basics/Animations.html
> Animation patches in Origami are designed to be ?uid and reversible: they take any changing
number and tween it to be smooth.
訳)Origami のアニメーションパッチは、滑らかでリバーシブルになるように設計されています。これら
のパッチは、変化する数を取り、トゥイーンで滑らかにします。
> In combination with an Interaction or a Switch patch, which output 0 or 1, an Animation patch
can tween that value so it smoothly animates from 0 to 1, and vice versa. Origami refers to this 0
to 1 value generally as progress.
訳)0または1を出力するインタラクションパッチまたはスイッチパッチと組み合わせて、アニメーション
パッチはその値をトゥイーンできるため、0から1に、またはその逆にスムーズにアニメーション化できま
す。Origami では、この0から1の値を一般的に「プログレス(進捗状況)」と呼びます。