remote-calibrator 0.2.1 → 0.2.2-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +5 -1
  3. package/homepage/example.js +13 -12
  4. package/lib/RemoteCalibrator.min.js +1 -1
  5. package/lib/RemoteCalibrator.min.js.LICENSE.txt +8 -1
  6. package/lib/RemoteCalibrator.min.js.map +1 -1
  7. package/package.json +10 -9
  8. package/src/WebGazer4RC/.gitattributes +10 -0
  9. package/src/WebGazer4RC/LICENSE.md +15 -0
  10. package/src/WebGazer4RC/README.md +142 -0
  11. package/src/WebGazer4RC/gnu-lgpl-v3.0.md +163 -0
  12. package/src/WebGazer4RC/gplv3.md +636 -0
  13. package/src/WebGazer4RC/package-lock.json +1133 -0
  14. package/src/WebGazer4RC/package.json +28 -0
  15. package/src/WebGazer4RC/src/dom_util.mjs +27 -0
  16. package/src/WebGazer4RC/src/facemesh.mjs +150 -0
  17. package/src/WebGazer4RC/src/index.mjs +1213 -0
  18. package/src/WebGazer4RC/src/mat.mjs +301 -0
  19. package/src/WebGazer4RC/src/params.mjs +29 -0
  20. package/src/WebGazer4RC/src/pupil.mjs +109 -0
  21. package/src/WebGazer4RC/src/ridgeReg.mjs +104 -0
  22. package/src/WebGazer4RC/src/ridgeRegThreaded.mjs +161 -0
  23. package/src/WebGazer4RC/src/ridgeWeightedReg.mjs +125 -0
  24. package/src/WebGazer4RC/src/ridgeWorker.mjs +135 -0
  25. package/src/WebGazer4RC/src/util.mjs +348 -0
  26. package/src/WebGazer4RC/src/util_regression.mjs +240 -0
  27. package/src/WebGazer4RC/src/worker_scripts/mat.js +306 -0
  28. package/src/WebGazer4RC/src/worker_scripts/util.js +398 -0
  29. package/src/WebGazer4RC/test/regression_test.js +182 -0
  30. package/src/WebGazer4RC/test/run_tests_and_server.sh +24 -0
  31. package/src/WebGazer4RC/test/util_test.js +60 -0
  32. package/src/WebGazer4RC/test/webgazerExtract_test.js +40 -0
  33. package/src/WebGazer4RC/test/webgazer_test.js +160 -0
  34. package/src/WebGazer4RC/test/www_page_test.js +41 -0
  35. package/src/components/onCanvas.js +1 -2
  36. package/src/components/sound.js +12 -0
  37. package/src/const.js +8 -0
  38. package/src/core.js +36 -0
  39. package/src/css/distance.scss +1 -0
  40. package/src/css/main.css +11 -0
  41. package/src/css/panel.scss +1 -0
  42. package/src/distance/distance.js +8 -1
  43. package/src/distance/distanceTrack.js +2 -2
  44. package/src/index.js +2 -0
  45. package/src/panel/panel.js +53 -21
  46. package/src/screenSize.js +2 -1
  47. package/src/text.json +5 -3
package/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - Sound feedback (2000 Hz, 0.05 s) for responses in blind spot test.
13
+ - `showNextButton` option for panel. If set to `false` (default), automatically proceed to the final callback after finishing the last task.
14
+ - `nextHeadline` and `nextDescription` in panel options to change panel text after finishing all calibrations.
15
+ - Blind spot floating instructions move along with the crosshair.
16
+ - Add credit text for blind spot test and credit card trick on the corresponding pages.
17
+
18
+ ### Changed
19
+
20
+ - Changed "cross" to "crosshair" in default task descriptions.
21
+ - SLightly thinner crosshair line width.
22
+ - When not tracking near point, `nearPointCm` is stored as `[null, null]` instead of `null`.
23
+
24
+ ### Fixed
25
+
26
+ - Floating instructions don't show in blind spot test for head tracking, when near point is turned off.
27
+ - Dependency security issues.
28
+
10
29
  ## [0.2.1] - 2021-09-14
11
30
 
12
31
  Minor fixes and updates.
package/README.md CHANGED
@@ -145,8 +145,12 @@ You can customize the panel element with the following options.
145
145
  ```js
146
146
  /* [options] Default value */
147
147
  {
148
- headline: `To calibrate, press a button!`,
148
+ headline: `Please press a button, to calibrate.`,
149
149
  description: ``,
150
+ color: '#3490de', // Main color of the panel
151
+ showNextButton: false, // If set to false, will execute the callback right after the last calibration task
152
+ nextHeadline: `Thanks for calibrating. Hit the button to continue.`,
153
+ nextDescription: ``,
150
154
  nextButton: `Done`,
151
155
  }
152
156
  ```
@@ -111,8 +111,9 @@ function makePanel(e) {
111
111
  },
112
112
  ],
113
113
  '#experiment',
114
- {
115
- _demoActivateAll: true,
114
+ {},
115
+ () => {
116
+ printMessage('Panel finished!')
116
117
  }
117
118
  )
118
119
  changeClass(e.target, 'complete')
@@ -126,9 +127,9 @@ function makePanel(e) {
126
127
  function measureDisplaySize(e) {
127
128
  RemoteCalibrator.displaySize(displayData => {
128
129
  printMessage(
129
- `Display size is ${displayData.value.displayWidthPx}px in width and ${
130
+ `Display size is ${displayData.value.displayWidthPx} px in width and ${
130
131
  displayData.value.displayHeightPx
131
- }px in height, measured at ${parseTimestamp(displayData.timestamp)}.`
132
+ } px in height, measured at ${parseTimestamp(displayData.timestamp)}.`
132
133
  )
133
134
 
134
135
  changeClass(e.target, 'complete')
@@ -143,9 +144,9 @@ function measureDisplaySize(e) {
143
144
  function measureScreenSize(e) {
144
145
  RemoteCalibrator.screenSize({}, screenData => {
145
146
  printMessage(
146
- `Screen size is ${screenData.value.screenDiagonalIn}in [Width: ${
147
+ `Screen size is ${screenData.value.screenDiagonalIn} in [Width: ${
147
148
  screenData.value.screenWidthCm
148
- }cm, Height: ${screenData.value.screenHeightCm}cm, PPI: ${
149
+ } cm, Height: ${screenData.value.screenHeightCm} cm, PPI: ${
149
150
  screenData.value.screenPpi
150
151
  }, PPI (Physical): ${
151
152
  screenData.value.screenPhysicalPpi
@@ -160,7 +161,7 @@ const measureDistanceCallback = distanceData => {
160
161
  printMessage(
161
162
  `The viewing distance is ${
162
163
  distanceData.value
163
- }cm, measured at ${parseTimestamp(distanceData.timestamp)}, by ${
164
+ } cm, measured at ${parseTimestamp(distanceData.timestamp)}, by ${
164
165
  distanceData.method
165
166
  } method.`
166
167
  )
@@ -201,11 +202,11 @@ function trackViewingDistance(e) {
201
202
  trackP.innerHTML = gotData(
202
203
  `The dynamic viewing distance is ${
203
204
  data.value.viewingDistanceCm
204
- }cm at ${parseTimestamp(data.timestamp)}, measured by ${
205
+ } cm at ${parseTimestamp(data.timestamp)}, measured by ${
205
206
  data.method
206
- } method. The near point is at [${data.value.nearPointCm.x}cm, ${
207
+ } method. The near point is at [${data.value.nearPointCm.x} cm, ${
207
208
  data.value.nearPointCm.y
208
- }cm] compared to the center of the screen.`
209
+ } cm] compared to the center of the screen.`
209
210
  )
210
211
  }
211
212
  )
@@ -300,9 +301,9 @@ function trackGaze(e) {
300
301
  },
301
302
  data => {
302
303
  gazeP.innerHTML = gotData(
303
- `The gaze position is [${data.value.x}px, ${
304
+ `The gaze position is [${data.value.x} px, ${
304
305
  data.value.y
305
- }px] at ${parseTimestamp(data.timestamp)}.`
306
+ } px] at ${parseTimestamp(data.timestamp)}.`
306
307
  )
307
308
  }
308
309
  )