nettoyage interaction

This commit is contained in:
mpelissi 2023-03-22 11:24:26 +01:00
parent a4d6a7fd6b
commit ab033c30f7
9 changed files with 27 additions and 24 deletions

View File

@ -84,9 +84,9 @@ function init_variable(premier_appel){
// Enchainement des pages // Enchainement des pages
if (premier_appel){ if (premier_appel){
page_avertissement = false page_avertissement = true
page_contexte = false page_contexte = false
page_inscription = true page_inscription = false
page_explication = false page_explication = false
page_warning = false page_warning = false
page_explication_bis = false page_explication_bis = false
@ -481,7 +481,7 @@ function animate() {
document.removeEventListener("keydown", action_clavier_vues) document.removeEventListener("keydown", action_clavier_vues)
// inti clavier // inti clavier
if(premier_tour_page_explication_analyse){ if(premier_tour_page_explication_analyse){
interactions.push({"time": new Date().getTime(), "type": "Début explication analyse"}) //interactions.push({"time": new Date().getTime(), "type": "Début explication analyse"})
init_clavier_explication_analyse() init_clavier_explication_analyse()
init_textes_explication_analyses() init_textes_explication_analyses()
premier_tour_page_explication_analyse = false} premier_tour_page_explication_analyse = false}
@ -498,7 +498,7 @@ function animate() {
document.removeEventListener("keydown", action_clavier_explication_analyse) document.removeEventListener("keydown", action_clavier_explication_analyse)
// inti clavier // inti clavier
if(premier_tour_page_analyse){ if(premier_tour_page_analyse){
interactions.push({"time": new Date().getTime(), "type": "but analyse n°1"}) interactions.push({"time": new Date().getTime(), "type": "debut analyse n°1"})
init_clavier_analyse() init_clavier_analyse()
init_variable_analyse() init_variable_analyse()
premier_tour_page_analyse = false} premier_tour_page_analyse = false}
@ -535,6 +535,7 @@ function animate() {
message_fin = "> It's done. You can close the web page." message_fin = "> It's done. You can close the web page."
envoie_termine = true envoie_termine = true
update_texte_fin(message_fin) update_texte_fin(message_fin)
interactions.push({"time": new Date().getTime(), "type": "fin etude"})
return; return;
} }
} }

View File

@ -101,7 +101,7 @@ function condition_valider(){
} }
function action_bouton_valider_analyse(){ function action_bouton_valider_analyse(){
interactions.push({"time": new Date().getTime(), "type": "Bouton valider analyse."}) interactions.push({"time": new Date().getTime(), "type": "bouton valider analyse"})
// si au moins un mot est coché et qu'il reste des analyse à faire // si au moins un mot est coché et qu'il reste des analyse à faire
if (condition_valider()){ if (condition_valider()){
// sauvegarde des checkbox clikée et les mesh // sauvegarde des checkbox clikée et les mesh
@ -116,7 +116,7 @@ function action_bouton_valider_analyse(){
// indice mesh da l'analyse suivante // indice mesh da l'analyse suivante
idx_tache = idx_tache + 1 idx_tache = idx_tache + 1
if (num_analyse<nb_analyse_demande){ if (num_analyse<nb_analyse_demande){
interactions.push({"time": new Date().getTime(), "type": "but analyse n°"+(num_analyse+1)})} interactions.push({"time": new Date().getTime(), "type": "debut analyse n°"+(num_analyse+1)})}
} }
} }
@ -201,7 +201,7 @@ function traitement_fin(){
} }
else{ else{
page_analyse = false page_analyse = false
interactions.push({"time": new Date().getTime(), "type": "Fin analyse"}) interactions.push({"time": new Date().getTime(), "type": "fin analyse"})
} }
} }

View File

@ -20,7 +20,7 @@ function action_bouton_commencer_avertissement(){
page_avertissement = false page_avertissement = false
page_contexte = true page_contexte = true
//page_vues = true //page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Fin avertissement"}) interactions.push({"time": new Date().getTime(), "type": "fin avertissement - debut contexte"})
} }
function afficher_bouton_commencer_avertissement(){ function afficher_bouton_commencer_avertissement(){

View File

@ -255,7 +255,7 @@ function action_fleche_haut(){
interactions.push({"time": new Date().getTime(), "type": "fleche haut"}) interactions.push({"time": new Date().getTime(), "type": "fleche haut"})
if (idx_j == 0){ if (idx_j == 0){
texte_temporaire = {"text": "You can't go any further, GO BACK DOWN.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "You can't go any further, GO BACK DOWN.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error à cause de fleche haut"}) interactions.push({"time": new Date().getTime(), "type": "Affichage error a cause de fleche haut"})
} }
idx_j = Math.max(idx_j-1,0) idx_j = Math.max(idx_j-1,0)
} }
@ -263,7 +263,7 @@ function action_fleche_bas(){
interactions.push({"time": new Date().getTime(), "type": "fleche bas"}) interactions.push({"time": new Date().getTime(), "type": "fleche bas"})
if (idx_j == 4){ if (idx_j == 4){
texte_temporaire = {"text": "You can't go any further, GO UP.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "You can't go any further, GO UP.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error à cause de fleche bas"}) interactions.push({"time": new Date().getTime(), "type": "Affichage error a cause de fleche bas"})
} }
idx_j = Math.min(idx_j+1,4) idx_j = Math.min(idx_j+1,4)
} }
@ -347,13 +347,13 @@ function action_bouton_pose(){
if (deja_choisie && !(nb_choix_fait == nb_choix_demande)){ if (deja_choisie && !(nb_choix_fait == nb_choix_demande)){
//console.log("Cette pose a déjà été sélectionnée.") //console.log("Cette pose a déjà été sélectionnée.")
texte_temporaire = {"text": "This viewpoint has already been selected.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "This viewpoint has already been selected.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error pose déjà sélectionnée"})} interactions.push({"time": new Date().getTime(), "type": "Affichage error pose deja sélectionnee"})}
// plus de choix possible // plus de choix possible
if (nb_choix_fait == nb_choix_demande) { if (nb_choix_fait == nb_choix_demande) {
//console.log("Tu as déjà fait tes "+nb_choix_demande+" choix.") //console.log("Tu as déjà fait tes "+nb_choix_demande+" choix.")
texte_temporaire = {"text": "You have already selected your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "You have already selected your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error "+nb_choix_demande+" déjà fait"})} interactions.push({"time": new Date().getTime(), "type": "Affichage error "+nb_choix_demande+" deja fait"})}
// si on a pas encore choisie toutes nos poses, on peut en ajouter // si on a pas encore choisie toutes nos poses, on peut en ajouter
if (nb_choix_fait < nb_choix_demande && !(deja_choisie)){ if (nb_choix_fait < nb_choix_demande && !(deja_choisie)){
@ -380,7 +380,7 @@ function action_bouton_retirer(){
else { else {
//console.log("Il n'y a pas de pose à retirer.") //console.log("Il n'y a pas de pose à retirer.")
texte_temporaire = {"text": "There are no selected viewpoints to remove.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "There are no selected viewpoints to remove.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error pas de pose à retirer"}) interactions.push({"time": new Date().getTime(), "type": "Affichage error pas de pose a retirer"})
} }
} }
@ -413,7 +413,7 @@ function action_bouton_valider(){
//page_analyse = true //page_analyse = true
page_explication_analyse = true page_explication_analyse = true
page_vues = false page_vues = false
interactions.push({"time": new Date().getTime(), "type": "fin des choix."}) interactions.push({"time": new Date().getTime(), "type": "fin choix vues - debut explication analyse"})
} }
// Si le nombre de vue demandé a été fait et que ce n'est pas le dernier mesh à voir // Si le nombre de vue demandé a été fait et que ce n'est pas le dernier mesh à voir
@ -441,7 +441,7 @@ function action_bouton_valider(){
else if (nb_choix_fait < nb_choix_demande){ else if (nb_choix_fait < nb_choix_demande){
//console.log("Tu n'as pas fait tes 3 choix") //console.log("Tu n'as pas fait tes 3 choix")
texte_temporaire = {"text": "You did not select your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop} texte_temporaire = {"text": "You did not select your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
interactions.push({"time": new Date().getTime(), "type": "Affichage error à cause du bouton valider"}) interactions.push({"time": new Date().getTime(), "type": "Affichage error a cause du bouton valider"})
} }
// Error : un pbl à identifier // Error : un pbl à identifier
else{ else{

View File

@ -21,7 +21,7 @@ function action_bouton_commencer_contexte(){
page_contexte = false page_contexte = false
page_inscription = true page_inscription = true
//page_vues = true //page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Fin contexte"}) interactions.push({"time": new Date().getTime(), "type": "fin contexte - debut inscription"})
} }
function afficher_bouton_commencer_contexte(){ function afficher_bouton_commencer_contexte(){
@ -179,6 +179,7 @@ function action_revenir_page_avant_contexte(){
num_avertissement = avertissements_a_afficher.length-1 num_avertissement = avertissements_a_afficher.length-1
init_clavier_avertissement() init_clavier_avertissement()
document.removeEventListener("keydown", action_clavier_contexte) document.removeEventListener("keydown", action_clavier_contexte)
interactions.push({"time": new Date().getTime(), "type": "retour avertissement"})
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -19,7 +19,7 @@ function action_bouton_commencer_explication_analyse(){
page_explication_analyse = false page_explication_analyse = false
page_analyse = true page_analyse = true
//page_vues = true //page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Fin explication analyse"}) interactions.push({"time": new Date().getTime(), "type": "fin explication analyse - debut analyse"})
} }
function afficher_bouton_commencer_explication_analyse(){ function afficher_bouton_commencer_explication_analyse(){

View File

@ -485,7 +485,7 @@ function action_fin_explication(){
page_explication = false page_explication = false
//page_explication_bis = true //page_explication_bis = true
page_warning = true page_warning = true
interactions.push({"time": new Date().getTime(), "type": "Fin explication"}) interactions.push({"time": new Date().getTime(), "type": "fin tutorial - debut warning"})
} }
function action_previous_explication(){ function action_previous_explication(){
@ -624,7 +624,7 @@ function afficher_bouton_commencer_explication(){
function action_bouton_commencer_explication(){ function action_bouton_commencer_explication(){
page_explication_bis = false page_explication_bis = false
page_vues = true page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Début étude"}) interactions.push({"time": new Date().getTime(), "type": "debut choix vues"})
} }

View File

@ -53,7 +53,7 @@ function action_bouton_commencer_inscription(){
page_inscription = false page_inscription = false
//page_vues = true //page_vues = true
page_explication = true page_explication = true
interactions.push({"time": new Date().getTime(), "type": "Début explications"}) interactions.push({"time": new Date().getTime(), "type": "debut tutorial"})
//gestion des données personnelle de l'utilisateur //gestion des données personnelle de l'utilisateur
//gestion_donnees_personnelles() //gestion_donnees_personnelles()
@ -79,9 +79,10 @@ function afficher_bouton_skip_inscription(){
function action_bouton_skip_inscription(){ function action_bouton_skip_inscription(){
page_inscription = false page_inscription = false
page_vues = true page_explication_bis = true
//page_vues = true
skiped = true skiped = true
interactions.push({"time": new Date().getTime(), "type": "Skip tutorial -- Debut choix vues"}) interactions.push({"time": new Date().getTime(), "type": "skip tutorial - bouton commencer choix vues"})
//gestion des données personnelle de l'utilisateur //gestion des données personnelle de l'utilisateur
//gestion_donnees_personnelles() //gestion_donnees_personnelles()
@ -108,7 +109,7 @@ function action_bouton_suivant_inscription(){
inscription_finie = true inscription_finie = true
gestion_donnees_personnelles() gestion_donnees_personnelles()
ctx.clearRect(0, 0, canvas.width, canvas.height) ctx.clearRect(0, 0, canvas.width, canvas.height)
interactions.push({"time": new Date().getTime(), "type": "Fin inscription"}) interactions.push({"time": new Date().getTime(), "type": "fin inscription - choix tutorial"})
} }

View File

@ -28,7 +28,7 @@ function action_bouton_commencer_warning(){
page_warning = false page_warning = false
page_explication_bis = true page_explication_bis = true
//page_vues = true //page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Fin warning"}) interactions.push({"time": new Date().getTime(), "type": "fin warning - bouton commencer choix vues"})
} }
function afficher_bouton_commencer_warning(){ function afficher_bouton_commencer_warning(){