get method

Map get(
  1. dynamic object
)

Implementation

Map get(object) {
  var data = this.uniformsData.get(object);

  if (data == undefined) {
    // each object defines an array of bindings (ubos, textures, samplers etc.)

    var nodeBuilder = this.nodes.get(object);
    var bindings = nodeBuilder.getBindings();

    // setup (static) binding layout and (dynamic) binding group

    WebGPURenderPipeline renderPipeline = this.renderPipelines.get(object);

    // var bindGroupLayout = renderPipeline.pipeline.getBindGroupLayout( 0 );
    var bindGroupLayout = renderPipeline.bindGroupLayout;

    var bindGroup = this._createBindGroup(bindings, bindGroupLayout);

    data = {
      "layout": bindGroupLayout,
      "group": bindGroup,
      "bindings": bindings
    };

    this.uniformsData.set(object, data);
  }

  return data;
}