getNextRenderItem method

RenderItem getNextRenderItem(
  1. Object3D object,
  2. BufferGeometry? geometry,
  3. Material? material,
  4. int groupOrder,
  5. double z,
  6. Map<String, dynamic>? group,
)

Implementation

RenderItem getNextRenderItem(
  Object3D object,
  BufferGeometry? geometry,
  Material? material,
  int groupOrder,
  double z,
  Map<String, dynamic>? group
) {
  RenderItem? renderItem = renderItems[renderItemsIndex];

  if (renderItem == null) {
    renderItem = RenderItem.fromMap({
      "id": object.id,
      "object": object,
      "geometry": geometry,
      "material": material,
      "groupOrder": groupOrder,
      "renderOrder": object.renderOrder,
      "z": z,
      "group": group
    });
  }
  else {
    renderItem = RenderItem(
      id: object.id,
      object: object,
      geometry: geometry,
      material: material,
      groupOrder: groupOrder,
      renderOrder: object.renderOrder,
      z: z,
      group: group
    );
  }

  renderItems[renderItemsIndex] = renderItem;
  renderItemsIndex++;

  return renderItem;
}