<commit_before>/**
 * @author dmarcos / https://github.com/dmarcos
 * @author mrdoob / http://mrdoob.com
 */

THREE.VRControls = function ( object, done ) {

	var vrInput;

	var onVRDevices = function ( devices ) {

		for ( var i = 0; i < devices.length; i ++ ) {

			var device = devices[ i ];

			if ( device instanceof PositionSensorVRDevice ) {

				vrInput = devices[ i ];
				return; // We keep the first we encounter

			}

		}

		if ( done !== undefined ) {

			done( 'HMD not available' );

		}

	};

	if ( navigator.getVRDevices !== undefined ) {

		navigator.getVRDevices().then( onVRDevices );

	} else if ( navigator.getVRDevices !== undefined ) {

		navigator.mozGetVRDevices( onVRDevices );

	} else if ( done !== undefined ) {

		done( 'Your browser is not VR Ready' );

	}

	this.update = function () {

		if ( vrInput === undefined ) return;

		var orientation = vrInput.getState().orientation;

		if ( orientation !== null ) {

			object.quaternion.set( orientation.x, orientation.y, orientation.z, orientation.w );

		}

	};

};<commit_msg>VRControls: Fixed typo caught by @WestLangley in ef93c0d287c132107a95a05ea4a496938a3be7ba.<commit_after>/**
 * @author dmarcos / https://github.com/dmarcos
 * @author mrdoob / http://mrdoob.com
 */

THREE.VRControls = function ( object, callback ) {

	var vrInput;

	var onVRDevices = function ( devices ) {

		for ( var i = 0; i < devices.length; i ++ ) {

			var device = devices[ i ];

			if ( device instanceof PositionSensorVRDevice ) {

				vrInput = devices[ i ];
				return; // We keep the first we encounter

			}

		}

		if ( callback !== undefined ) {

			callback( 'HMD not available' );

		}

	};

	if ( navigator.getVRDevices !== undefined ) {

		navigator.getVRDevices().then( onVRDevices );

	} else if ( navigator.mozGetVRDevices !== undefined ) {

		navigator.mozGetVRDevices( onVRDevices );

	} else if ( callback !== undefined ) {

		callback( 'Your browser is not VR Ready' );

	}

	this.update = function () {

		if ( vrInput === undefined ) return;

		var orientation = vrInput.getState().orientation;

		if ( orientation !== null ) {

			object.quaternion.set( orientation.x, orientation.y, orientation.z, orientation.w );

		}

	};

};
{'fraction_non_alphanumeric': 0.13918918918918918, 'fraction_numerical': 0.012162162162162163, 'mean_word_length': 3.045537340619308, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '108259', 'n_tokens_mistral': 844, 'n_tokens_neox': 724, 'n_words': 183}