[{"Owner":"TardigradeX","Date":"2017-07-20T15:12:05Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_m working on a medical application where anatomical 3d Models are shown in the Browser._lt_br /_gt_\n\tAt the moment I am working with Threejs_co_ but I am looking for alternatives and Babylon.js looks very good_co_ especially from a documentation perspective.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBut I cant find much information about loading Scenes/STLs using XHR Requests. In most tutorials they are loaded as assets directly from the webserver the app is hosted on._lt_br /_gt_\n\tSo my Questions are_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIs it possible to load a scene from an application server which is not the webserver using http GET_co_ including an x-auth-token in the header ?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIs it possible to load the file as a binary stream_co_ or in a small format? (Because the models often have a high poly-count)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks in advance _dd_-)_lt_br /_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2017-07-20T15:19:26Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHey and welcome to the forum_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tyou can load your scenes from any url. Internally SceneLoader.Load uses an XHR_dd_ _lt_a href_eq__qt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tools.ts#L459_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tools.ts#L459_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBut you can also load the data on your own and provide the loaded buffer to the STL plugin (which has a load method _lt_a href_eq__qt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/loaders/src/STL/babylon.stlFileLoader.ts#L76_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/loaders/src/STL/babylon.stlFileLoader.ts#L76_lt_/a_gt_)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tFor performance_co_ I would highly recommend using glb (gltf binary) as a vehicule for your data. Belnder has a gltf exporter_dd_ _lt_a href_eq__qt_https_dd_//github.com/KhronosGroup/glTF-Blender-Exporter_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//github.com/KhronosGroup/glTF-Blender-Exporter_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tHope this helps_dd_)\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"TardigradeX","Date":"2017-07-21T07:44:41Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThanks for the fast response.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThe glb format seems like a great option for data transfer. I will look into it.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tAs far as I can see it is not possible to add header data (Security Token) to the request when using the Scene Loader.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI will look into loading the raw-data using my own loader and then parsing it using Babylon and share my findings. Maybe an additional header option can be added to the SceneLoader at some point.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tGreets\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2017-07-21T15:23:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThat_t_s a good idea. feel free to submit a PR with the change. I_t_ll merge it with pleasure\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt could be just a static property that we want to add to all xhr for instance\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]