code: def _create_gltf_structure(scene,
                             extras=None,
                             include_normals=False):
      
      # we are defining a single scene, and will be setting the
      # world node to the 0th index
      tree = {
          "scene": 0,
          "scenes": [{"nodes": [0]}],
          "asset": {"version": "2.0",
                    "generator": "github.com/mikedh/trimesh"},
          "accessors": [],
          "meshes": [],
          "materials": [],
          "cameras": [_convert_camera(scene.camera)]}
  
      if extras is not None:
          tree['extras'] = extras
  
      # grab the flattened scene graph in GLTF's format
      nodes = scene.graph.to_gltf(scene=scene)
      tree.update(nodes)
  
      buffer_items = []
      for name, geometry in scene.geometry.items():
          if util.is_instance_named(geometry, "Trimesh"):
              # add the mesh
              _append_mesh(
                  mesh=geometry,
                  name=name,
                  tree=tree,
                  buffer_items=buffer_items,
                  include_normals=include_normals)
          elif util.is_instance_named(geometry, "Path"):
              # add Path2D and Path3D objects
              _append_path(
                  path=geometry,
                  name=name,
                  tree=tree,
                  buffer_items=buffer_items)
      # if nothing defined a material remove it from the structure
      if len(tree["materials"]) == 0:
          tree.pop("materials")
  
      return tree, buffer_items
docs: Generate a GLTF header.
  
      Parameters
      -------------
      scene : trimesh.Scene
        Input scene data
      extras : JSON serializable
        Will be stored in the extras field
      include_normals : bool
        Include vertex normals in output file?
  
      Returns
      ---------------
      tree : dict
        Contains required keys for a GLTF scene
      buffer_items : list
        Contains bytes of data