<commit_before>define([
	"goo/entities/systems/System", "goo/renderer/Renderer", "goo/math/Matrix4x4", 'goo/math/MathUtils', 'goo/math/Vector3'
], /** @lends CSSTransformSystem */ function (
	System, Renderer, Matrix4x4, MathUtils, Vector3
) {
	"use strict";

	function CSSTransformSystem(renderer) {
		System.call(this, "CSSTransformSystem", ["TransformComponent", "CSSTransformComponent"]);
		
		this.renderer = renderer;
		this.viewDom = document.querySelector("#view");
		this.containerDom = document.querySelector("#cam1");
		this.containerDom2 = document.querySelector("#cam2");
		
		this.tmpMatrix = new Matrix4x4();
		this.tmpMatrix2 = new Matrix4x4();
		this.tmpVector = new Vector3();
	}

	CSSTransformSystem.prototype = Object.create(System.prototype);

	var epsilon = function(value) {
		return Math.abs(value) < 0.000001 ? 0 : value;
	};

	var getCSSMatrix = function(matrix) {
		var elements = matrix.data;

		return 'translate3d(-50%,-50%,0) matrix3d(' +
			epsilon(elements[0]) + ',' + 
			epsilon(-elements[1]) + ',' + 
			epsilon(elements[2]) + ',' +
			epsilon(elements[3]) + ',' + 
			epsilon(elements[4]) + ',' + 
			epsilon(-elements[5]) + ',' + 
			epsilon(elements[6]) + ',' +
			epsilon(elements[7]) + ',' + 
			epsilon(elements[8]) + ',' +
			epsilon(-elements[9]) + ',' + 
			epsilon(elements[10]) + ',' +
			epsilon(elements[11]) + ',' + 
			epsilon(elements[12]) + ',' + 
			epsilon(-elements[13]) + ',' + 
			epsilon(elements[14]) + ',' +
			epsilon(elements[15]) + 
		') scale3d(1,-1,1)';
	};

	var getCameraCSSMatrix = function(matrix) {
		var elements = matrix.data;

		return 'matrix3d(' + 
			epsilon(elements[0]) + ',' + 
			epsilon(-elements[1]) + ',' + 
			epsilon(elements[2]) + ',' +
			epsilon(elements[3]) + ',' + 
			epsilon(elements[4]) + ',' + 
			epsilon(-elements[5]) + ',' + 
			epsilon(elements[6]) + ',' +
			epsilon(elements[7]) + ',' + 
			epsilon(elements[8]) + ',' +
			epsilon(-elements[9]) + ',' + 
			epsilon(elements[10]) + ',' +
			epsilon(elements[11]) + ',' + 
			epsilon(elements[12]) + ',' + 
			epsilon(-elements[13]) + ',' + 
			epsilon(elements[14]) + ',' +
			epsilon(elements[15]) + ')';
	};

	CSSTransformSystem.prototype.process = function (entities) {
		if (entities.length === 0) {
			return;
		}
		
		var prefixes = ["", "-webkit-", "-moz-", "-ms-", "-o-"];
		var camera = Renderer.mainCamera;

		var fov = 0.5 / Math.tan(MathUtils.DEG_TO_RAD * camera.fov * 0.5) * this.renderer.domElement.offsetHeight;
		
		this.viewDom.style.WebkitPerspective = fov + "px";
		this.viewDom.style.MozPerspective = fov + "px";
		this.viewDom.style.oPerspective = fov + "px";
		this.viewDom.style.perspective = fov + "px";

		this.tmpMatrix.copy(camera.getViewInverseMatrix());<commit_msg>Made JSHint happy with CSSTransformSystem<commit_after>define([
	"goo/entities/systems/System", "goo/renderer/Renderer", "goo/math/Matrix4x4", 'goo/math/MathUtils', 'goo/math/Vector3'
], /** @lends CSSTransformSystem */ function (
	System, Renderer, Matrix4x4, MathUtils, Vector3
) {
	"use strict";

	function CSSTransformSystem(renderer) {
		System.call(this, "CSSTransformSystem", ["TransformComponent", "CSSTransformComponent"]);
		
		this.renderer = renderer;
		this.viewDom = document.querySelector("#view");
		this.containerDom = document.querySelector("#cam1");
		this.containerDom2 = document.querySelector("#cam2");
		
		this.tmpMatrix = new Matrix4x4();
		this.tmpMatrix2 = new Matrix4x4();
		this.tmpVector = new Vector3();
	}

	CSSTransformSystem.prototype = Object.create(System.prototype);

	var epsilon = function(value) {
		return Math.abs(value) < 0.000001 ? 0 : value;
	};

	var getCSSMatrix = function(matrix) {
		var elements = matrix.data;

		return 'translate3d(-50%,-50%,0) matrix3d(' +
			epsilon(elements[0]) + ',' +
			epsilon(-elements[1]) + ',' +
			epsilon(elements[2]) + ',' +
			epsilon(elements[3]) + ',' +
			epsilon(elements[4]) + ',' +
			epsilon(-elements[5]) + ',' +
			epsilon(elements[6]) + ',' +
			epsilon(elements[7]) + ',' +
			epsilon(elements[8]) + ',' +
			epsilon(-elements[9]) + ',' +
			epsilon(elements[10]) + ',' +
			epsilon(elements[11]) + ',' +
			epsilon(elements[12]) + ',' +
			epsilon(-elements[13]) + ',' +
			epsilon(elements[14]) + ',' +
			epsilon(elements[15]) +
		') scale3d(1,-1,1)';
	};

	var getCameraCSSMatrix = function(matrix) {
		var elements = matrix.data;

		return 'matrix3d(' +
			epsilon(elements[0]) + ',' +
			epsilon(-elements[1]) + ',' +
			epsilon(elements[2]) + ',' +
			epsilon(elements[3]) + ',' +
			epsilon(elements[4]) + ',' +
			epsilon(-elements[5]) + ',' +
			epsilon(elements[6]) + ',' +
			epsilon(elements[7]) + ',' +
			epsilon(elements[8]) + ',' +
			epsilon(-elements[9]) + ',' +
			epsilon(elements[10]) + ',' +
			epsilon(elements[11]) + ',' +
			epsilon(elements[12]) + ',' +
			epsilon(-elements[13]) + ',' +
			epsilon(elements[14]) + ',' +
			epsilon(elements[15]) + ')';
	};

	CSSTransformSystem.prototype.process = function (entities) {
		if (entities.length === 0) {
			return;
		}
		
		var prefixes = ["", "-webkit-", "-moz-", "-ms-", "-o-"];
		var camera = Renderer.mainCamera;

		var fov = 0.5 / Math.tan(MathUtils.DEG_TO_RAD * camera.fov * 0.5) * this.renderer.domElement.offsetHeight;
		
		this.viewDom.style.WebkitPerspective = fov + "px";
		this.viewDom.style.MozPerspective = fov + "px";
		this.viewDom.style.oPerspective = fov + "px";
		this.viewDom.style.perspective = fov + "px";

		this.tmpMatrix.copy(camera.getViewInverseMatrix());
{'fraction_non_alphanumeric': 0.20677102293410993, 'fraction_numerical': 0.030578813250819074, 'mean_word_length': 3.9549143372407576, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4034518', 'n_tokens_mistral': 2245, 'n_tokens_neox': 1971, 'n_words': 273}