envision/web/src/components/simulation.js
// Parse extra data attached in glb file
Parse extra data attached in glb file
Parse extra data attached in glb file
function LoadGLTFExtras(loader, scenario_id) {
    this.name = `load_gltf_extras_${scenario_id}`;
    this.enabled = true;
    if (loader.gltf["extras"]) {
      if (loader.gltf.extras["lane_dividers"]) {
        setLaneDividerPos(loader.gltf.extras["lane_dividers"]);
      }
      if (loader.gltf.extras["edge_dividers"]) {
        setEdgeDividerPos(loader.gltf.extras["edge_dividers"]);
      }
      if (loader.gltf.extras["bounding_box"]) {
        setRoadNetworkBbox(loader.gltf.extras["bounding_box"]);
      }
    }
  }
function LoadGLTFExtras ( loader , scenario_id ) { this . name = ` ${ scenario_id } ` ; this . enabled = true ; if ( loader . gltf [ "extras" ] ) { if ( loader . gltf . extras [ "lane_dividers" ] ) { setLaneDividerPos ( loader . gltf . extras [ "lane_dividers" ] ) ; } if ( loader . gltf . extras [ "edge_dividers" ] ) { setEdgeDividerPos ( loader . gltf . extras [ "edge_dividers" ] ) ; } if ( loader . gltf . extras [ "bounding_box" ] ) { setRoadNetworkBbox ( loader . gltf . extras [ "bounding_box" ] ) ; } } }
Parse extra data attached in glb file
Parse extra data attached in glb file
// Register loader locally under different names for different scenarios