<commit_before>window.KinectGestures = window.KinectGestures ? window.KinectGestures : {};

(function(){

    function DebugDrawer()
    {   
        let canvasEl = null,
            context = null;

        let record = false;        

        function update(frame)
        {   
            
            
            let skeletonPromises = [];
            for (let iSkeleton = 0; iSkeleton < frame.skeletons.length; ++iSkeleton) {
                let skeleton = frame.skeletons[iSkeleton];
                if (skeleton.trackingState > 0){
                    skeletonPromises.push(updateSkeleton(skeleton, iSkeleton));
                }                
            }
            if (skeletonPromises.length > 0) {
              let skeletonSumX = 0;
              let skeletonSumZ = 0;
              let numSkeleton = 0;
              let skeletonSumHandsX = 0; 
              let skeletonSumHandsY = 0;
              let skeletonSumHandsZRight = 0;
              let skeletonSumHandsZLeft = 0;
              Promise.all(skeletonPromises).then((results) => {
                results.map((sums) => {
                  skeletonSumZ += (sums.z / sums.length);
                  skeletonSumX += (sums.x / sums.length);
                  skeletonSumHandsX += sums.xhands;
                  skeletonSumHandsY += sums.yhands;
                  skeletonSumHandsZRight += sums.zhandright;
                  skeletonSumHandsZLeft += sums.zhandleft;
                  numSkeleton++;
                });
                let deltaz = (skeletonSumZ / numSkeleton);
                Ptypo.changeParam(Math.abs(parseFloat(40 * deltaz) + 1), 'thickness', 'antique-font');
                
                let deltax = (skeletonSumX / numSkeleton);
                Ptypo.changeParam(parseFloat((0.6 + deltax)), 'curviness', 'antique-font');
                
                let deltahandsy = (skeletonSumHandsY / numSkeleton);
                Ptypo.changeParam(((deltahandsy * 500) + 350), 'xHeight', 'antique-font');
                let deltahandsx = (skeletonSumHandsX / numSkeleton);
                Ptypo.changeParam((deltahandsx * 3), 'width', 'antique-font');
                let deltahandzright = (skeletonSumHandsZRight / numSkeleton);
                Ptypo.changeParam(Math.abs((deltahandzright * 500) + 150), 'ascender', 'antique-font');
                let deltahandzleft = (skeletonSumHandsZLeft / numSkeleton);
                Ptypo.changeParam(-Math.abs((deltahandzleft * 500) + 150), 'descender', 'antique-font');
              });
            };
        }
        function updateSkeleton(skeleton, index)
        { 
          return new Promise((resolve, reject) => {
            // Z axis<commit_msg>thickness commit on pucestypo demo<commit_after>window.KinectGestures = window.KinectGestures ? window.KinectGestures : {};

(function(){

    function DebugDrawer()
    {   
        let canvasEl = null,
            context = null;

        let record = false;        

        function update(frame)
        {   
            
            
            let skeletonPromises = [];
            for (let iSkeleton = 0; iSkeleton < frame.skeletons.length; ++iSkeleton) {
                let skeleton = frame.skeletons[iSkeleton];
                if (skeleton.trackingState > 0){
                    skeletonPromises.push(updateSkeleton(skeleton, iSkeleton));
                }                
            }
            if (skeletonPromises.length > 0) {
              let skeletonSumX = 0;
              let skeletonSumZ = 0;
              let numSkeleton = 0;
              let skeletonSumHandsX = 0; 
              let skeletonSumHandsY = 0;
              let skeletonSumHandsZRight = 0;
              let skeletonSumHandsZLeft = 0;
              Promise.all(skeletonPromises).then((results) => {
                results.map((sums) => {
                  skeletonSumZ += (sums.z / sums.length);
                  skeletonSumX += (sums.x / sums.length);
                  skeletonSumHandsX += sums.xhands;
                  skeletonSumHandsY += sums.yhands;
                  skeletonSumHandsZRight += sums.zhandright;
                  skeletonSumHandsZLeft += sums.zhandleft;
                  numSkeleton++;
                });
                let deltaz = (skeletonSumZ / numSkeleton);
                Ptypo.changeParam(Math.abs(parseFloat(35 * deltaz) + 1), 'thickness', 'antique-font');
                
                let deltax = (skeletonSumX / numSkeleton);
                Ptypo.changeParam(parseFloat((0.6 + deltax)), 'curviness', 'antique-font');
                
                let deltahandsy = (skeletonSumHandsY / numSkeleton);
                Ptypo.changeParam(((deltahandsy * 500) + 350), 'xHeight', 'antique-font');
                let deltahandsx = (skeletonSumHandsX / numSkeleton);
                Ptypo.changeParam((deltahandsx * 3), 'width', 'antique-font');
                let deltahandzright = (skeletonSumHandsZRight / numSkeleton);
                Ptypo.changeParam(Math.abs((deltahandzright * 500) + 150), 'ascender', 'antique-font');
                let deltahandzleft = (skeletonSumHandsZLeft / numSkeleton);
                Ptypo.changeParam(-Math.abs((deltahandzleft * 500) + 150), 'descender', 'antique-font');
              });
            };
        }
        function updateSkeleton(skeleton, index)
        { 
          return new Promise((resolve, reject) => {
            // Z axis
{'fraction_non_alphanumeric': 0.10625345877144439, 'fraction_numerical': 0.012543811104962183, 'mean_word_length': 1.580675868633984, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7197737', 'n_tokens_mistral': 1709, 'n_tokens_neox': 1477, 'n_words': 273}