UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

13 lines (12 loc) 457 B
"use strict"; import { BaseNamedFunctionRegister } from "./_BaseRegister"; export class NamedFunctionRegister extends BaseNamedFunctionRegister { getFunction(functionName, node, shadersCollectionController) { const funcClass = this._functionByName.get(functionName); if (!funcClass) { console.error(`function not registered:'${functionName}'`); } const func = new funcClass(node, shadersCollectionController); return func; } }