<commit_before>/**
 * @author mrdoob / http://mrdoob.com/
 * @author schteppe / https://github.com/schteppe
 * @author alex2401 / https://github.com/sasha240100
 */
 const PI_2 = Math.PI / 2;
 var MouseEvent = window.MouseEvent;
 if(!MouseEvent.prototype.hasOwnProperty('movementX') && !MouseEvent.prototype.hasOwnProperty('mozMovementX')){ //Checks for support
  //Not very stable, it's a solution that just works ! 
  MouseEvent.prototype.lastX = 0,
  MouseEvent.prototype.lastY = 0;
  MouseEvent.prototype.getMovementX = function(){
   var value =  this.clientX - this.lastX;
   this.lastX = this.clientX;
   return value;
  }
  MouseEvent.prototype.getMovementY = function(){
   var value =  this.clientY - this.lastY;
   this.lastY = this.clientY;
   return value;
  }
 }
 var PointerLockControls = function ( camera, mesh, params) {

    /* Velocity properties */
    var velocityFactor = 1, //Same as 20 * 0.05
        runVelocity = 0.25;
    mesh.setAngularFactor({x: 0, y: 0, z: 0});

    /* Init */
    var scope = this,
        pitchObject = new THREE.Object3D();
    pitchObject.add( camera );

    var yawObject = new THREE.Object3D();
    yawObject.position.y = params.ypos; // eyes are 2 meters above the ground
    yawObject.add( pitchObject );

    var quat = new THREE.Quaternion(),
        moveForward = false,
        moveBackward = false,
        moveLeft = false,
        moveRight = false,
        canJump = false;

    var contactNormal = new THREE.Vector3(); // Normal in the contact, pointing *out* of whatever the player touched

    mesh.addEventListener("collision", function(other_object, v, r, contactNormal){

        // If contactNormal.dot(upAxis) is between 0 and 1, we know that the contact normal is somewhat in the up direction.
        //Update, we do not need upAxis, (a, b, c).dot((0, 1, 0)) = b right ?
        if(contactNormal.y < 0.5) // Use a "good" threshold value between 0 and 1 here!<commit_msg>Moves the MouseEvents to Prefix file<commit_after>/**
 * @author mrdoob / http://mrdoob.com/
 * @author schteppe / https://github.com/schteppe
 * @author alex2401 / https://github.com/sasha240100
 */
 const PI_2 = Math.PI / 2;
 var PointerLockControls = function ( camera, mesh, params) {

    /* Velocity properties */
    var velocityFactor = 1, //Same as 20 * 0.05
        runVelocity = 0.25;
    mesh.setAngularFactor({x: 0, y: 0, z: 0});

    /* Init */
    var scope = this,
        pitchObject = new THREE.Object3D();
    pitchObject.add( camera );

    var yawObject = new THREE.Object3D();
    yawObject.position.y = params.ypos; // eyes are 2 meters above the ground
    yawObject.add( pitchObject );

    var quat = new THREE.Quaternion(),
        moveForward = false,
        moveBackward = false,
        moveLeft = false,
        moveRight = false,
        canJump = false;

    var contactNormal = new THREE.Vector3(); // Normal in the contact, pointing *out* of whatever the player touched

    mesh.addEventListener("collision", function(other_object, v, r, contactNormal){

        // If contactNormal.dot(upAxis) is between 0 and 1, we know that the contact normal is somewhat in the up direction.
        //Update, we do not need upAxis, (a, b, c).dot((0, 1, 0)) = b right ?
        if(contactNormal.y < 0.5) // Use a "good" threshold value between 0 and 1 here!
{'fraction_non_alphanumeric': 0.12206855081178593, 'fraction_numerical': 0.022850270595309682, 'mean_word_length': 2.8241379310344827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '795732', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1029, 'n_words': 323}