<commit_before>define(function (require) {

  'use strict';

  require('shim');

  // Core needs the PVariables object
  var constants = require('constants');

  // Create the Processing constructor
  var Processing = function(canvs, sketchProc) {

    var self = this;

    // Keep a reference to when this instance was created
    this.startTime = new Date().getTime();
    this.preload_count = 0;

    this.isGlobal = false;

    // Environment
    this.frameCount = 0;
    this._frameRate = 0;
    this._lastFrameTime = 0;
    this._targetFrameRate = 60;
    this.focused = true;
    this.displayWidth = screen.width;
    this.displayHeight = screen.height;

    // Shape.Vertex
    this.shapeKind = null;
    this.shapeInited = false;

    // Input.Mouse
    this.mouseX = 0;
    this.mouseY = 0;
    this.pmouseX = 0;
    this.pmouseY = 0;
    this.mouseButton = 0;

    // Input.Keyboard
    this.key = '';
    this.keyCode = 0;
    this.keyDown = false;

    // Input.Touch
    this.touchX = 0;
    this.touchY = 0;

    // Output.Files
    this.pWriters = [];

    // Text
    this._textLeading = 15;
    this._textFont = 'sans-serif';
    this._textSize = 12;
    this._textStyle = constants.NORMAL;

    this.curElement = null;
    this.matrices = [[1,0,0,1,0,0]];

    this.settings = {

      // Structure
      loop: true,

      fill: false,
      startTime: 0,
      updateInterval: 0,
      rectMode: constants.CORNER,
      imageMode: constants.CORNER,
      ellipseMode: constants.CENTER,
      colorMode: constants.RGB,

      mousePressed: false,

      angleMode: constants.RADIANS
    };

    this.styles = [];


    // If the user has created a global setup function,
    // assume "beginner mode" and make everything global
    if (!sketchProc) {

      this.isGlobal = true;

      // Loop through methods on the prototype and attach them to the window
      for (var method in Processing.prototype) {
        window[method] = Processing.prototype[method].bind(this);
      }

      // Attach its properties to the window
      for (var prop in this) {
        if (this.hasOwnProperty(prop)) {
          window[prop] = this[prop];
        }
      }

      for (var constant in constants) {
        if (constants.hasOwnProperty(constant)) {
          window[constant] = constants[constant];
        }
      }

    } else {

      sketchProc(this);

    }

    if (document.readyState === 'complete') {
      this._start();
    } else {
      window.addEventListener('load', self._start.bind(self), false);
    }

  };

  // Create is called at window.onload
  Processing._init = function() {

    // If the user has created a global setup function,
    // assume "beginner mode" and make everything global
    if (window.setup && typeof window.setup === 'function') {

      // Create a processing instance
      new Processing();

    }

  };<commit_msg>changing node/sketch local variables<commit_after>define(function (require) {

  'use strict';

  require('shim');

  // Core needs the PVariables object
  var constants = require('constants');

  // Create the Processing constructor
  var Processing = function(node, sketch) {

    var self = this;

    // Keep a reference to when this instance was created
    this.startTime = new Date().getTime();
    this.preload_count = 0;

    this.isGlobal = false;

    // Environment
    this.frameCount = 0;
    this._frameRate = 0;
    this._lastFrameTime = 0;
    this._targetFrameRate = 60;
    this.focused = true;
    this.displayWidth = screen.width;
    this.displayHeight = screen.height;

    // Shape.Vertex
    this.shapeKind = null;
    this.shapeInited = false;

    // Input.Mouse
    this.mouseX = 0;
    this.mouseY = 0;
    this.pmouseX = 0;
    this.pmouseY = 0;
    this.mouseButton = 0;

    // Input.Keyboard
    this.key = '';
    this.keyCode = 0;
    this.keyDown = false;

    // Input.Touch
    this.touchX = 0;
    this.touchY = 0;

    // Output.Files
    this.pWriters = [];

    // Text
    this._textLeading = 15;
    this._textFont = 'sans-serif';
    this._textSize = 12;
    this._textStyle = constants.NORMAL;

    this.curElement = null;
    this.matrices = [[1,0,0,1,0,0]];

    this.settings = {

      // Structure
      loop: true,

      fill: false,
      startTime: 0,
      updateInterval: 0,
      rectMode: constants.CORNER,
      imageMode: constants.CORNER,
      ellipseMode: constants.CENTER,
      colorMode: constants.RGB,

      mousePressed: false,

      angleMode: constants.RADIANS
    };

    this.styles = [];


    // If the user has created a global setup function,
    // assume "beginner mode" and make everything global
    if (!sketch) {

      this.isGlobal = true;

      // Loop through methods on the prototype and attach them to the window
      for (var method in Processing.prototype) {
        window[method] = Processing.prototype[method].bind(this);
      }

      // Attach its properties to the window
      for (var prop in this) {
        if (this.hasOwnProperty(prop)) {
          window[prop] = this[prop];
        }
      }

      for (var constant in constants) {
        if (constants.hasOwnProperty(constant)) {
          window[constant] = constants[constant];
        }
      }

    } else {

      sketch(this);

    }

    if (document.readyState === 'complete') {
      this._start();
    } else {
      window.addEventListener('load', self._start.bind(self), false);
    }

  };

  // Create is called at window.onload
  Processing._init = function() {

    // If the user has created a global setup function,
    // assume "beginner mode" and make everything global
    if (window.setup && typeof window.setup === 'function') {

      // Create a processing instance
      new Processing();

    }

  };
{'fraction_non_alphanumeric': 0.11733102253032929, 'fraction_numerical': 0.00901213171577123, 'mean_word_length': 2.2150417827298052, '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': '6671237', 'n_tokens_mistral': 1837, 'n_tokens_neox': 1706, 'n_words': 457}