39 lines
687 B
JavaScript
39 lines
687 B
JavaScript
import * as MathExt from '.';
|
|
|
|
export function behaviorContextGlobals() {
|
|
return {
|
|
Math: [MathExt, 'Math'],
|
|
};
|
|
}
|
|
|
|
export function behaviorContextTypes() {
|
|
return {
|
|
Math: (Math) => ({
|
|
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',
|
|
},
|
|
}),
|
|
};
|
|
}
|