polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
17 lines (16 loc) • 378 B
JavaScript
export class BaseExpressionRegister {
constructor() {
this._methods_names = [];
this._methods_by_name = new Map();
}
register(expression, name) {
this._methods_names.push(name);
this._methods_by_name.set(name, expression);
}
getMethod(name) {
return this._methods_by_name.get(name);
}
availableMethods() {
return this._methods_names;
}
}