<commit_before>var nav = {
    debug: false,

    // Dimensions of the screen viewport
    sWidth: window.innerWidth,
    sHeight: window.innerHeight,

    // Dimensions of the Kinect viewport
    kWidth: 512,
    kHeight: 424,

    // Location of the user's spine base
    uSpineX: null,
    uSpineY: null,

    // Dimensions of the user viewport
    uWidth: null,
    uHeight: null,

    init: function() {
        nav.overlay = new Kinetic.Stage({
            container: 'nav',
            width: document.querySelector("#nav").offsetWidth,
            height: document.querySelector("#nav").offsetHeight
        });

        if (nav.debug === true) {
            nav.userViewLayer = new Kinetic.Layer();
            nav.kinectViewLayer = new Kinetic.Layer();
            nav.screenViewLayer = new Kinetic.Layer();
        }
    },

    setScreenView: function(x, y) {
        nav.sWidth = x;
        nav.sHeight = y;
    },

    setKinectView: function(x, y) {
        nav.kWidth = x;
        nav.kHeight = y;
    },

    setUserSpineBase: function(x, y) {
        nav.uSpineX = x;
        nav.uSpineY = y;
    },

    setUserView: function(x, y) {
        nav.uWidth = x;
        nav.uHeight = y;

        nav.uxMin = nav.uSpineX - nav.uWidth / 2;
        nav.uxMax = nav.uSpineX + nav.uWidth / 2;
        nav.uyMin = nav.uSpineY - nav.uHeight;
        nav.uyMax = nav.uHeight;
    },

    drawKinectView: function() {
        nav.kinectView = new Kinetic.Rect({
            x: nav.sWidth / 2 - nav.kWidth / 2,
            y: nav.sHeight / 2 - nav.kHeight / 2,
            width: nav.kWidth,
            height: nav.kHeight,
            stroke: "#444",
            strokeWidth: 1.618,
        });

        nav.kinectViewLabel = new Kinetic.Text({
            x: nav.sWidth / 2 - nav.kWidth / 2,
            y: nav.sHeight / 2 + nav.kHeight / 2 + 5,
            width: nav.kWidth,
            align: "right",
            text: "Kinect Viewport\n" + nav.kWidth + "x" + nav.kHeight,
            fontSize: 14,
            fill: "#444"
        });

        // Draw the Kinect viewport on-screen
        nav.kinectViewLayer.add(nav.kinectView).add(nav.kinectViewLabel);
        nav.overlay.add(nav.kinectViewLayer);
    },

    drawUserView: function() {
        nav.userView = new Kinetic.Rect({
            x: nav.uSpineX - nav.uWidth / 2 + nav.kinectView.getX(),
            y: nav.uSpineY - nav.uHeight + nav.kinectView.getY(),<commit_msg>Patched the source of the clipping bug<commit_after>var nav = {
    debug: false,

    // A switch to keep track of whether a user is engaged
    engaged: false,

    // Dimensions of the screen viewport
    sWidth: window.innerWidth,
    sHeight: window.innerHeight,

    // Dimensions of the Kinect viewport
    kWidth: 512,
    kHeight: 424,

    // Location of the user's spine base
    uSpineX: null,
    uSpineY: null,

    // Dimensions of the user viewport
    uWidth: null,
    uHeight: null,

    init: function() {
        nav.overlay = new Kinetic.Stage({
            container: 'nav',
            width: document.querySelector("#nav").offsetWidth,
            height: document.querySelector("#nav").offsetHeight
        });

        if (nav.debug === true) {
            nav.userViewLayer = new Kinetic.Layer();
            nav.kinectViewLayer = new Kinetic.Layer();
            nav.screenViewLayer = new Kinetic.Layer();
        }
    },

    setScreenView: function(x, y) {
        nav.sWidth = x;
        nav.sHeight = y;
    },

    setKinectView: function(x, y) {
        nav.kWidth = x;
        nav.kHeight = y;
    },

    setUserSpineBase: function(x, y) {
        nav.uSpineX = x;
        nav.uSpineY = y;
    },

    setUserView: function(x, y) {
        nav.uWidth = x;
        nav.uHeight = y;

        nav.uxMin = nav.uSpineX - nav.uWidth / 2;
        nav.uxMax = nav.uSpineX + nav.uWidth / 2;
        nav.uyMin = nav.uSpineY - nav.uHeight;
        nav.uyMax = nav.uSpineY;
    },

    drawKinectView: function() {
        nav.kinectView = new Kinetic.Rect({
            x: nav.sWidth / 2 - nav.kWidth / 2,
            y: nav.sHeight / 2 - nav.kHeight / 2,
            width: nav.kWidth,
            height: nav.kHeight,
            stroke: "#444",
            strokeWidth: 1.618,
        });

        nav.kinectViewLabel = new Kinetic.Text({
            x: nav.sWidth / 2 - nav.kWidth / 2,
            y: nav.sHeight / 2 + nav.kHeight / 2 + 5,
            width: nav.kWidth,
            align: "right",
            text: "Kinect Viewport\n" + nav.kWidth + "x" + nav.kHeight,
            fontSize: 14,
            fill: "#444"
        });

        // Draw the Kinect viewport on-screen
        nav.kinectViewLayer.add(nav.kinectView).add(nav.kinectViewLabel);
        nav.overlay.add(nav.kinectViewLayer);
    },

    drawUserView: function() {
        nav.userView = new Kinetic.Rect({
            x: nav.uSpineX - nav.uWidth / 2 + nav.kinectView.getX(),
            y: nav.uSpineY - nav.uHeight + nav.kinectView.getY(),
{'fraction_non_alphanumeric': 0.12507516536380037, 'fraction_numerical': 0.012026458208057728, 'mean_word_length': 1.6943844492440605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4356856', 'n_tokens_mistral': 1750, 'n_tokens_neox': 1653, 'n_words': 372}