    /* jshint browser: true */

    //animation ID's needed for cancelAnimationFrame
    var lipstickAnim;

    var lipstick = document.getElementById('lipstick');
    var lipstickCtx = lipstick.getContext('2d');
    var lipstickColor;

    //apply lipstick vanilla
    function applyLipstick() {
        var hex = "#" + lipstickColor;

        //lipstickCtx.clearRect(0, 0, lipstick.width, lipstick.height);


        //overlayCC.clearRect(0, 0, overlay.width, overlay.height);
        if (ctrack.getCurrentPosition()) {
            //ctrack.draw(overlay);
            //if (isRealTime) {
                lipstickAnim = compatibility.requestAnimationFrame(applyLipstick);
            //}

            positions = ctrack.getCurrentPosition();

            lipstickCtx.clearRect(0, 0, lipstick.width, lipstick.height);

            lipstickCtx.beginPath();

            lipstickCtx.moveTo(positions[44][0], positions[44][1]);

            for (var i = 45; i < 56; i++) {
                lipstickCtx.lineTo(positions[i][0], positions[i][1]);
            }
            150

            lipstickCtx.closePath();

            lipstickCtx.globalCompositeOperation = "overlay";
            lipstickCtx.fillStyle = hex;
            lipstickCtx.fill();

            lipstickCtx.beginPath();

            lipstickCtx.moveTo(positions[44][0], positions[44][1]);
            lipstickCtx.lineTo(positions[61][0], positions[61][1]);
            lipstickCtx.lineTo(positions[60][0], positions[60][1]);
            lipstickCtx.lineTo(positions[59][0], positions[59][1]);
            lipstickCtx.lineTo(positions[50][0], positions[50][1]);
            lipstickCtx.lineTo(positions[58][0], positions[58][1]);
            lipstickCtx.lineTo(positions[57][0], positions[57][1]);
            lipstickCtx.lineTo(positions[56][0], positions[56][1]);

            lipstickCtx.closePath();

            lipstickCtx.globalCompositeOperation = "destination-out";
            lipstickCtx.fillStyle = "rgba(0, 255, 0, 1)";
            lipstickCtx.fill();
        }
        // if (isRealTime) {
        //     lipstickAnim = compatibility.requestAnimationFrame(applyLipstick);
        // }

        // lipstickCtx.beginPath();

        // lipstickCtx.moveTo(points[48 * 2], points[48 * 2 + 1]);

        // for (var i = 49; i < 60; i++) {
        //     lipstickCtx.lineTo(points[i * 2], points[i * 2 + 1]);
        // }

        // lipstickCtx.closePath();

        // lipstickCtx.globalCompositeOperation = "overlay";
        // lipstickCtx.fillStyle = hex;
        // lipstickCtx.fill();


        // lipstickCtx.beginPath();

        // lipstickCtx.moveTo(points[48 * 2], points[48 * 2 + 1]);
        // lipstickCtx.lineTo(points[60 * 2], points[60 * 2 + 1]);
        // lipstickCtx.lineTo(points[61 * 2], points[61 * 2 + 1]);
        // lipstickCtx.lineTo(points[62 * 2], points[62 * 2 + 1]);
        // lipstickCtx.lineTo(points[63 * 2], points[63 * 2 + 1]);
        // lipstickCtx.lineTo(points[64 * 2], points[64 * 2 + 1]);
        // lipstickCtx.lineTo(points[65 * 2], points[65 * 2 + 1]);
        // lipstickCtx.lineTo(points[66 * 2], points[66 * 2 + 1]);
        // lipstickCtx.lineTo(points[67 * 2], points[67 * 2 + 1]);

        // lipstickCtx.closePath();

        // lipstickCtx.globalCompositeOperation = "destination-out";
        // lipstickCtx.fillStyle = "rgba(0, 255, 0, 1)";
        // lipstickCtx.fill();
    }
