update method

dynamic update(
  1. dynamic count,
  2. dynamic mode,
  3. dynamic instanceCount
)

Implementation

update(count, mode, instanceCount) {
  render["calls"] = render["calls"]! + 1;

  if (mode == gl.TRIANGLES) {
    render["triangles"] =
        render["triangles"]! + instanceCount * (count / 3.0);
  } else if (mode == gl.LINES) {
    render["lines"] = render["lines"]! + instanceCount * (count / 2);
  } else if (mode == gl.LINE_STRIP) {
    render["lines"] = render["lines"]! + instanceCount * (count - 1);
  } else if (mode == gl.LINE_LOOP) {
    render["lines"] = render["lines"]! + instanceCount * count;
  } else if (mode == gl.POINTS) {
    render["points"] = render["points"]! + instanceCount * count;
  } else {
    print('THREE.WebGLInfo: Unknown draw mode: $mode ');
  }
}