1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 00:35:20 +03:00

fixed indentation

This commit is contained in:
Roman Lut 2024-05-03 00:28:56 +02:00
parent d31e281d44
commit c804e6390c

View file

@ -690,9 +690,9 @@ TABS.magnetometer.initialize3D = function () {
const loader = new THREE.GLTFLoader(manager); 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', 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', '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']; 'mag3110', 'matek_m9n', 'matek_m10q', 'mlx90393', 'mp9250', 'qmc5883', 'flywoo_goku_m10_pro_v3', 'ws_m181'];
magModels = []; magModels = [];
//Load the UAV model //Load the UAV model
loader.load('./resources/models/' + model_file + '.gltf', (obj) => { loader.load('./resources/models/' + model_file + '.gltf', (obj) => {
@ -703,23 +703,22 @@ TABS.magnetometer.initialize3D = function () {
const gpsOffset = getDistanceByModelName(model_file); const gpsOffset = getDistanceByModelName(model_file);
magModelNames.forEach( (name, i) => magModelNames.forEach( (name, i) =>
{ {
//Load the GPS model loader.load('./resources/models/' + name + '.gltf', (obj) => {
loader.load('./resources/models/' + name + '.gltf', (obj) => { const gps = obj.scene;
const gps = obj.scene; const scaleFactor = i==0 ? 0.03 : 0.04;
const scaleFactor = i==0 ? 0.03 : 0.04; gps.scale.set(scaleFactor, scaleFactor, scaleFactor);
gps.scale.set(scaleFactor, scaleFactor, scaleFactor); gps.position.set(gpsOffset[0], gpsOffset[1] + 0.5, gpsOffset[2]);
gps.position.set(gpsOffset[0], gpsOffset[1] + 0.5, gpsOffset[2]); gps.traverse(child => {
gps.traverse(child => { if (child.material) child.material.metalness = 0;
if (child.material) child.material.metalness = 0; });
}); gps.rotation.y = 3 * Math.PI / 2;
gps.rotation.y = 3 * Math.PI / 2; model.add(gps);
model.add(gps); magModels[i]=gps;
magModels[i]=gps; this.resize3D();
this.resize3D(); });
}); });
});
//Load the FC model //Load the FC model
loader.load('./resources/models/fc.gltf', (obj) => { loader.load('./resources/models/fc.gltf', (obj) => {