Skip to content

Commit

Permalink
fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanLut committed May 2, 2024
1 parent d31e281 commit c804e63
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions tabs/magnetometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ TABS.magnetometer.initialize3D = function () {
const loader = new THREE.GLTFLoader(manager);

const magModelNames = ['xyz', 'ak8963c', 'ak8963n', 'ak8975', 'ak8975c', 'bn_880', 'diatone_mamba_m10_pro', 'flywoo_goku_m10_pro_v3', 'foxeer_m10q_120', 'foxeer_m10q_180', 'foxeer_m10q_250',
'geprc_gep_m10_dq', 'hglrc_m100', 'qmc5883', 'ist8308', 'ist8310', 'lis3mdl',
'mag3110', 'matek_m9n', 'matek_m10q', 'mlx90393', 'mp9250', 'qmc5883', 'flywoo_goku_m10_pro_v3', 'ws_m181'];
magModels = [];
'geprc_gep_m10_dq', 'hglrc_m100', 'qmc5883', 'ist8308', 'ist8310', 'lis3mdl',
'mag3110', 'matek_m9n', 'matek_m10q', 'mlx90393', 'mp9250', 'qmc5883', 'flywoo_goku_m10_pro_v3', 'ws_m181'];
magModels = [];

//Load the UAV model
loader.load('./resources/models/' + model_file + '.gltf', (obj) => {
Expand All @@ -703,23 +703,22 @@ TABS.magnetometer.initialize3D = function () {

const gpsOffset = getDistanceByModelName(model_file);

magModelNames.forEach( (name, i) =>
{
//Load the GPS model
loader.load('./resources/models/' + name + '.gltf', (obj) => {
const gps = obj.scene;
const scaleFactor = i==0 ? 0.03 : 0.04;
gps.scale.set(scaleFactor, scaleFactor, scaleFactor);
gps.position.set(gpsOffset[0], gpsOffset[1] + 0.5, gpsOffset[2]);
gps.traverse(child => {
if (child.material) child.material.metalness = 0;
});
gps.rotation.y = 3 * Math.PI / 2;
model.add(gps);
magModels[i]=gps;
this.resize3D();
});
});
magModelNames.forEach( (name, i) =>
{
loader.load('./resources/models/' + name + '.gltf', (obj) => {
const gps = obj.scene;
const scaleFactor = i==0 ? 0.03 : 0.04;
gps.scale.set(scaleFactor, scaleFactor, scaleFactor);
gps.position.set(gpsOffset[0], gpsOffset[1] + 0.5, gpsOffset[2]);
gps.traverse(child => {
if (child.material) child.material.metalness = 0;
});
gps.rotation.y = 3 * Math.PI / 2;
model.add(gps);
magModels[i]=gps;
this.resize3D();
});
});

//Load the FC model
loader.load('./resources/models/fc.gltf', (obj) => {
Expand Down

0 comments on commit c804e63

Please sign in to comment.