avocado-old/packages/math/index.hooks.js

41 lines
754 B
JavaScript
Raw Permalink Normal View History

2019-12-25 00:59:51 -06:00
import * as MathExt from '.';
2020-06-19 17:59:14 -05:00
export function behaviorContextGlobals() {
return {
Math: [MathExt, 'Math'],
};
}
2020-06-23 11:19:59 -05:00
export function behaviorTypes() {
2020-06-19 15:31:35 -05:00
return {
2020-06-19 17:59:14 -05:00
Math: (Math) => ({
2020-06-22 16:53:49 -05:00
children: {
floor: {
type: 'number',
label: 'Floor $1.',
args: [
['operand', {
type: 'number',
}],
],
},
randomNumber: {
type: 'number',
label: 'Random number between $1 and $2.',
args: [
['min', {
type: 'number',
}],
['max', {
type: 'number',
}],
],
},
Vector: {
type: 'Vector',
},
}
2020-06-19 17:59:14 -05:00
}),
2019-12-25 00:59:51 -06:00
};
}