update method

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

Implementation

update(object, count, instanceCount) {
  this.render["drawCalls"]++;

  if (object is Mesh) {
    this.render["triangles"] += instanceCount * (count / 3);
  } else if (object is Points) {
    this.render["points"] += instanceCount * count;
  } else if (object is LineSegments) {
    this.render["lines"] += instanceCount * (count / 2);
  } else if (object is Line) {
    this.render["lines"] += instanceCount * (count - 1);
  } else {
    console.error('THREE.WebGPUInfo: Unknown object type.');
  }
}