class_docstr: Implements loading meshes from glTF 2 assets stored in a
  GLB container file or a glTF JSON file with embedded binary data.
  
  This implementation is quite restricted in what it supports.
  
      - It does not try to validate the input against the standard.
      - It loads the default scene only.
      - Only triangulated geometry is supported.
      - The geometry of all meshes of the entire scene is aggregated into a single mesh.
      Use `load_meshes()` instead to get un-aggregated (but transformed) ones.
      - All material properties are ignored except for either vertex color, baseColorTexture
      or baseColorFactor. If available, one of these (in this order) is exclusively
      used which does not match the semantics of the standard.
class_docstr_tok: ["Implements","loading","meshes","from","glTF","2","assets","stored","in","a","GLB","container","file","or","a","glTF","JSON","file","with","embedded","binary","data",".","This","implementation","is","quite","restricted","in","what","it","supports",".","-","It","does","not","try","to","validate","the","input","against","the","standard",".","-","It","loads","the","default","scene","only",".","-","Only","triangulated","geometry","is","supported",".","-","The","geometry","of","all","meshes","of","the","entire","scene","is","aggregated","into","a","single","mesh",".","Use","`","load_meshes","(",")","`","instead","to","get","un-aggregated","(","but","transformed",")","ones",".","-","All","material","properties","are","ignored","except","for","either","vertex","color",",","baseColorTexture","or","baseColorFactor",".","If","available",",","one","of","these","(","in","this","order",")","is","exclusively","used","which","does","not","match","the","semantics","of","the","standard","."]
code: def read(
      self,
      path: PathOrStr,
      include_textures: bool,
      device,
      path_manager: PathManager,
      **kwargs,
  ) -> Optional[Meshes]:
      if not endswith(path, self.known_suffixes):
          return None
  
      names_meshes_list = load_meshes(
          path=path,
          path_manager=path_manager,
          include_textures=include_textures,
      )
  
      meshes_list = [mesh for name, mesh in names_meshes_list]
      mesh = join_meshes_as_scene(meshes_list)
      return mesh.to(device)
  
imports: import json
  import struct
  import warnings
  from base64 import b64decode
  from collections import defaultdict, deque
  from enum import IntEnum
  from io import BytesIO
  from typing import Any, BinaryIO, cast, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from iopath.common.file_io import PathManager
  from PIL import Image
  from pytorch3d.io.utils import _open_file, PathOrStr
  from pytorch3d.renderer.mesh import TexturesBase, TexturesUV, TexturesVertex
  from pytorch3d.structures import join_meshes_as_scene, Meshes
  from pytorch3d.transforms import quaternion_to_matrix, Transform3d
  from .pluggable_formats import endswith, MeshFormatInterpreter
label_desc: Use image node_id 2 for calling the MeshGlbFormat obj's underlying member method code with example usage: obj.read(path, include_textures, device, path_manager) and returns: mesh, None