<!DOCTYPE html>
<html>

<head>
    <title>PoseNet - Camera Feed Demo</title>
    <style>.footer {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            color: black;
        }

        .footer-text {
            max-width: 600px;
            text-align: center;
            margin: auto;
        }

        @media only screen and (max-width: 600px) {

            .footer-text,
            .dg {
                display: none;
            }
        }

        /*
         *  The following loading spinner CSS is from SpinKit project
         *  https://github.com/tobiasahlin/SpinKit
         */
        .sk-spinner-pulse {
            width: 20px;
            height: 20px;
            margin: auto 10px;
            float: left;
            background-color: #333;
            border-radius: 100%;
            -webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out;
            animation: sk-pulseScaleOut 1s infinite ease-in-out;
        }

        @-webkit-keyframes sk-pulseScaleOut {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }

            100% {
                -webkit-transform: scale(1.0);
                transform: scale(1.0);
                opacity: 0;
            }
        }

        @keyframes sk-pulseScaleOut {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }

            100% {
                -webkit-transform: scale(1.0);
                transform: scale(1.0);
                opacity: 0;
            }
        }

        .spinner-text {
            float: left;
        }</style>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
    <div id="info" style="display:none">
    </div>
    <div id="loading" style="display:flex">
        <div class="spinner-text">
            Loading PoseNet model...
        </div>
        <div class="sk-spinner sk-spinner-pulse"></div>
    </div>
    <br><br><br>
    <div id="contentContainer">

      <div id="leftContainer">

        <div id="objectListContainer">
          <span class="paragraphTitle">Object List</span>
          <button id="newImage">Add New Image</button>
        </div>

        <div id="objectPropertyContainer">
          <span class="paragraphTitle">Property Editor</span>
          <div id="properties">
            <div id="inputHandler">
              <button id="inputButton">
                <label for="inputImg">
                  Choose File
                </label>
                </button><input id="inputImg" type="file" accept="image/*" style="display:none">
              
              <label id="currentInput"></label>
            </div>
            <div class="property">
                Size
                <input id="sizeMultiplier" type="text" value="1.00"><br>
            </div>
            <div class="property">
                Rotation
                <input id="rotationInput" type="text" value="0.00"><br>
            </div>
            <div class="property">
                Horizontal offset
                <input id="horizontalTranslation" type="text" value="0.0"><br>
            </div>
            <div class="property">
                Vertical offset
                <input id="verticalTranslation" type="text" value="0.0"><br>
            </div>
            <div class="property">
              <select id="model" style="display: none;">
                <option value="posenet">PoseNet</option>
              </select>
            </div>
            <div class="property">
              Anchor Point
              <select id="imageKeypointAttachIndexSelect">
              </select>
            </div>
            <div class="property">
              Tolerance
              <input id="marginOfError" type="text" value="0"><br>
              (For background removal)
              <div class="useClear"></div>
            </div>
            <div class="property">
              Remove White Background
              <input id="removeBg" type="checkbox" class="checkbox"><br>
            </div>
          </div>
        </div>
      </div>

      <div id="cameraOutputContainer">
        <div id="main" style="display:none">
            <video id="video" playsinline="" style="display: none;">
            </video>
            <canvas id="output">
        </canvas></div>
      </div>
    </div>

    <script src="camera.js"></script>
</body>

</html>
