generate method

dynamic generate([
  1. dynamic builder,
  2. dynamic output
])
override

Implementation

generate([builder, output]) {
  var type = this.getNodeType(builder);

  var method = this.method;
  var node = this.node;

  if (method != ColorSpaceNode.LINEAR_TO_LINEAR) {
    var encodingFunctionNode = EncodingLib[method];

    return encodingFunctionNode({value: node}).build(builder, type);
  } else {
    return node.build(builder, type);
  }
}