-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.js
33 lines (25 loc) · 1 KB
/
default.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//==============================================================================
// Welcome to scripting in Origami! Helpful links:
//
// Scripting Basics - https://origami.design/documentation/concepts/scriptingbasics
// Scripting API - https://origami.design/documentation/concepts/scriptingapi
//
// Script ID: 2CBD541A-E9FA-487B-9B79-BEB5B8206034
//==============================================================================
// Define your patch
var patch = new Patch();
// Patches are always being evaluated when inputs change of values. If you need your patch to run every frame set this to true
// Setting this to true makes scripts very inefficient and should be avoided at all cost.
patch.alwaysNeedsToEvaluate = false;
// Set Inputs and Outputs.
patch.inputs = [
new PatchInput("Input", types.NUMBER, 0),
];
patch.outputs = [
new PatchOutput("Output", types.NUMBER),
];
// Add your logic in this function.
patch.evaluate = function() {
patch.outputs[0].value = patch.inputs[0].value;
}
return patch;