code: def _append_path(path, name, tree, buffer_items):
      
  
      # convert the path to the unnamed args for
      # a pyglet vertex list
      vxlist = rendering.path_to_vertexlist(path)
  
      tree["meshes"].append({
          "name": name,
          "primitives": [{
              "attributes": {"POSITION": len(tree["accessors"])},
              "mode": 1,  # mode 1 is GL_LINES
              "material": len(tree["materials"])}]})
  
      # if units are defined, store them as an extra:
      # https://github.com/KhronosGroup/glTF/tree/master/extensions
      if path.units is not None and 'meter' not in path.units:
          tree["meshes"][-1]["extras"] = {"units": str(path.units)}
  
      tree["accessors"].append(
          {
              "bufferView": len(buffer_items),
              "componentType": 5126,
              "count": vxlist[0],
              "type": "VEC3",
              "byteOffset": 0,
              "max": path.vertices.max(axis=0).tolist(),
              "min": path.vertices.min(axis=0).tolist(),
          }
      )
  
      # TODO add color support to Path object
      # this is just exporting everying as black
      tree["materials"].append(_default_material)
  
      # data is the second value of the fourth field
      # which is a (data type, data) tuple
      buffer_items.append(_byte_pad(
          vxlist[4][1].astype(float32).tobytes()))
docs: Append a 2D or 3D path to the scene structure and put the
      data into buffer_items.
  
      Parameters
      -------------
      path : trimesh.Path2D or trimesh.Path3D
        Source geometry
      name : str
        Name of geometry
      tree : dict
        Will be updated with data from path
      buffer_items
        Will have buffer appended with path data