WGSLNodeFunction constructor

WGSLNodeFunction(
  1. dynamic source
)

Implementation

factory WGSLNodeFunction(source) {
  var data = parse(source);
  var type = data["type"];
  var inputs = data["inputs"];
  var name = data["name"];
  var inputsCode = data["inputsCode"];
  var blockCode = data["blockCode"];

  var wnf = WGSLNodeFunction.create(type, inputs, name);

  wnf.inputsCode = inputsCode;
  wnf.blockCode = blockCode;

  return wnf;
}