@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
18 lines (17 loc) • 399 B
JavaScript
;
export class BaseExpressionRegister {
constructor() {
this._methodsNames = [];
this._methodsByName = /* @__PURE__ */ new Map();
}
register(expression, name) {
this._methodsNames.push(name);
this._methodsByName.set(name, expression);
}
getMethod(name) {
return this._methodsByName.get(name);
}
availableMethods() {
return this._methodsNames;
}
}