get method

WebGLRenderList get(
  1. dynamic scene,
  2. dynamic renderCallDepth
)

Implementation

WebGLRenderList get(scene, renderCallDepth) {
  var list;

  if (lists.has(scene) == false) {
    list = WebGLRenderList();
    lists.add(key: scene, value: [list]);
  } else {
    if (renderCallDepth >= lists.get(scene).length) {
      list = WebGLRenderList();
      lists.get(scene).add(list);
    } else {
      list = lists.get(scene)[renderCallDepth];
    }
  }

  return list;
}