From 8441595bef73598979ac81f21f75876f09d2b9c5 Mon Sep 17 00:00:00 2001 From: mpelissi Date: Fri, 3 Mar 2023 11:21:48 +0100 Subject: [PATCH] un seul fichier en sortie (tout dans la varibale choix) --- .gitignore | 2 +- .../8e068382-ebb4-4d44-91e5-dc9b7eefe3aa.json | 95 ++++++ .../caf4dd00-d24f-4b9a-bdfb-3960f12e96a3.json | 302 ++++++++++++++++++ static/interface3D.js | 31 +- 4 files changed, 414 insertions(+), 16 deletions(-) create mode 100644 outputs/8e068382-ebb4-4d44-91e5-dc9b7eefe3aa.json create mode 100644 outputs/caf4dd00-d24f-4b9a-bdfb-3960f12e96a3.json diff --git a/.gitignore b/.gitignore index b512c09..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -node_modules \ No newline at end of file +node_modules diff --git a/outputs/8e068382-ebb4-4d44-91e5-dc9b7eefe3aa.json b/outputs/8e068382-ebb4-4d44-91e5-dc9b7eefe3aa.json new file mode 100644 index 0000000..a884117 --- /dev/null +++ b/outputs/8e068382-ebb4-4d44-91e5-dc9b7eefe3aa.json @@ -0,0 +1,95 @@ +{ + "tache_N1": { + "obj_file": "dragon_update_user_study.obj", + "mesh": "dragon", + "position_init_idx_i": 7, + "position_init_idx_j": 1, + "theta_init": 0.7853981633974483, + "delta_init": 5.497787143782138, + "choix_poses": [ + [ + "choix1", + 0.7853981633974483, + 4.71238898038469, + 6, + 1 + ], + [ + "choix2", + 0.7853981633974483, + 3.9269908169872414, + 5, + 1 + ], + [ + "choix3", + 0.7853981633974483, + 3.141592653589793, + 4, + 1 + ] + ] + }, + "tache_N2": { + "obj_file": "camel_update_user_study_normed.obj", + "mesh": "camel", + "position_init_idx_i": 6, + "position_init_idx_j": 3, + "theta_init": -0.7853981633974483, + "delta_init": 4.71238898038469, + "choix_poses": [ + [ + "choix1", + -0.7853981633974483, + 4.71238898038469, + 6, + 3 + ], + [ + "choix2", + -0.7853981633974483, + 3.9269908169872414, + 5, + 3 + ], + [ + "choix3", + -0.7853981633974483, + 3.141592653589793, + 4, + 3 + ] + ] + }, + "tache_N3": { + "obj_file": "gorgoile_update_user_study_centered_normed.obj", + "mesh": "gorgoile", + "position_init_idx_i": 7, + "position_init_idx_j": 1, + "theta_init": 0.7853981633974483, + "delta_init": 5.497787143782138, + "choix_poses": [ + [ + "choix1", + 0.7853981633974483, + 5.497787143782138, + 7, + 1 + ], + [ + "choix2", + 0.7853981633974483, + 4.71238898038469, + 6, + 1 + ], + [ + "choix3", + 0.7853981633974483, + 3.9269908169872414, + 5, + 1 + ] + ] + } +} \ No newline at end of file diff --git a/outputs/caf4dd00-d24f-4b9a-bdfb-3960f12e96a3.json b/outputs/caf4dd00-d24f-4b9a-bdfb-3960f12e96a3.json new file mode 100644 index 0000000..4be3133 --- /dev/null +++ b/outputs/caf4dd00-d24f-4b9a-bdfb-3960f12e96a3.json @@ -0,0 +1,302 @@ +{ + "tache_N1": { + "obj_file": "dragon_update_user_study.obj", + "mesh": "dragon", + "position_init_idx_i": 6, + "position_init_idx_j": 4, + "theta_init": -1.5707963267948966, + "delta_init": 4.71238898038469, + "choix_poses": [ + [ + "choix1", + -1.5707963267948966, + 3.9269908169872414, + 5, + 4 + ], + [ + "choix3", + -1.5707963267948966, + 2.356194490192345, + 3, + 4 + ], + [ + "choix2", + -1.5707963267948966, + 3.141592653589793, + 4, + 4 + ] + ] + }, + "tache_N2": { + "obj_file": "camel_update_user_study_normed.obj", + "mesh": "camel", + "position_init_idx_i": 1, + "position_init_idx_j": 3, + "theta_init": -0.7853981633974483, + "delta_init": 0.7853981633974483, + "choix_poses": [ + [ + "choix1", + -0.7853981633974483, + 0.7853981633974483, + 1, + 3 + ], + [ + "choix2", + -0.7853981633974483, + 0, + 0, + 3 + ], + [ + "choix3", + -0.7853981633974483, + 5.497787143782138, + 7, + 3 + ] + ] + }, + "tache_N3": { + "obj_file": "gorgoile_update_user_study_centered_normed.obj", + "mesh": "gorgoile", + "position_init_idx_i": 2, + "position_init_idx_j": 1, + "theta_init": 0.7853981633974483, + "delta_init": 1.5707963267948966, + "choix_poses": [ + [ + "choix1", + 0.7853981633974483, + 1.5707963267948966, + 2, + 1 + ], + [ + "choix3", + 0.7853981633974483, + 0, + 0, + 1 + ], + [ + "choix3", + 0.7853981633974483, + 5.497787143782138, + 7, + 1 + ] + ] + }, + "Analyse": { + "analyse_N1": { + "mesh": "dragon", + "idx": [ + 0 + ], + "mots": [ + "1. De face" + ] + }, + "analyse_N2": { + "mesh": "camel", + "idx": [ + 1 + ], + "mots": [ + "2. De profil" + ] + }, + "analyse_N3": { + "mesh": "gorgoile", + "idx": [ + 2 + ], + "mots": [ + "3. Debout" + ] + } + }, + "Interactions": [ + { + "time": 1677838666856, + "type": "start" + }, + { + "time": 1677838666879, + "type": "Affichage Mesh random : dragon en idx_i, idx_j : (6, 4)" + }, + { + "time": 1677838666879, + "type": "Affichage Mesh random : dragon en theta, delta : (-1.5707963267948966, 4.71238898038469)" + }, + { + "time": 1677838667858, + "type": "bouton commencerclavier" + }, + { + "time": 1677838668905, + "type": "fleche droite" + }, + { + "time": 1677838669074, + "type": "bouton pose n°1" + }, + { + "time": 1677838669233, + "type": "fleche droite" + }, + { + "time": 1677838669350, + "type": "bouton pose n°2" + }, + { + "time": 1677838669826, + "type": "fleche droite" + }, + { + "time": 1677838670273, + "type": "bouton pose n°3" + }, + { + "time": 1677838679013, + "type": "fleche switch bas de la pose n°2" + }, + { + "time": 1677838680695, + "type": "bouton valider" + }, + { + "time": 1677838680718, + "type": "Affichage Mesh random : camel en idx_i, idx_j : (1, 3)" + }, + { + "time": 1677838680718, + "type": "Affichage Mesh random : camel en theta, delta : (-0.7853981633974483, 0.7853981633974483)" + }, + { + "time": 1677838681793, + "type": "bouton pose n°1" + }, + { + "time": 1677838681906, + "type": "fleche droite" + }, + { + "time": 1677838682049, + "type": "bouton pose n°2" + }, + { + "time": 1677838682153, + "type": "fleche droite" + }, + { + "time": 1677838682258, + "type": "bouton pose n°3" + }, + { + "time": 1677838682858, + "type": "bouton valider" + }, + { + "time": 1677838682883, + "type": "Affichage Mesh random : gorgoile en idx_i, idx_j : (2, 1)" + }, + { + "time": 1677838682883, + "type": "Affichage Mesh random : gorgoile en theta, delta : (0.7853981633974483, 1.5707963267948966)" + }, + { + "time": 1677838684417, + "type": "bouton pose n°1" + }, + { + "time": 1677838684594, + "type": "fleche droite" + }, + { + "time": 1677838684737, + "type": "bouton pose n°2" + }, + { + "time": 1677838685642, + "type": "fleche droite" + }, + { + "time": 1677838686474, + "type": "bouton pose n°3" + }, + { + "time": 1677838688278, + "type": "suppression de la pose n°2" + }, + { + "time": 1677838689177, + "type": "bouton pose n°3" + }, + { + "time": 1677838689177, + "type": "Affichage error pose déjà sélectionnée" + }, + { + "time": 1677838689289, + "type": "fleche droite" + }, + { + "time": 1677838689450, + "type": "bouton pose n°3" + }, + { + "time": 1677838716760, + "type": "bouton valider" + }, + { + "time": 1677838716760, + "type": "fin des choix." + }, + { + "time": 1677838716761, + "type": "Début analyse n°1" + }, + { + "time": 1677838718112, + "type": "ajout check sur : analyse n°1, mot 1. De face" + }, + { + "time": 1677838718641, + "type": "Bouton valider analyse." + }, + { + "time": 1677838718641, + "type": "Début analyse n°2" + }, + { + "time": 1677838719650, + "type": "ajout check sur : analyse n°2, mot 2. De profil" + }, + { + "time": 1677838720057, + "type": "Bouton valider analyse." + }, + { + "time": 1677838720057, + "type": "Début analyse n°3" + }, + { + "time": 1677838720729, + "type": "ajout check sur : analyse n°3, mot 3. Debout" + }, + { + "time": 1677838721384, + "type": "Bouton valider analyse." + }, + { + "time": 1677838721393, + "type": "Fin analyse" + } + ] +} \ No newline at end of file diff --git a/static/interface3D.js b/static/interface3D.js index de9e198..0314190 100644 --- a/static/interface3D.js +++ b/static/interface3D.js @@ -316,22 +316,21 @@ function init_data(){ ctx.fillStyle = "rgb(255, 255, 255)" // Data 2D imgs = {} - imgs["droite"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Fleches_jolie/fleche_droite.png')//new_image("graphics/fleche_droite.png") - imgs["gauche"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Fleches_jolie/fleche_gauche.png') //new_image("graphics/fleche_gauche.png") - imgs["bas"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Fleches_jolie/fleche_bas.png') //new_image("graphics/fleche_bas.png") - imgs["haut"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Fleches_jolie/fleche_haut.png') //new_image("graphics/fleche_haut.png") - imgs["croix"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Autres_jolie/croix.png') - //imgs["tmp"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Autres_jolie/tmp.jpg') - imgs["check"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Autres_jolie/check.png') - imgs["checkbox"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Autres_jolie/empty_checkbox.png') + imgs["droite"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Arrows/fleche_droite.png') + imgs["gauche"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Arrows/fleche_gauche.png') + imgs["bas"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Arrows/fleche_bas.png') + imgs["haut"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Arrows/fleche_haut.png') + imgs["croix"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Choices/croix.png') + imgs["check"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Choices/check.png') + imgs["checkbox"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Choices/empty_checkbox.png') // /// Boutons boutons = {} - boutons["reinitialiser"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_reinitialiser.png') - boutons["valider"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_valider.png') - boutons["choix_pose"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_pose.png') - boutons["retirer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_retirer.png') - boutons["commencer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_commencer.png') - boutons["raz"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Boutons_jolie/bouton_raz.png') + boutons["reinitialiser"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_reinitialiser.png') + boutons["valider"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_valider.png') + boutons["choix_pose"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_pose.png') + boutons["retirer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_retirer.png') + boutons["commencer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer.png') + boutons["raz"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_raz.png') // Mouse xyMouseMove = {"x": -1, "y": -1} @@ -428,7 +427,9 @@ function animate() { ctx.fillText("Done, thx you :)", (window.innerWidth/2)-450, innerHeight/2 -100) console.log('Fin interface3DD') - // ecriture + // ECRITURE DES RESULTATS + choix['Analyse'] = checkbox_clicked + choix['Interactions'] = interactions // Création de la requête HTTP à envoyer au serveur. let xhr = new XMLHttpRequest(); // Préparation de la requête pour l'envoi en POST vers l'url.