<commit_before>define(['marionette', 'templates/compiled'], function(Marionette, JST) {
	var Home = Marionette.ItemView.extend({
		template: JST.HomeTemplate,
		className: 'home-page',
		onShow: function() {
			// this.demoCube();
			this.movingCube();
		},
		demoCube: function() {
			var renderer = new THREE.WebGLRenderer();
			renderer.setClearColor(0x000000, 1.0);
			renderer.setSize(window.innerWidth, window.innerHeight);
			renderer.shadowMapEnabled = true;

			var scene = new THREE.Scene();

			var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
			camera.position.x = 15;
			camera.position.y = 16;
			camera.position.z = 13;
			camera.lookAt(scene.position);

			var geometry = new THREE.BoxGeometry(6, 4, 6);
			var material = new THREE.MeshLambertMaterial({
				color: "red"
			});
			var cube = new THREE.Mesh(geometry, material);
			scene.add(cube);

			var geometry = new THREE.PlaneBufferGeometry(20, 20);
			var planeMaterial = new THREE.MeshLambertMaterial({
				color: 0xcccccc
			});
			var plane = new THREE.Mesh(geometry, planeMaterial);
			plane.receiveShadow = true;
			plane.rotation.x = -0.5 * Math.PI;
			plane.position.y = -2;
			scene.add(plane);

			var spotLight = new THREE.SpotLight(0xffffff);
			spotLight.position.set(10, 20, 20);
			spotLight.castShadow = true;
			scene.add(spotLight);

			this.$el.find('div.3d').html(renderer.domElement);

			var control = this.addDatGui();

			var render = function() {
				requestAnimationFrame(render);
				cube.material.color = new THREE.Color(control.color);
				renderer.render(scene, camera);
			};

			render();
		},
		addDatGui: function() {
			var control = new function() {
				this.color = 0xff0000;
			};
			var gui = new dat.GUI({
				autoPlace: false
			});
			this.$el.find('div.control').html(gui.domElement);
			gui.addColor(control, 'color');
			return control;
		},
		movingCube: function() {

			/**
			 * @author alteredq / http://alteredqualia.com/
			 * @author mr.doob / http://mrdoob.com/
			 */

			var Detector = {<commit_msg>add house demo<commit_after>define(['marionette', 'templates/compiled'], function(Marionette, JST) {
	var Home = Marionette.ItemView.extend({
		template: JST.HomeTemplate,
		className: 'home-page',
		onShow: function() {
			// this.demoCube();
			// this.movingCube();
			this.houseDemo();
		},
		demoCube: function() {
			var renderer = new THREE.WebGLRenderer();
			renderer.setClearColor(0x000000, 1.0);
			renderer.setSize(window.innerWidth, window.innerHeight);
			renderer.shadowMapEnabled = true;

			var scene = new THREE.Scene();

			var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
			camera.position.x = 15;
			camera.position.y = 16;
			camera.position.z = 13;
			camera.lookAt(scene.position);

			var geometry = new THREE.BoxGeometry(6, 4, 6);
			var material = new THREE.MeshLambertMaterial({
				color: "red"
			});
			var cube = new THREE.Mesh(geometry, material);
			scene.add(cube);

			var geometry = new THREE.PlaneBufferGeometry(20, 20);
			var planeMaterial = new THREE.MeshLambertMaterial({
				color: 0xcccccc
			});
			var plane = new THREE.Mesh(geometry, planeMaterial);
			plane.receiveShadow = true;
			plane.rotation.x = -0.5 * Math.PI;
			plane.position.y = -2;
			scene.add(plane);

			var spotLight = new THREE.SpotLight(0xffffff);
			spotLight.position.set(10, 20, 20);
			spotLight.castShadow = true;
			scene.add(spotLight);

			this.$el.find('div.3d').html(renderer.domElement);

			var control = this.addDatGui();

			var render = function() {
				requestAnimationFrame(render);
				cube.material.color = new THREE.Color(control.color);
				renderer.render(scene, camera);
			};

			render();
		},
		addDatGui: function() {
			var control = new function() {
				this.color = 0xff0000;
			};
			var gui = new dat.GUI({
				autoPlace: false
			});
			this.$el.find('div.control').html(gui.domElement);
			gui.addColor(control, 'color');
			return control;
		},
		houseDemo: function() {
			var camera;

			init();
			render();

			function init() {
				camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
				camera.position.set(500, 800, 1300);
				camera.lookAt(new THREE.Vector3());

				scene = new THREE.Scene();

				var size = 500,
					step = 50;

				var geometry = new THREE.Geometry();

				for (var i = -size; i <= size; i += step) {
					geometry.vertices.push(new THREE.Vector3(-size, 0, i));
					geometry.vertices.push(new THREE.Vector3(size, 0, i));

					geometry.vertices.push(new THREE.Vector3(i, 0, -size));
					geometry.vertices.push(new THREE.Vector3(i, 0, size));
				}

				var material = new THREE.LineBasicMaterial({
					color: 0x000000,
					opacity: 0.2,
					transparent: true
				});

				var line = new THREE.Line(geometry, material, THREE.LinePieces);
				scene.add(line);

				var ambientLight = new THREE.AmbientLight(0x606060);
				scene.add(ambientLight);

				var directionalLight = new THREE.DirectionalLight(0xffffff);
				directionalLight.position.set(1, 0.75, 0.5).normalize();
				scene.add(directionalLight);

				renderer = new THREE.WebGLRenderer({
					antialias: true
				});
				renderer.setClearColor(0xf0f0f0);
				renderer.setPixelRatio(window.devicePixelRatio);
				renderer.setSize(window.innerWidth - 17, window.innerHeight);

				$('div.3d').html(renderer.domElement);
			}

			function render() {
				renderer.render(scene, camera);
			}
		},
		movingCube: function() {

			/**
			 * @author alteredq / http://alteredqualia.com/
			 * @author mr.doob / http://mrdoob.com/
			 */

			var Detector = {
{'fraction_non_alphanumeric': 0.1470484270060092, 'fraction_numerical': 0.027571580063626724, 'mean_word_length': 3.3001519756838906, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2444784', 'n_tokens_mistral': 2424, 'n_tokens_neox': 1862, 'n_words': 386}