<commit_before><!DOCTYPE HTML>
<html lang="en">
	<head>
		<title>three.js webgl - deferred rendering [morphing + skinning]</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<style>
			body {
				background-color: #000;
				margin: 0px;
				overflow: hidden;
			}
			#info {
				position: absolute;
				top: 20px; width: 100%;
				color: #ffffff;
				padding: 5px;
				font-family: Monospace;
				font-size: 13px;
				text-align: center;
			}
			a {
				color: #ff0080;
				text-decoration: none;
			}
			a:hover {
				color: #0080ff;
			}
			#stats { position: absolute; top:10px; left: 5px }
			#stats #fps { background: transparent !important }
			#stats #fps #fpsText { color: #aaa !important }
			#stats #fps #fpsGraph { display: none }
		</style>
	</head>

	<body>
		<div id="container"></div>

		<script src="js/libs/stats.min.js"></script>
		<script src="../build/three.js"></script>
		<script src="js/Detector.js"></script>

		<script src="js/shaders/CopyShader.js"></script>
		<script src="js/shaders/FXAAShader.js"></script>

		<script src="js/postprocessing/EffectComposer.js"></script>
		<script src="js/postprocessing/RenderPass.js"></script>
		<script src="js/postprocessing/ShaderPass.js"></script>
		<script src="js/renderers/WebGLDeferredRenderer.js"></script>

		<script>

			var WIDTH = window.innerWidth;
			var HEIGHT = window.innerHeight;

			var windowHalfX = WIDTH / 2;
			var windowHalfY = HEIGHT / 2;

			var mouseX = 0, mouseY = 0;

			var NEAR = 1.0, FAR = 350.0;
			var VIEW_ANGLE = 45;

			var renderer, camera, scene, stats, clock, mixer;

			var numLights = 40;
			var lights = [];

			var ready = false;

			init();
			animate();

			function init() {

				renderer = new THREE.WebGLDeferredRenderer();
				renderer.setSize( WIDTH, HEIGHT );

				camera = new THREE.PerspectiveCamera( VIEW_ANGLE, WIDTH / HEIGHT, NEAR, FAR );
				camera.position.z = 150;

				scene = new THREE.Scene();

				stats = new Stats();
				stats.domElement.style.position = 'absolute';
				stats.domElement.style.top = '8px';
				stats.domElement.style.zIndex = 100;

				var container = document.getElementById( 'container' );
				container.appendChild( renderer.domElement );
				container.appendChild( stats.domElement );

				initKnight();
				initRoom();
				initLights();

				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
				window.addEventListener( 'resize', onWindowResize, false );

				clock = new THREE.Clock();

			}

			function initKnight() {

				var loader = new THREE.JSONLoader();

				loader.load( "models/skinned/knight.js", function( geometry, materials ) {

					var material = materials[ 0 ];
					material.emissive.set( 0x101010 );
					material.skinning = true;
					material.morphTargets = true;

					var mesh = new THREE.SkinnedMesh( geometry, material );
					mesh.position.y = -30;
					mesh.scale.multiplyScalar( 5 );

					mixer = new THREE.AnimationMixer( mesh );

					for ( var i = 0; i < mesh.geometry.animations.length; i ++ ) {

						var action = mixer.clipAction( mesh.geometry.animations[ i ] );

						if ( i === 1 ) action.timeScale = 0.25;

						action.play();

					}

					scene.add( mesh );

					ready = true;

				} );

			}

			function initLights() {

				var distance = 20;

				var c = new THREE.Vector3();
				var geometry = new THREE.SphereGeometry( 1, 1, 1 );

				for ( var i = 0; i < numLights; i ++ ) {

					var light = new THREE.PointLight( 0xffffff, 2.0, distance );
					c.set( Math.random(), Math.random(), Math.random() ).normalize();
					light.color.setRGB( c.x, c.y, c.z );
					scene.add( light );
					lights.push( light );

					var material = new THREE.MeshBasicMaterial( { color: light.color } );
					var emitter = new THREE.Mesh( geometry, material );
					light.add( emitter );

				}

				var directionalLight = new THREE.DirectionalLight( 0x101010 );
				directionalLight.position.set( -1, 1, 1 ).normalize();
				scene.add( directionalLight );

				var spotLight = new THREE.SpotLight( 0x404040 );
				spotLight.position.set( 0, 50, 0 );
				scene.add( spotLight );

			}

			function initRoom() {

				var size = 100;
				var geometry = new THREE.PlaneBufferGeometry( size, size );
				var material = new THREE.MeshPhongMaterial( { color: 0x222222, specular: 0x222222, shininess: 75 } );
				var transparentMaterial = new THREE.MeshPhongMaterial( { color: 0x222222, emissive: 0x88888888, specular: 0x222222, shininess: 75, opacity: 0.3, transparent: true } );

				var room = new THREE.Object3D();
				room.position.y = size / 2 - 30;

				// top
				mesh = new THREE.Mesh( geometry, material );
				mesh.rotation.x = Math.PI/2;
				mesh.position.y = size / 2;
				room.add( mesh );

				// bottom
				mesh = new THREE.Mesh( geometry, material );
				mesh.rotation.x = -Math.PI/2;
				mesh.position.y = -size / 2;
				room.add( mesh );<commit_msg>Fix implicit variable declaration in webgldeferred_animation, and feed end line<commit_after><!DOCTYPE HTML>
<html lang="en">
	<head>
		<title>three.js webgl - deferred rendering [morphing + skinning]</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<style>
			body {
				background-color: #000;
				margin: 0px;
				overflow: hidden;
			}
			#info {
				position: absolute;
				top: 20px; width: 100%;
				color: #ffffff;
				padding: 5px;
				font-family: Monospace;
				font-size: 13px;
				text-align: center;
			}
			a {
				color: #ff0080;
				text-decoration: none;
			}
			a:hover {
				color: #0080ff;
			}
			#stats { position: absolute; top:10px; left: 5px }
			#stats #fps { background: transparent !important }
			#stats #fps #fpsText { color: #aaa !important }
			#stats #fps #fpsGraph { display: none }
		</style>
	</head>

	<body>
		<div id="container"></div>

		<script src="js/libs/stats.min.js"></script>
		<script src="../build/three.js"></script>
		<script src="js/Detector.js"></script>

		<script src="js/shaders/CopyShader.js"></script>
		<script src="js/shaders/FXAAShader.js"></script>

		<script src="js/postprocessing/EffectComposer.js"></script>
		<script src="js/postprocessing/RenderPass.js"></script>
		<script src="js/postprocessing/ShaderPass.js"></script>
		<script src="js/renderers/WebGLDeferredRenderer.js"></script>

		<script>

			var WIDTH = window.innerWidth;
			var HEIGHT = window.innerHeight;

			var windowHalfX = WIDTH / 2;
			var windowHalfY = HEIGHT / 2;

			var mouseX = 0, mouseY = 0;

			var NEAR = 1.0, FAR = 350.0;
			var VIEW_ANGLE = 45;

			var renderer, camera, scene, stats, clock, mixer;

			var numLights = 40;
			var lights = [];

			var ready = false;

			init();
			animate();

			function init() {

				renderer = new THREE.WebGLDeferredRenderer();
				renderer.setSize( WIDTH, HEIGHT );

				camera = new THREE.PerspectiveCamera( VIEW_ANGLE, WIDTH / HEIGHT, NEAR, FAR );
				camera.position.z = 150;

				scene = new THREE.Scene();

				stats = new Stats();
				stats.domElement.style.position = 'absolute';
				stats.domElement.style.top = '8px';
				stats.domElement.style.zIndex = 100;

				var container = document.getElementById( 'container' );
				container.appendChild( renderer.domElement );
				container.appendChild( stats.domElement );

				initKnight();
				initRoom();
				initLights();

				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
				window.addEventListener( 'resize', onWindowResize, false );

				clock = new THREE.Clock();

			}

			function initKnight() {

				var loader = new THREE.JSONLoader();

				loader.load( "models/skinned/knight.js", function( geometry, materials ) {

					var material = materials[ 0 ];
					material.emissive.set( 0x101010 );
					material.skinning = true;
					material.morphTargets = true;

					var mesh = new THREE.SkinnedMesh( geometry, material );
					mesh.position.y = -30;
					mesh.scale.multiplyScalar( 5 );

					mixer = new THREE.AnimationMixer( mesh );

					for ( var i = 0; i < mesh.geometry.animations.length; i ++ ) {

						var action = mixer.clipAction( mesh.geometry.animations[ i ] );

						if ( i === 1 ) action.timeScale = 0.25;

						action.play();

					}

					scene.add( mesh );

					ready = true;

				} );

			}

			function initLights() {

				var distance = 20;

				var c = new THREE.Vector3();
				var geometry = new THREE.SphereGeometry( 1, 1, 1 );

				for ( var i = 0; i < numLights; i ++ ) {

					var light = new THREE.PointLight( 0xffffff, 2.0, distance );
					c.set( Math.random(), Math.random(), Math.random() ).normalize();
					light.color.setRGB( c.x, c.y, c.z );
					scene.add( light );
					lights.push( light );

					var material = new THREE.MeshBasicMaterial( { color: light.color } );
					var emitter = new THREE.Mesh( geometry, material );
					light.add( emitter );

				}

				var directionalLight = new THREE.DirectionalLight( 0x101010 );
				directionalLight.position.set( -1, 1, 1 ).normalize();
				scene.add( directionalLight );

				var spotLight = new THREE.SpotLight( 0x404040 );
				spotLight.position.set( 0, 50, 0 );
				scene.add( spotLight );

			}

			function initRoom() {

				var size = 100;
				var geometry = new THREE.PlaneBufferGeometry( size, size );
				var material = new THREE.MeshPhongMaterial( { color: 0x222222, specular: 0x222222, shininess: 75 } );
				var transparentMaterial = new THREE.MeshPhongMaterial( { color: 0x222222, emissive: 0x88888888, specular: 0x222222, shininess: 75, opacity: 0.3, transparent: true } );

				var room = new THREE.Object3D();
				room.position.y = size / 2 - 30;

				// top
				var mesh = new THREE.Mesh( geometry, material );
				mesh.rotation.x = Math.PI/2;
				mesh.position.y = size / 2;
				room.add( mesh );

				// bottom
				mesh = new THREE.Mesh( geometry, material );
				mesh.rotation.x = -Math.PI/2;
				mesh.position.y = -size / 2;
				room.add( mesh );
{'fraction_non_alphanumeric': 0.14481585268214572, 'fraction_numerical': 0.0300240192153723, 'mean_word_length': 2.9080954243253814, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6944004', 'n_tokens_mistral': 4390, 'n_tokens_neox': 3277, 'n_words': 814}