File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -739,7 +739,7 @@ TABS.magnetometer.initialize3D = function () {
739739 magModels = [ ] ;
740740 //Load the UAV model
741741 import ( `./../resources/models/model_${ model_file } .gltf` ) . then ( ( { default : model } ) => {
742- loader . load ( modelUrl , ( obj ) => {
742+ loader . load ( model , ( obj ) => {
743743 const modelScene = obj . scene ;
744744 const scaleFactor = 15 ;
745745 modelScene . scale . set ( scaleFactor , scaleFactor , scaleFactor ) ;
@@ -759,7 +759,7 @@ TABS.magnetometer.initialize3D = function () {
759759 if ( child . material ) child . material . metalness = 0 ;
760760 } ) ;
761761 gps . rotation . y = 3 * Math . PI / 2 ;
762- model . add ( gps ) ;
762+ modelScene . add ( gps ) ;
763763 magModels [ i ] = gps ;
764764 this . resize3D ( ) ;
765765 } ) ;
@@ -774,7 +774,7 @@ TABS.magnetometer.initialize3D = function () {
774774 fc . scale . set ( scaleFactor , scaleFactor , scaleFactor ) ;
775775 fc . position . set ( gpsOffset [ 0 ] , gpsOffset [ 1 ] - 0.5 , gpsOffset [ 2 ] ) ;
776776 fc . rotation . y = 3 * Math . PI / 2 ;
777- model . add ( fc ) ;
777+ modelScene . add ( fc ) ;
778778 this . render3D ( ) ;
779779 } ) ;
780780 } ) ;
You can’t perform that action at this time.
0 commit comments