beep boop beep boop
This commit is contained in:
parent
f035b10f67
commit
e47338485d
|
@ -210,6 +210,8 @@ else {
|
||||||
|
|
||||||
//VARS
|
//VARS
|
||||||
//**********
|
//**********
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
const selected = Number(params.get("v"));
|
||||||
var fpsOut = document.getElementById('boldStuff');
|
var fpsOut = document.getElementById('boldStuff');
|
||||||
var transOutput = document.getElementById('myTrans'),
|
var transOutput = document.getElementById('myTrans'),
|
||||||
rotOutput = document.getElementById('myRot'),
|
rotOutput = document.getElementById('myRot'),
|
||||||
|
@ -1223,7 +1225,7 @@ function drawAnalysisResults(emotionList, genderList, ageList, faces)
|
||||||
//displays gender, age and emotion data
|
//displays gender, age and emotion data
|
||||||
canCon.translate(mWidth, 0);
|
canCon.translate(mWidth, 0);
|
||||||
canCon.scale(-1, 1);
|
canCon.scale(-1, 1);
|
||||||
drawGenderAgeEmotions(emotionList[i], genderList[i], ageList[i], i, activeMode);
|
drawGenderAgeEmotions(emotionList[i], genderList[i], ageList[i], i, activeMode,selected);
|
||||||
canCon.translate(mWidth, 0);
|
canCon.translate(mWidth, 0);
|
||||||
canCon.scale(-1, 1);
|
canCon.scale(-1, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1044,8 +1044,9 @@ function beep(duration, frequency, volume, type, callback) {
|
||||||
* @param {int} age - estimated age
|
* @param {int} age - estimated age
|
||||||
* @param {int} index - used by detector for multiple faces
|
* @param {int} index - used by detector for multiple faces
|
||||||
* @param {int} mode - used to determine the operating mode
|
* @param {int} mode - used to determine the operating mode
|
||||||
|
* @param {int} selected - which emotion is selected to go beep boop
|
||||||
*/
|
*/
|
||||||
function drawGenderAgeEmotions(emotion_values,gender,age,index,mode)
|
function drawGenderAgeEmotions(emotion_values,gender,age,index,mode,selected)
|
||||||
{
|
{
|
||||||
if (mode === MODE_TRACK)
|
if (mode === MODE_TRACK)
|
||||||
{
|
{
|
||||||
|
@ -1167,8 +1168,11 @@ function drawGenderAgeEmotions(emotion_values,gender,age,index,mode)
|
||||||
{
|
{
|
||||||
for(var j = 0; j < numberOfEmotions; ++j)
|
for(var j = 0; j < numberOfEmotions; ++j)
|
||||||
{
|
{
|
||||||
|
if (j === selected) {
|
||||||
console.log(emotion_values[j]);
|
console.log(emotion_values[j]);
|
||||||
beep(100, 500 + 500 * emotion_values[j], 1, "sine", () => {});
|
beep(300, 500 + 500 * emotion_values[j], 1, "sine", () => {
|
||||||
|
});
|
||||||
|
}
|
||||||
var length = emotion_values[j] * (backgroundWidth-emotionsBarOffset-xOffset*3);
|
var length = emotion_values[j] * (backgroundWidth-emotionsBarOffset-xOffset*3);
|
||||||
canCon.beginPath();
|
canCon.beginPath();
|
||||||
canCon.fillStyle="black";
|
canCon.fillStyle="black";
|
||||||
|
|
Loading…
Reference in New Issue