-
Notifications
You must be signed in to change notification settings - Fork 6
/
testing_2d.R
74 lines (59 loc) · 2.04 KB
/
testing_2d.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
library(r2vr)
IPv4_ADDRESS <- find_IP() # Note: If not on Windows, enter IP directly
## TODO: SET full name here
# set_user("Firstname-Lastname") # default to be overridden
set_user("Jon-Peppinck")
## OPTIONAL: '?set_marker_and_props' shows configuration options
# i.e. Number of markers and size of markers, but keep "2d"
# set_marker_and_props("2d")
set_marker_and_props("2d", 10, "large")
## OPTIONAL: '?set_colors'
set_colors()
# set_colors(
# marker = "#0000FF",
# coral = "#FF00FF",
# not_coral = "#FFFF00",
# text = "#FFFFFF",
# plane = "#000000",
# check_correct = "#00FFFF",
# check_incorrect = "#FFDDAA",
# evaluation_selection = "#FF0000",
# cursor = "#00FF00"
# )
R2VR_CDN <- "https://cdn.jsdelivr.net/gh/ACEMS/r2vr@master"
R2VR_2D_IMAGES <- paste0(R2VR_CDN, "/inst/ext/images/2d_testing/")
# TODO: Select images (4000x3000px)
img_paths <- paste0(
R2VR_2D_IMAGES,
c("56017030401.jpeg",
"51017045001.jpeg",
"58036392301.jpeg")
)
img_paths_and_points <- list(
# 2D image paths 4000x3000
list(img = img_paths[1]),
list(img = img_paths[2]),
list(img = img_paths[3])
)
set_random_images(img_paths_and_points) # TODO: allow for img_paths w/o points (training)
## TODO: SET evaluation question and responses here
evaluation_questions <- list(
list(question = "Did you enjoy this experiment?", answerOne = "Very much", answerTwo = "Yes", answerThree = "A little", answerFour = "No"),
list(question = "On a scale of 1-4, how would you rate your experience?", answerOne = "1", answerTwo = "2", answerThree = "3", answerFour = "4")
)
## OPTIONAL: '?set_questions_and_responses'
set_questions_and_responses(evaluation_questions)
animals <- shared_setup_scene("2d", "testing") # DON'T CHANGE
# vignette("testing_2d", package = "r2vr")
## COMMANDS - 2D Testing ##
# rm(list=ls())
# start()
# randomize_markers()
# go_to()
# go_to()
# ask_question(1)
# ask_question(2)
# end()
# testing_2d.df <- read("https://r2vr.herokuapp.com/api/2d/testing")
# evaluation_2d.df <- read("https://r2vr.herokuapp.com/api/2d/evaluation")
# rm(list=ls())