<commit_before><!doctype html>
<html lang="en">
	<head>
		<title>three.js webgl - geometry - Subdivisions with Catmull-Clark</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 {
				font-family: Monospace;
				background-color: #f0f0f0;
				margin: 0px;
				overflow: hidden;
			}
		</style>
	</head>
	<body>

		<script src="../build/Three.js"></script>

		<script src="js/Stats.js"></script>

		<script src="../src/core/Geometry.js"></script>
		<script src="../src/extras/geometries/CubeGeometry.js"></script>
		<script src="../src/extras/geometries/CylinderGeometry.js"></script>
		<script src="../src/extras/geometries/TorusGeometry.js"></script>
		<script src="../src/extras/geometries/LatheGeometry.js"></script>
		<script src="../src/extras/modifiers/SubdivisionModifier.js"></script>

		<script src="fonts/helvetiker_regular.typeface.js"></script>

		<script>

			var container, stats;

			var camera, scene, renderer;

			var cube, plane;

			var targetYRotation = targetXRotation = 0;
			var targetYRotationOnMouseDown = targetXRotationOnMouseDown = 0;

			var mouseX = 0, mouseY = 0;
			var mouseXOnMouseDown = 0;

			var windowHalfX = window.innerWidth / 2;
			var windowHalfY = window.innerHeight / 2;


			// Create new object by parameters

			var createSomething = function( klass, args ) {

				var F = function( klass, args ) {

				    return klass.apply( this, args );

				}

				F.prototype = klass.prototype;

				return new F( klass, args );

			};


			// Cube

			var materials = [];

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

				materials.push( [ new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, wireframe: false } ) ] );

			}



			var geometriesParams = [

				{ type: 'CubeGeometry', args: [ 200, 200, 200, 2, 2, 2, materials ] },
				{ type: 'TorusGeometry', args: [ 100, 60, 4, 8, Math.PI*2 ] },
				{ type: 'TorusKnotGeometry', args: [  ], scale:0.25, meshScale:4 },
				{ type: 'SphereGeometry', args: [ 100, 3, 3 ], meshScale:2 },
				{ type: 'IcosahedronGeometry', args: [ 100, 1 ], meshScale:2 },
				{ type: 'CylinderGeometry', args: [ 25, 75, 200, 8, 3 ]} ,
				{ type: 'OctahedronGeometry', args: [200, 0], meshScale:2 },
				{ type: 'LatheGeometry', args: [ [
					new THREE.Vector3(0,0,0),
					new THREE.Vector3(0,50,50),
					new THREE.Vector3(0,10,100),
					new THREE.Vector3(0,50,150),
					new THREE.Vector3(0,0,200) ] ]},
				{ type: 'TextGeometry', args: ['&', {
										size: 200,
										height: 50,
										curveSegments: 1,
										font: "helvetiker"

									}]},
				{ type: 'PlaneGeometry', args: [ 200, 200, 4, 4 ] }

			];

			if (location.protocol !== "file:") {
				var loader = new THREE.JSONLoader();
				loader.load( 'obj/WaltHeadLo.js', function ( geometry ) {

					geometriesParams.push({type: 'WaltHead', args: [ ], meshScale: 6 });

					THREE.WaltHead = function() {
						return THREE.GeometryUtils.clone(geometry);
					};

					updateInfo()

				});

				var loader2 = new THREE.JSONLoader();
				loader2.load( 'obj/Suzanne.js', function ( geometry ) {

					geometriesParams.push({type: 'Suzanne', args: [ ], scale: 100, meshScale:2 });

					THREE.Suzanne = function() {
						return THREE.GeometryUtils.clone(geometry);
					};

					updateInfo()

				} );

			}


			var info;
			var subdivisions = 2;
			var geometryIndex = 0;

			// start scene

			init();
			animate();

			function nextSubdivision( x ) {

				subdivisions = Math.max( 0, subdivisions + x );
				addStuff();

			}

			function nextGeometry() {

				geometryIndex ++;

				if ( geometryIndex > geometriesParams.length - 1 ) {

					geometryIndex = 0;

				}

				addStuff();<commit_msg>I run chrome with the flag `--allow-file-access-from-files` instead of doing a web server so I wasn't seeing these.<commit_after><!doctype html>
<html lang="en">
	<head>
		<title>three.js webgl - geometry - Subdivisions with Catmull-Clark</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 {
				font-family: Monospace;
				background-color: #f0f0f0;
				margin: 0px;
				overflow: hidden;
			}
		</style>
	</head>
	<body>

		<script src="../build/Three.js"></script>

		<script src="js/Stats.js"></script>

		<script src="../src/core/Geometry.js"></script>
		<script src="../src/extras/geometries/CubeGeometry.js"></script>
		<script src="../src/extras/geometries/CylinderGeometry.js"></script>
		<script src="../src/extras/geometries/TorusGeometry.js"></script>
		<script src="../src/extras/geometries/LatheGeometry.js"></script>
		<script src="../src/extras/modifiers/SubdivisionModifier.js"></script>

		<script src="fonts/helvetiker_regular.typeface.js"></script>

		<script>

			var container, stats;

			var camera, scene, renderer;

			var cube, plane;

			var targetYRotation = targetXRotation = 0;
			var targetYRotationOnMouseDown = targetXRotationOnMouseDown = 0;

			var mouseX = 0, mouseY = 0;
			var mouseXOnMouseDown = 0;

			var windowHalfX = window.innerWidth / 2;
			var windowHalfY = window.innerHeight / 2;


			// Create new object by parameters

			var createSomething = function( klass, args ) {

				var F = function( klass, args ) {

				    return klass.apply( this, args );

				}

				F.prototype = klass.prototype;

				return new F( klass, args );

			};


			// Cube

			var materials = [];

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

				materials.push( [ new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, wireframe: false } ) ] );

			}



			var geometriesParams = [

				{ type: 'CubeGeometry', args: [ 200, 200, 200, 2, 2, 2, materials ] },
				{ type: 'TorusGeometry', args: [ 100, 60, 4, 8, Math.PI*2 ] },
				{ type: 'TorusKnotGeometry', args: [  ], scale:0.25, meshScale:4 },
				{ type: 'SphereGeometry', args: [ 100, 3, 3 ], meshScale:2 },
				{ type: 'IcosahedronGeometry', args: [ 100, 1 ], meshScale:2 },
				{ type: 'CylinderGeometry', args: [ 25, 75, 200, 8, 3 ]} ,
				{ type: 'OctahedronGeometry', args: [200, 0], meshScale:2 },
				{ type: 'LatheGeometry', args: [ [
					new THREE.Vector3(0,0,0),
					new THREE.Vector3(0,50,50),
					new THREE.Vector3(0,10,100),
					new THREE.Vector3(0,50,150),
					new THREE.Vector3(0,0,200) ] ]},
				{ type: 'TextGeometry', args: ['&', {
										size: 200,
										height: 50,
										curveSegments: 1,
										font: "helvetiker"

									}]},
				{ type: 'PlaneGeometry', args: [ 200, 200, 4, 4 ] }

			];

			var loader = new THREE.JSONLoader();
			loader.load( 'obj/WaltHeadLo.js', function ( geometry ) {

				geometriesParams.push({type: 'WaltHead', args: [ ], meshScale: 6 });

				THREE.WaltHead = function() {
					return THREE.GeometryUtils.clone(geometry);
				};

				updateInfo()

			});

			var loader2 = new THREE.JSONLoader();
			loader2.load( 'obj/Suzanne.js', function ( geometry ) {

				geometriesParams.push({type: 'Suzanne', args: [ ], scale: 100, meshScale:2 });

				THREE.Suzanne = function() {
					return THREE.GeometryUtils.clone(geometry);
				};

				updateInfo()

			} );


			var info;
			var subdivisions = 2;
			var geometryIndex = 0;

			// start scene

			init();
			animate();

			function nextSubdivision( x ) {

				subdivisions = Math.max( 0, subdivisions + x );
				addStuff();

			}

			function nextGeometry() {

				geometryIndex ++;

				if ( geometryIndex > geometriesParams.length - 1 ) {

					geometryIndex = 0;

				}

				addStuff();
{'fraction_non_alphanumeric': 0.16406663141195135, 'fraction_numerical': 0.03278688524590164, 'mean_word_length': 2.8814776808619804, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '4997558', 'n_tokens_mistral': 3425, 'n_tokens_neox': 2558, 'n_words': 579}