<commit_before>///<reference path="../_definitions.ts"/>


module away.utils
{

	export class RequestAnimationFrame
	{

		private _callback:Function;
		private _callbackContext:Object;
		private _active:boolean = false;
		private _rafUpdateFunction:any;
		private _prevTime:number;
		private _dt:number;
		private _currentTime:number;
		private _argsArray:any[] = new Array();
		private _getTimer:Function;

		constructor(callback:Function, callbackContext:Object)
		{


			this._getTimer = away.utils.getTimer;

			this.setCallback(callback, callbackContext);

			this._rafUpdateFunction = () =>
			{

				if (this._active) {

					this._tick();

				}

			}

			this._argsArray.push(this._dt);

		}

		// Public

		/**
		 *
		 * @param callback
		 * @param callbackContext
		 */
		public setCallback(callback:Function, callbackContext:Object)
		{

			this._callback = callback;
			this._callbackContext = callbackContext;

		}

		/**
		 *
		 */
		public start()
		{

			this._prevTime = this._getTimer();
			this._active = true;

			if (window['mozRequestAnimationFrame']) {

				window.requestAnimationFrame = window['mozRequestAnimationFrame'];

			} else if (window['webkitRequestAnimationFrame']) {

				window.requestAnimationFrame = window['webkitRequestAnimationFrame'];

			} else if (window['oRequestAnimationFrame']) {

				window.requestAnimationFrame = window['oRequestAnimationFrame'];

			}

			if (window.requestAnimationFrame) {

				window.requestAnimationFrame(this._rafUpdateFunction);

			}


		}

		/**
		 *
		 */
		public stop()
		{

			this._active = false;

		}

		// Get / Set<commit_msg>RequestAnimationFrame - Updated to work with non-prefixed version of RequestAnimationFrame first<commit_after>///<reference path="../_definitions.ts"/>


module away.utils
{

	export class RequestAnimationFrame
	{

		private _callback:Function;
		private _callbackContext:Object;
		private _active:boolean = false;
		private _rafUpdateFunction:any;
		private _prevTime:number;
		private _dt:number;
		private _currentTime:number;
		private _argsArray:any[] = new Array();
		private _getTimer:Function;

		constructor(callback:Function, callbackContext:Object)
		{


			this._getTimer = away.utils.getTimer;

			this.setCallback(callback, callbackContext);

			this._rafUpdateFunction = () =>
			{

				if (this._active) {

					this._tick();

				}

			}

			this._argsArray.push(this._dt);

		}

		// Public

		/**
		 *
		 * @param callback
		 * @param callbackContext
		 */
		public setCallback(callback:Function, callbackContext:Object)
		{

			this._callback = callback;
			this._callbackContext = callbackContext;

		}

		/**
		 *
		 */
		public start()
		{

			this._prevTime = this._getTimer();
			this._active = true;

			if (window.requestAnimationFrame)
			{
				window.requestAnimationFrame(this._rafUpdateFunction);
			}
			else
			{
				if (window['mozRequestAnimationFrame']) {
					window.requestAnimationFrame = window['mozRequestAnimationFrame'];
				} else if (window['webkitRequestAnimationFrame']) {
					window.requestAnimationFrame = window['webkitRequestAnimationFrame'];
				} else if (window['oRequestAnimationFrame']) {
					window.requestAnimationFrame = window['oRequestAnimationFrame'];
				}
			}
		}

		/**
		 *
		 */
		public stop()
		{

			this._active = false;

		}

		// Get / Set
{'fraction_non_alphanumeric': 0.12012012012012012, 'fraction_numerical': 0.0, 'mean_word_length': 3.4060846560846563, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5094151', 'n_tokens_mistral': 1227, 'n_tokens_neox': 953, 'n_words': 169}