async function bindPage() {
  setupCanvas();

  // toggleLoadingUI(true);
  setStatusText('Loading the models...');
  // attach evenListner to our start button start_btn
  var p = document.getElementById("start_btn"); // Find the paragraph element in the page
  var p_reset = document.getElementById("replay_btn"); // Find the paragraph element in the page

  p.onclick = readSetGo;
  p_reset.onclick =startAgain;
    posenet = await posenet_module.load({
    architecture: defaultPoseNetArchitecture,
    outputStride: defaultStride,
    inputResolution: defaultInputResolution,
    multiplier: defaultMultiplier,
    quantBytes: defaultQuantBytes
  });
  setStatusText('Loading FaceMesh model...');
  facemesh = await facemesh_module.load();

  setStatusText('Loading Avatar file...');
  let t0 = new Date();
  await parseSVG(Object.values(avatarSvgs)[0]);
  setStatusText('Setting up camera...');
  try {
    video = await loadVideo();
  } catch (e) {
    let info = document.getElementById('info');
    info.textContent = 'this device type is not supported yet, ' +
      'or this browser does not support video capture: ' + e.toString();
    info.style.display = 'block';
    throw e;
  }
  
  // toggleLoadingUI(false);
  setupModel();
  // allSet().then(gameOn);
  detectPoseInRealTime(video, posenet);
}
/**
 * Kicks off the game by loading the posenet model, finding and loading
 * available camera devices, and setting off the detectPoseInRealTime function.
 */
Kicks off the game by loading the posenet model, finding and loading
available camera devices, and setting off the detectPoseInRealTime function.
Kicks off the game by loading the posenet model finding and loading available camera devices and setting off the detectPoseInRealTime function .
async function bindPage() {
  setupCanvas();
  setStatusText('Loading the models...');
  var p = document.getElementById("start_btn"); 
  var p_reset = document.getElementById("replay_btn"); 
  p.onclick = readSetGo;
  p_reset.onclick =startAgain;
    posenet = await posenet_module.load({
    architecture: defaultPoseNetArchitecture,
    outputStride: defaultStride,
    inputResolution: defaultInputResolution,
    multiplier: defaultMultiplier,
    quantBytes: defaultQuantBytes
  });
  setStatusText('Loading FaceMesh model...');
  facemesh = await facemesh_module.load();
  setStatusText('Loading Avatar file...');
  let t0 = new Date();
  await parseSVG(Object.values(avatarSvgs)[0]);
  setStatusText('Setting up camera...');
  try {
    video = await loadVideo();
  } catch (e) {
    let info = document.getElementById('info');
    info.textContent = 'this device type is not supported yet, ' +
      'or this browser does not support video capture: ' + e.toString();
    info.style.display = 'block';
    throw e;
  }
  setupModel();
  detectPoseInRealTime(video, posenet);
}
async function bindPage ( ) { setupCanvas ( ) ; setStatusText ( 'Loading the models...' ) ; var p = document . getElementById ( "start_btn" ) ; var p_reset = document . getElementById ( "replay_btn" ) ; p . onclick = readSetGo ; p_reset . onclick = startAgain ; posenet = await posenet_module . load ( { architecture : defaultPoseNetArchitecture , outputStride : defaultStride , inputResolution : defaultInputResolution , multiplier : defaultMultiplier , quantBytes : defaultQuantBytes } ) ; setStatusText ( 'Loading FaceMesh model...' ) ; facemesh = await facemesh_module . load ( ) ; setStatusText ( 'Loading Avatar file...' ) ; let t0 = new Date ( ) ; await parseSVG ( Object . values ( avatarSvgs ) [ 0 ] ) ; setStatusText ( 'Setting up camera...' ) ; try { video = await loadVideo ( ) ; } catch ( e ) { let info = document . getElementById ( 'info' ) ; info . textContent = 'this device type is not supported yet, ' + 'or this browser does not support video capture: ' + e . toString ( ) ; info . style . display = 'block' ; throw e ; } setupModel ( ) ; detectPoseInRealTime ( video , posenet ) ; }
Kicks off the game by loading the posenet model, finding and loading
 available camera devices, and setting off the detectPoseInRealTime function.
Kicks off the game by loading the posenet model finding and loading available camera devices and setting off the detectPoseInRealTime function .
// toggleLoadingUI(true); // attach evenListner to our start button start_btn // Find the paragraph element in the page // Find the paragraph element in the page // toggleLoadingUI(false); // allSet().then(gameOn);