@field/cascade 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/assets/{CodeEditor-BHej8kM9.js → CodeEditor-BLpahZw6.js} +7 -7
- package/dist/assets/{CodePanel-CT3eirK8.js → CodePanel-BqYKqBMH.js} +2 -2
- package/dist/assets/{CustomNodeDialog-BG0m7_Rv.js → CustomNodeDialog-CYr9y7dG.js} +1 -1
- package/dist/assets/{ProjectSettings-BxoLWJG6.js → ProjectSettings-CnYfrkKh.js} +2 -2
- package/dist/assets/{SettingsDialog-r9PzZ22z.js → SettingsDialog-mSS6KUyS.js} +1 -1
- package/dist/assets/{VersionHistoryDialog-B6zUV6Dy.js → VersionHistoryDialog-DZuwNG6s.js} +1 -1
- package/dist/assets/{core-wwx5881P.js → core-BOGrwBxU.js} +2 -2
- package/dist/assets/{cssMode-DY5T2Or0.js → cssMode-0Z3pyDOW.js} +1 -1
- package/dist/assets/definitions-Cckh442l.js +1 -0
- package/dist/assets/{editor.api-mkORHEMm.js → editor.api-D-_7pnnj.js} +1 -1
- package/dist/assets/{freemarker2-CIWlk0sw.js → freemarker2-DE0JRkF7.js} +1 -1
- package/dist/assets/geo-DcAVygkw.js +1 -0
- package/dist/assets/{handlebars-t4jbj3Br.js → handlebars-B_Shirzj.js} +1 -1
- package/dist/assets/{html-Ctx7UOlY.js → html-DI5Qj4gd.js} +1 -1
- package/dist/assets/{htmlMode-BKNZxVw7.js → htmlMode-CkHZy0mE.js} +1 -1
- package/dist/assets/{image-BCBFz0gD.js → image-B6RU2frM.js} +3 -3
- package/dist/assets/{index-CeqTfMbr.js → index-DTyzl6YV.js} +36 -36
- package/dist/assets/{javascript-Da_TJBzH.js → javascript-zxQfbzS_.js} +1 -1
- package/dist/assets/{jsonMode-Ftt5d1nV.js → jsonMode-DSQ0uLqA.js} +1 -1
- package/dist/assets/{liquid-D5kWYG57.js → liquid-0zs2oOuA.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-B-93LC_L.js → lspLanguageFeatures-7VWaq5lc.js} +1 -1
- package/dist/assets/math-BA6juJD7.js +1 -0
- package/dist/assets/{mdx-DGT3C_qs.js → mdx-BFKlF5Xh.js} +1 -1
- package/dist/assets/pop-Bkzzmp57.js +1 -0
- package/dist/assets/{python-Bz3Eew5S.js → python-BgexpWZh.js} +1 -1
- package/dist/assets/{razor-CFDdKpKI.js → razor-E1kWyvkT.js} +1 -1
- package/dist/assets/{tsMode-BaCINWBI.js → tsMode-CTmJLLW5.js} +1 -1
- package/dist/assets/{typescript-BoOWspVs.js → typescript-BheZLRDM.js} +1 -1
- package/dist/assets/{workers-dSWyDxsQ.js → workers-KIoho05H.js} +1 -1
- package/dist/assets/{xml-eFi1_vYt.js → xml-DaVLg9zI.js} +1 -1
- package/dist/assets/{yaml-a7xrJHxm.js → yaml-D6XGTfOj.js} +1 -1
- package/dist/cli/index.js +574 -289
- package/dist/index.html +1 -1
- package/dist/runtime/builtins/index.js +2 -0
- package/dist/runtime/builtins/math/definitions.d.ts +845 -0
- package/dist/runtime/builtins/math/definitions.js +285 -0
- package/dist/runtime/builtins/math/index.d.ts +2 -0
- package/dist/runtime/builtins/math/index.js +2 -0
- package/doc/NODE_REFERENCE.md +115 -0
- package/package.json +1 -1
- package/dist/assets/definitions-BgCvRHyR.js +0 -1
- package/dist/assets/geo-CIxgs0oE.js +0 -1
- package/dist/assets/pop-BJGN5Ac4.js +0 -1
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
function asComponents(value, label) {
|
|
2
|
+
if (typeof value === "number")
|
|
3
|
+
return [value];
|
|
4
|
+
if (Array.isArray(value) && value.every((part) => typeof part === "number"))
|
|
5
|
+
return value;
|
|
6
|
+
if (value === undefined || value === null)
|
|
7
|
+
return [0];
|
|
8
|
+
throw new Error(`${label} needs a number or a vector of numbers, and got ${describe(value)}`);
|
|
9
|
+
}
|
|
10
|
+
function describe(value) {
|
|
11
|
+
if (Array.isArray(value))
|
|
12
|
+
return `an array of ${value.length}`;
|
|
13
|
+
return `a ${typeof value}`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Apply an operation component-wise, broadcasting a scalar against a vector.
|
|
17
|
+
*
|
|
18
|
+
* Mismatched vector widths throw rather than padding: `vec2 + vec3` is a wiring
|
|
19
|
+
* mistake, and quietly treating the missing component as zero would produce a
|
|
20
|
+
* plausible wrong answer — the failure that is hardest to see in a picture.
|
|
21
|
+
*/
|
|
22
|
+
function combine(left, right, operate) {
|
|
23
|
+
const a = asComponents(left, "the first input");
|
|
24
|
+
const b = asComponents(right, "the second input");
|
|
25
|
+
if (a.length !== b.length && a.length !== 1 && b.length !== 1)
|
|
26
|
+
throw new Error(`cannot combine a vector of ${a.length} with a vector of ${b.length}`);
|
|
27
|
+
const width = Math.max(a.length, b.length);
|
|
28
|
+
const out = [];
|
|
29
|
+
for (let index = 0; index < width; index += 1)
|
|
30
|
+
out.push(operate(a[a.length === 1 ? 0 : index], b[b.length === 1 ? 0 : index]));
|
|
31
|
+
return width === 1 ? out[0] : out;
|
|
32
|
+
}
|
|
33
|
+
function map(value, operate) {
|
|
34
|
+
const components = asComponents(value, "the input");
|
|
35
|
+
const out = components.map(operate);
|
|
36
|
+
return out.length === 1 ? out[0] : out;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Division and modulo by zero give **zero**, not `Infinity` or `NaN`.
|
|
40
|
+
*
|
|
41
|
+
* Both choices hide something, so this is the lesser one. A non-finite number
|
|
42
|
+
* flows downstream into a position and the geometry silently vanishes — a
|
|
43
|
+
* blank frame with no error anywhere, which is the hardest thing to diagnose
|
|
44
|
+
* here. And a zero divisor is almost always a parameter nobody set yet rather
|
|
45
|
+
* than an intent, so zero is also the likelier thing to have meant.
|
|
46
|
+
*/
|
|
47
|
+
function divide(a, b) {
|
|
48
|
+
return b === 0 ? 0 : a / b;
|
|
49
|
+
}
|
|
50
|
+
const BINARY = {
|
|
51
|
+
add: (a, b) => a + b,
|
|
52
|
+
subtract: (a, b) => a - b,
|
|
53
|
+
multiply: (a, b) => a * b,
|
|
54
|
+
divide,
|
|
55
|
+
power: (a, b) => a ** b,
|
|
56
|
+
modulo: (a, b) => (b === 0 ? 0 : a % b),
|
|
57
|
+
min: (a, b) => Math.min(a, b),
|
|
58
|
+
max: (a, b) => Math.max(a, b),
|
|
59
|
+
atan2: (a, b) => Math.atan2(a, b),
|
|
60
|
+
};
|
|
61
|
+
const DEG = Math.PI / 180;
|
|
62
|
+
const UNARY = {
|
|
63
|
+
abs: Math.abs,
|
|
64
|
+
negate: (a) => -a,
|
|
65
|
+
floor: Math.floor,
|
|
66
|
+
ceil: Math.ceil,
|
|
67
|
+
round: Math.round,
|
|
68
|
+
sqrt: (a) => (a < 0 ? 0 : Math.sqrt(a)),
|
|
69
|
+
sign: Math.sign,
|
|
70
|
+
// Trigonometry in RADIANS, matching the expression engine, where bare `sin`
|
|
71
|
+
// is radians too. `radians` and `degrees` are here for the conversion, and
|
|
72
|
+
// the divergence from `Transform`'s degrees is recorded in AGENTS.md.
|
|
73
|
+
sin: Math.sin,
|
|
74
|
+
cos: Math.cos,
|
|
75
|
+
tan: Math.tan,
|
|
76
|
+
asin: (a) => Math.asin(Math.max(-1, Math.min(1, a))),
|
|
77
|
+
acos: (a) => Math.acos(Math.max(-1, Math.min(1, a))),
|
|
78
|
+
exp: Math.exp,
|
|
79
|
+
log: (a) => (a <= 0 ? 0 : Math.log(a)),
|
|
80
|
+
radians: (a) => a * DEG,
|
|
81
|
+
degrees: (a) => a / DEG,
|
|
82
|
+
/** The fractional part, always positive — `fract(-0.25)` is `0.75`, which is
|
|
83
|
+
* what a repeating pattern wants and what GLSL's `fract` does. */
|
|
84
|
+
fract: (a) => a - Math.floor(a),
|
|
85
|
+
};
|
|
86
|
+
const COMPARE = {
|
|
87
|
+
greater: (a, b) => a > b,
|
|
88
|
+
"greater-or-equal": (a, b) => a >= b,
|
|
89
|
+
less: (a, b) => a < b,
|
|
90
|
+
"less-or-equal": (a, b) => a <= b,
|
|
91
|
+
equal: (a, b) => a === b,
|
|
92
|
+
"not-equal": (a, b) => a !== b,
|
|
93
|
+
};
|
|
94
|
+
function options(table) {
|
|
95
|
+
return Object.keys(table).map((value) => ({ value, label: label(value) }));
|
|
96
|
+
}
|
|
97
|
+
function label(value) {
|
|
98
|
+
return value
|
|
99
|
+
.split("-")
|
|
100
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
101
|
+
.join(" ");
|
|
102
|
+
}
|
|
103
|
+
export const binaryDefinition = {
|
|
104
|
+
apiVersion: 1,
|
|
105
|
+
label: "Binary Math",
|
|
106
|
+
description: "Two values, one operation. Component-wise, and a scalar broadcasts against a vector.",
|
|
107
|
+
icon: "Plus",
|
|
108
|
+
runsOn: "portable",
|
|
109
|
+
inputs: {
|
|
110
|
+
a: { kind: "data", type: "any", default: 0, description: "First value." },
|
|
111
|
+
b: { kind: "data", type: "any", default: 0, description: "Second value." },
|
|
112
|
+
},
|
|
113
|
+
outputs: { value: { kind: "data", type: "any" } },
|
|
114
|
+
props: {
|
|
115
|
+
operation: {
|
|
116
|
+
type: "string",
|
|
117
|
+
default: "add",
|
|
118
|
+
control: "select",
|
|
119
|
+
options: options(BINARY),
|
|
120
|
+
label: "Operation",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
export function executeBinary(context) {
|
|
125
|
+
const operate = BINARY[context.props.operation];
|
|
126
|
+
if (!operate)
|
|
127
|
+
throw new Error(`cascade.math.Binary has no operation "${context.props.operation}"`);
|
|
128
|
+
context.outputs.value.set(combine(context.inputs.a, context.inputs.b, operate));
|
|
129
|
+
}
|
|
130
|
+
export const unaryDefinition = {
|
|
131
|
+
apiVersion: 1,
|
|
132
|
+
label: "Unary Math",
|
|
133
|
+
description: "One value, one operation. Trigonometry is in radians.",
|
|
134
|
+
icon: "FunctionSquare",
|
|
135
|
+
runsOn: "portable",
|
|
136
|
+
inputs: {
|
|
137
|
+
value: { kind: "data", type: "any", default: 0 },
|
|
138
|
+
},
|
|
139
|
+
outputs: { value: { kind: "data", type: "any" } },
|
|
140
|
+
props: {
|
|
141
|
+
operation: {
|
|
142
|
+
type: "string",
|
|
143
|
+
default: "abs",
|
|
144
|
+
control: "select",
|
|
145
|
+
options: options(UNARY),
|
|
146
|
+
label: "Operation",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
export function executeUnary(context) {
|
|
151
|
+
const operate = UNARY[context.props.operation];
|
|
152
|
+
if (!operate)
|
|
153
|
+
throw new Error(`cascade.math.Unary has no operation "${context.props.operation}"`);
|
|
154
|
+
context.outputs.value.set(map(context.inputs.value, operate));
|
|
155
|
+
}
|
|
156
|
+
export const clampDefinition = {
|
|
157
|
+
apiVersion: 1,
|
|
158
|
+
label: "Clamp",
|
|
159
|
+
description: "Hold a value between two bounds.",
|
|
160
|
+
icon: "Brackets",
|
|
161
|
+
runsOn: "portable",
|
|
162
|
+
inputs: {
|
|
163
|
+
value: { kind: "data", type: "any", default: 0 },
|
|
164
|
+
min: { kind: "data", type: "any", default: 0 },
|
|
165
|
+
max: { kind: "data", type: "any", default: 1 },
|
|
166
|
+
},
|
|
167
|
+
outputs: { value: { kind: "data", type: "any" } },
|
|
168
|
+
props: {},
|
|
169
|
+
};
|
|
170
|
+
export function executeClamp(context) {
|
|
171
|
+
const lower = combine(context.inputs.value, context.inputs.min, Math.max);
|
|
172
|
+
context.outputs.value.set(combine(lower, context.inputs.max, Math.min));
|
|
173
|
+
}
|
|
174
|
+
export const mixDefinition = {
|
|
175
|
+
apiVersion: 1,
|
|
176
|
+
label: "Mix",
|
|
177
|
+
description: "Blend between two values. Houdini's lerp.",
|
|
178
|
+
icon: "Blend",
|
|
179
|
+
runsOn: "portable",
|
|
180
|
+
inputs: {
|
|
181
|
+
a: { kind: "data", type: "any", default: 0, description: "The value at 0." },
|
|
182
|
+
b: { kind: "data", type: "any", default: 1, description: "The value at 1." },
|
|
183
|
+
bias: {
|
|
184
|
+
kind: "data",
|
|
185
|
+
type: "float",
|
|
186
|
+
default: 0.5,
|
|
187
|
+
min: 0,
|
|
188
|
+
max: 1,
|
|
189
|
+
step: 0.01,
|
|
190
|
+
description: "Not clamped: past 0..1 this extrapolates, which is useful.",
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
outputs: { value: { kind: "data", type: "any" } },
|
|
194
|
+
props: {},
|
|
195
|
+
};
|
|
196
|
+
export function executeMix(context) {
|
|
197
|
+
const bias = context.inputs.bias ?? 0.5;
|
|
198
|
+
// a + (b - a) * bias, component-wise. Written this way rather than as
|
|
199
|
+
// `a*(1-t) + b*t` because it is exact at t = 0 and t = 1 in floating point,
|
|
200
|
+
// which matters when a mix drives something that must land exactly on an end.
|
|
201
|
+
const delta = combine(context.inputs.b, context.inputs.a, (b, a) => b - a);
|
|
202
|
+
context.outputs.value.set(combine(context.inputs.a, delta, (a, d) => a + d * bias));
|
|
203
|
+
}
|
|
204
|
+
export const compareDefinition = {
|
|
205
|
+
apiVersion: 1,
|
|
206
|
+
label: "Compare",
|
|
207
|
+
description: "Test two values. Outputs a bool, for a Switch.",
|
|
208
|
+
icon: "Equal",
|
|
209
|
+
runsOn: "portable",
|
|
210
|
+
inputs: {
|
|
211
|
+
a: { kind: "data", type: "float", default: 0 },
|
|
212
|
+
b: { kind: "data", type: "float", default: 0 },
|
|
213
|
+
},
|
|
214
|
+
outputs: { result: { kind: "data", type: "bool" } },
|
|
215
|
+
props: {
|
|
216
|
+
operation: {
|
|
217
|
+
type: "string",
|
|
218
|
+
default: "greater",
|
|
219
|
+
control: "select",
|
|
220
|
+
options: options(COMPARE),
|
|
221
|
+
label: "Test",
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Scalars only, unlike the rest of this namespace.
|
|
225
|
+
*
|
|
226
|
+
* "Is this vector greater than that one" has no single right answer — all
|
|
227
|
+
* components, any component, or the length — and a node that picked one
|
|
228
|
+
* silently would be wrong for the other two readings. A comparison feeding
|
|
229
|
+
* a `Switch` wants one boolean, so the input is a `float` and the question
|
|
230
|
+
* does not arise.
|
|
231
|
+
*/
|
|
232
|
+
tolerance: {
|
|
233
|
+
type: "float",
|
|
234
|
+
default: 0,
|
|
235
|
+
min: 0,
|
|
236
|
+
label: "Tolerance",
|
|
237
|
+
description: "Slack for Equal and Not Equal. Floating point rarely lands on exactly equal.",
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
export function executeCompare(context) {
|
|
242
|
+
const operation = context.props.operation;
|
|
243
|
+
const test = COMPARE[operation];
|
|
244
|
+
if (!test)
|
|
245
|
+
throw new Error(`cascade.math.Compare has no test "${context.props.operation}"`);
|
|
246
|
+
const a = context.inputs.a ?? 0;
|
|
247
|
+
const b = context.inputs.b ?? 0;
|
|
248
|
+
const tolerance = context.props.tolerance;
|
|
249
|
+
if (tolerance > 0 && (operation === "equal" || operation === "not-equal")) {
|
|
250
|
+
const near = Math.abs(a - b) <= tolerance;
|
|
251
|
+
context.outputs.result.set(operation === "equal" ? near : !near);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
context.outputs.result.set(test(a, b));
|
|
255
|
+
}
|
|
256
|
+
function registration(name, definition, execute) {
|
|
257
|
+
return {
|
|
258
|
+
kind: "definition-v1",
|
|
259
|
+
moduleId: `cascade.math.${name}`,
|
|
260
|
+
definition,
|
|
261
|
+
loadExecute: async () => execute,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
export const binaryRegistration = registration("Binary", binaryDefinition, executeBinary);
|
|
265
|
+
export const unaryRegistration = registration("Unary", unaryDefinition, executeUnary);
|
|
266
|
+
export const clampRegistration = registration("Clamp", clampDefinition, executeClamp);
|
|
267
|
+
export const mixRegistration = registration("Mix", mixDefinition, executeMix);
|
|
268
|
+
export const compareRegistration = registration("Compare", compareDefinition, executeCompare);
|
|
269
|
+
export const mathNodeRegistrations = Object.freeze([
|
|
270
|
+
binaryRegistration,
|
|
271
|
+
unaryRegistration,
|
|
272
|
+
clampRegistration,
|
|
273
|
+
mixRegistration,
|
|
274
|
+
compareRegistration,
|
|
275
|
+
]);
|
|
276
|
+
/** `[moduleId, definition]` pairs, the shape a host's palette builder wants. */
|
|
277
|
+
export const mathNodeDefinitions = Object.freeze([
|
|
278
|
+
["cascade.math.Binary", binaryDefinition],
|
|
279
|
+
["cascade.math.Unary", unaryDefinition],
|
|
280
|
+
["cascade.math.Clamp", clampDefinition],
|
|
281
|
+
["cascade.math.Mix", mixDefinition],
|
|
282
|
+
["cascade.math.Compare", compareDefinition],
|
|
283
|
+
]);
|
|
284
|
+
export { BINARY, UNARY, COMPARE };
|
|
285
|
+
//# sourceMappingURL=definitions.js.map
|
package/doc/NODE_REFERENCE.md
CHANGED
|
@@ -498,6 +498,121 @@ Runs on `portable`.
|
|
|
498
498
|
| --- | --- | --- | --- |
|
|
499
499
|
| `geometry` | `geometry` | | |
|
|
500
500
|
|
|
501
|
+
### `cascade.math.Binary`
|
|
502
|
+
|
|
503
|
+
Binary Math — Two values, one operation. Component-wise, and a scalar broadcasts against a vector.
|
|
504
|
+
|
|
505
|
+
Runs on `portable`.
|
|
506
|
+
|
|
507
|
+
**Inputs**
|
|
508
|
+
|
|
509
|
+
| name | type | default | range |
|
|
510
|
+
| --- | --- | --- | --- |
|
|
511
|
+
| `a` | `any` | `0` | |
|
|
512
|
+
| `b` | `any` | `0` | |
|
|
513
|
+
|
|
514
|
+
**Props**
|
|
515
|
+
|
|
516
|
+
| name | type | default | range |
|
|
517
|
+
| --- | --- | --- | --- |
|
|
518
|
+
| `operation` | `string` | `"add"` | |
|
|
519
|
+
|
|
520
|
+
**Outputs**
|
|
521
|
+
|
|
522
|
+
| name | type | default | range |
|
|
523
|
+
| --- | --- | --- | --- |
|
|
524
|
+
| `value` | `any` | | |
|
|
525
|
+
|
|
526
|
+
### `cascade.math.Clamp`
|
|
527
|
+
|
|
528
|
+
Clamp — Hold a value between two bounds.
|
|
529
|
+
|
|
530
|
+
Runs on `portable`.
|
|
531
|
+
|
|
532
|
+
**Inputs**
|
|
533
|
+
|
|
534
|
+
| name | type | default | range |
|
|
535
|
+
| --- | --- | --- | --- |
|
|
536
|
+
| `value` | `any` | `0` | |
|
|
537
|
+
| `min` | `any` | `0` | |
|
|
538
|
+
| `max` | `any` | `1` | |
|
|
539
|
+
|
|
540
|
+
**Outputs**
|
|
541
|
+
|
|
542
|
+
| name | type | default | range |
|
|
543
|
+
| --- | --- | --- | --- |
|
|
544
|
+
| `value` | `any` | | |
|
|
545
|
+
|
|
546
|
+
### `cascade.math.Compare`
|
|
547
|
+
|
|
548
|
+
Compare — Test two values. Outputs a bool, for a Switch.
|
|
549
|
+
|
|
550
|
+
Runs on `portable`.
|
|
551
|
+
|
|
552
|
+
**Inputs**
|
|
553
|
+
|
|
554
|
+
| name | type | default | range |
|
|
555
|
+
| --- | --- | --- | --- |
|
|
556
|
+
| `a` | `float` | `0` | |
|
|
557
|
+
| `b` | `float` | `0` | |
|
|
558
|
+
|
|
559
|
+
**Props**
|
|
560
|
+
|
|
561
|
+
| name | type | default | range |
|
|
562
|
+
| --- | --- | --- | --- |
|
|
563
|
+
| `operation` | `string` | `"greater"` | |
|
|
564
|
+
| `tolerance` | `float` | `0` | |
|
|
565
|
+
|
|
566
|
+
**Outputs**
|
|
567
|
+
|
|
568
|
+
| name | type | default | range |
|
|
569
|
+
| --- | --- | --- | --- |
|
|
570
|
+
| `result` | `bool` | | |
|
|
571
|
+
|
|
572
|
+
### `cascade.math.Mix`
|
|
573
|
+
|
|
574
|
+
Mix — Blend between two values. Houdini's lerp.
|
|
575
|
+
|
|
576
|
+
Runs on `portable`.
|
|
577
|
+
|
|
578
|
+
**Inputs**
|
|
579
|
+
|
|
580
|
+
| name | type | default | range |
|
|
581
|
+
| --- | --- | --- | --- |
|
|
582
|
+
| `a` | `any` | `0` | |
|
|
583
|
+
| `b` | `any` | `1` | |
|
|
584
|
+
| `bias` | `float` | `0.5` | 0…1 |
|
|
585
|
+
|
|
586
|
+
**Outputs**
|
|
587
|
+
|
|
588
|
+
| name | type | default | range |
|
|
589
|
+
| --- | --- | --- | --- |
|
|
590
|
+
| `value` | `any` | | |
|
|
591
|
+
|
|
592
|
+
### `cascade.math.Unary`
|
|
593
|
+
|
|
594
|
+
Unary Math — One value, one operation. Trigonometry is in radians.
|
|
595
|
+
|
|
596
|
+
Runs on `portable`.
|
|
597
|
+
|
|
598
|
+
**Inputs**
|
|
599
|
+
|
|
600
|
+
| name | type | default | range |
|
|
601
|
+
| --- | --- | --- | --- |
|
|
602
|
+
| `value` | `any` | `0` | |
|
|
603
|
+
|
|
604
|
+
**Props**
|
|
605
|
+
|
|
606
|
+
| name | type | default | range |
|
|
607
|
+
| --- | --- | --- | --- |
|
|
608
|
+
| `operation` | `string` | `"abs"` | |
|
|
609
|
+
|
|
610
|
+
**Outputs**
|
|
611
|
+
|
|
612
|
+
| name | type | default | range |
|
|
613
|
+
| --- | --- | --- | --- |
|
|
614
|
+
| `value` | `any` | | |
|
|
615
|
+
|
|
501
616
|
### `cascade.pop.FieldForce`
|
|
502
617
|
|
|
503
618
|
POP Field Force — Pull particles along a field's gradient and around its contours. The calligraphy force.
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,c as t,l as n,p as r,u as i}from"./index-CeqTfMbr.js";e([r,t,n,i]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,E as t,s as n,v as r}from"./index-CeqTfMbr.js";e(n,{assets:t});export{r as geoLibrary};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,_ as t,g as n}from"./index-CeqTfMbr.js";e(t,{});export{n as popLibrary};
|