getDataFromNode method

dynamic getDataFromNode(
  1. dynamic node, [
  2. dynamic shaderStage
])

Implementation

getDataFromNode(node, [shaderStage]) {
  shaderStage ??= this.shaderStage;

  var nodeData = this.nodesData.get(node);

  if (nodeData == undefined) {
    nodeData = {"vertex": {}, "fragment": {}};

    this.nodesData.set(node, nodeData);
  }

  return shaderStage != null ? nodeData[shaderStage] : nodeData;
}