get method

WebGLRenderState get(
  1. Object3D scene, {
  2. int renderCallDepth = 0,
})

Implementation

WebGLRenderState get(Object3D scene, {int renderCallDepth = 0}) {
  WebGLRenderState renderState;

  if (!renderStates.has(scene)) {
    renderState = WebGLRenderState(extensions, capabilities);
    renderStates.add(key: scene, value: [renderState]);
  } else {
    if (renderCallDepth >= renderStates.get(scene).length) {
      renderState = WebGLRenderState(extensions, capabilities);
      renderStates.get(scene).add(renderState);
    } else {
      renderState = renderStates.get(scene)[renderCallDepth];
    }
  }

  return renderState;
}