@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
20 lines (19 loc) • 439 B
JavaScript
;
import { BaseMethod } from "./_Base";
export class ArgExpression extends BaseMethod {
static requiredArguments() {
return [
["string", "arguments list"],
["number", "index"]
];
}
async processArguments(args) {
if (args.length == 2) {
const argumentsList = args[0];
const index = args[1];
const val = argumentsList.split(" ")[index];
return val;
}
return 0;
}
}