jolie recap

This commit is contained in:
mpelissi 2023-03-06 14:25:36 +01:00
parent 637a22ed37
commit a46a2078b5
5 changed files with 221 additions and 12 deletions

View File

@ -0,0 +1,209 @@
{
"identite": {
"Firstname": "marie",
"Name": "pelissier",
"Age": "1",
"Sexe": "M"
},
"tache_N1": {
"obj_file": "dragon_update_user_study.obj",
"mesh": "dragon",
"position_init_idx_i": 3,
"position_init_idx_j": 0,
"theta_init": 1.5707963267948966,
"delta_init": 2.356194490192345,
"choix_poses": [
[
"choix1",
1.5707963267948966,
2.356194490192345,
3,
0
],
[
"choix2",
1.5707963267948966,
1.5707963267948966,
2,
0
],
[
"choix3",
1.5707963267948966,
0.7853981633974483,
1,
0
]
]
},
"tache_N2": {
"obj_file": "camel_update_user_study_normed.obj",
"mesh": "camel",
"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
]
]
},
"Analyse": {
"analyse_N1": {
"mesh": "dragon",
"idx": [
0,
1
],
"mots": [
"1. De face",
"2. De profil"
]
}
},
"Interactions": [
{
"time": 1678106179856,
"type": "start"
},
{
"time": 1678106180577,
"type": "bouton commencer de contexte"
},
{
"time": 1678106185613,
"type": "bouton commencer d'inscriptiontiti"
},
{
"time": 1678106185648,
"type": "Affichage Mesh random : dragon en idx_i, idx_j : (3, 0)"
},
{
"time": 1678106185648,
"type": "Affichage Mesh random : dragon en theta, delta : (1.5707963267948966, 2.356194490192345)"
},
{
"time": 1678106188373,
"type": "bouton pose n°1"
},
{
"time": 1678106188981,
"type": "fleche droite"
},
{
"time": 1678106189060,
"type": "bouton pose n°2"
},
{
"time": 1678106189157,
"type": "fleche droite"
},
{
"time": 1678106189221,
"type": "bouton pose n°3"
},
{
"time": 1678106191269,
"type": "bouton valider"
},
{
"time": 1678106191289,
"type": "Affichage Mesh random : camel en idx_i, idx_j : (7, 1)"
},
{
"time": 1678106191289,
"type": "Affichage Mesh random : camel en theta, delta : (0.7853981633974483, 5.497787143782138)"
},
{
"time": 1678106191924,
"type": "bouton pose n°1"
},
{
"time": 1678106191989,
"type": "fleche droite"
},
{
"time": 1678106192084,
"type": "bouton pose n°2"
},
{
"time": 1678106192148,
"type": "fleche droite"
},
{
"time": 1678106192212,
"type": "bouton pose n°3"
},
{
"time": 1678106193092,
"type": "bouton valider"
},
{
"time": 1678106193092,
"type": "fin des choix."
},
{
"time": 1678106193102,
"type": "Début analyse n°1"
},
{
"time": 1678106200036,
"type": "ajout check sur : analyse n°1, mot 1. De face"
},
{
"time": 1678106200372,
"type": "ajout check sur : analyse n°1, mot 2. De profil"
},
{
"time": 1678106200789,
"type": "ajout check sur : analyse n°1, mot 3. Debout"
},
{
"time": 1678106201140,
"type": "retrait check sur : analyse n°1, mot 3. Debout"
},
{
"time": 1678106201492,
"type": "retrait check sur : analyse n°1, mot 2. De profil"
},
{
"time": 1678106201780,
"type": "retrait check sur : analyse n°1, mot 1. De face"
},
{
"time": 1678106202180,
"type": "ajout check sur : analyse n°1, mot 1. De face"
},
{
"time": 1678106202452,
"type": "ajout check sur : analyse n°1, mot 2. De profil"
},
{
"time": 1678106203061,
"type": "Bouton valider analyse."
},
{
"time": 1678106203077,
"type": "Fin analyse"
}
]
}

View File

@ -47,7 +47,7 @@ function affichage_analyse(idx_tache){
canvasMins = all_canvasMins['tache_N'+idx_tache][1]
for (let i=0; i<canvasMins.length; i++){
affichage_legende(i)
ctx.drawImage(canvasMins[i], dx + (ecart_analyse+ W_3D/2.5)*i, 250, W_3D/2.5, H_3D/2.5)
ctx.drawImage(canvasMins[i], dx + (ecart_analyse+ W_3D/2.5)*i, 250, H_3D/2, H_3D/2)
draw_contour(dx + (ecart_analyse+ W_3D/2.5)*i, 250, W_3D/2.5, H_3D/2.5, "rgb(255,0,0)")
}
}

View File

@ -100,8 +100,8 @@ function afficher_recap(){
for (let i = 0 ; i < canvasMins.length; i++) {
// Draw les images des contextes
y_image = 100+(20+ H_3D/3.5)*i
ctx.drawImage(canvasMins[i],W_3D+ w_recap/2.5 +10, y_image, W_3D/3.5, H_3D/3.5)
//draw_contour(W_3D+ w_recap/2.5, 100+(20+ H_3D/3.5)*i, W_3D/3.5, H_3D/3.5, "rgb(255,0,0)")
ctx.drawImage(canvasMins[i],W_3D+ w_recap/2.5, y_image, H_3D/3.5, H_3D/3.5)
draw_contour(W_3D+ w_recap/2.5, 100+(20+ H_3D/3.5)*i, H_3D/3.5, H_3D/3.5, "rgb(255,0,0)")
//Fleche pour Switch haut
if (nb_choix_fait > 1 && i > 0 && i < nb_choix_fait) {
y_fleche_h = (H_3D/3.5)*0.4 + y_image
@ -357,7 +357,7 @@ function action_bouton_pose(){
if (nb_choix_fait < nb_choix_demande && !(deja_choisie)){
liste_poses.push(['choix'+(nb_choix_fait+1), theta, delta, idx_i, idx_j])
// affichage de la vue sélectionnée dans le recap
ctxMins[nb_choix_fait].drawImage(canvasRenderer, 0.5*canvasRenderer.width-0.5*canvasRenderer.height, 0, canvasRenderer.height, canvasRenderer.height, 0, 0, canvasRenderer.height*0.3, canvasRenderer.height*0.25)
ctxMins[nb_choix_fait].drawImage(canvasRenderer, 0.5*canvasRenderer.width-0.5*canvasRenderer.height, 0, canvasRenderer.height, canvasRenderer.height, 0, 0, canvasMins[0].width, canvasMins[0].height)//canvasRenderer.height*0.3, canvasRenderer.height*0.25)
nb_choix_fait = nb_choix_fait+1
}
}

View File

@ -18,7 +18,7 @@ function affichage_texte_contexte(){
function action_bouton_commencer_contexte(){
page_contexte = false
page_inscription = true
interactions.push({"time": new Date().getTime(), "type": "bouton commencer de contexte"+s})
interactions.push({"time": new Date().getTime(), "type": "bouton commencer de contexte"})
}
function traitement_contexte(){

View File

@ -192,8 +192,8 @@ function setUp_3D(idx_mesh){
ctxMins = []
for (let i = 0; i < nb_choix_demande; i++) {
let c = document.createElement("canvas")
c.width = 200
c.heigth = 200
c.setAttribute("width", 400);
c.setAttribute("height", 400);
let ctx_c = c.getContext("2d")
canvasMins.push(c)
ctxMins.push(ctx_c)
@ -381,7 +381,7 @@ function animate() {
time_animate = new Date().getTime()
if (page_contexte){
console.log("boucle contexte")
//console.log("boucle contexte")
//init touche clavier
if (premier_tour_page_contexte){
init_clavier_contexte()
@ -392,7 +392,7 @@ function animate() {
// page inscription
if (page_inscription){
console.log("boucle inscription")
//console.log("boucle inscription")
// on enlève les touches du clavier associé à la page inscription
document.removeEventListener("keydown", action_clavier_contexte)
//init touche clavier
@ -405,7 +405,7 @@ function animate() {
// page de choix
if (page_vues && num_tache <= nb_mesh){
console.log("boucle choix")
//console.log("boucle choix")
// on enlève les touches du clavier associé à la page inscription
document.removeEventListener("keydown", action_clavier_inscription)
//init touche clavier
@ -455,7 +455,7 @@ function animate() {
}
// page analyse
if (page_analyse){
console.log("boucle analyse")
//console.log("boucle analyse")
// on enlève les touches du clavier associé à la page vues
document.removeEventListener("keydown", action_clavier_vues)
// inti clavier
@ -468,7 +468,7 @@ function animate() {
}
// page fin
if (!page_contexte && !page_inscription && !page_vues && !page_analyse){
console.log("boucle fin")
//console.log("boucle fin")
// on enlève les touches du clavier associé à la page vues
document.removeEventListener("keydown", action_clavier_analyse)
// clear la fenetre