<commit_before><!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		[page:Loader] &rarr;
		<h1>[name]</h1>

		<div class="desc"> A loader for loading <em>glTF 2.0</em> resource. <br />
		<a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an
		<a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">open format specification</a>
		for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf)
		or binary (.glb) format. External files store textures (.jpg, .png, ...) and additional binary
		data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials,
		textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
		</div>

		<h2>Extensions</h2>

		<div>
		GLTFLoader supports the following glTF extensions:
		</div>

		<ul>
			<li>
				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness">
					KHR_materials_pbrSpecularGlossiness
				</a>
			</li>
			<li>
				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression">
					KHR_draco_mesh_compression
				</a>
			</li>
			<li>
				KHR_lights (experimental)
			</li>
		</ul>

		<h2>Example</h2>

		<code>
			// Instantiate a loader
			var loader = new THREE.GLTFLoader();

			// Optional: Provide a DRACOLoader instance to decode compressed mesh data
			THREE.DRACOLoader.setDecoderPath( '/examples/js/libs/draco' );
			loader.setDRACOLoader( new THREE.DRACOLoader() );

			// Load a glTF resource
			loader.load(
				// resource URL
				'models/gltf/duck/duck.gltf',
				// called when the resource is loaded
				function ( gltf ) {

					scene.add( gltf.scene );

					gltf.animations; // Array&lt;THREE.AnimationClip&gt;
					gltf.scene; // THREE.Scene
					gltf.scenes; // Array&lt;THREE.Scene&gt;
					gltf.cameras; // Array&lt;THREE.Camera&gt;
					gltf.asset; // Object

				},
				// called when loading is in progresses
				function ( xhr ) {

					console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );

				},
				// called when loading has errors
				function ( error ) {

					console.log( 'An error happened' );

				}
			);
			</code>

		[example:webgl_loader_gltf]

		<h2>Browser compatibility</h2>

		<p>GLTFLoader relies on ES6 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promises</a>,
		which are not supported in IE11. To use the loader in IE11, you must
		<a href="https://github.com/stefanpenner/es6-promise">include a polyfill</a>
		providing a Promise replacement.</p>

		<br>
		<hr>
<commit_msg>Clean up GLTFLoader doc, removing extra indents from sample code<commit_after><!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		[page:Loader] &rarr;
		<h1>[name]</h1>

		<div class="desc"> A loader for loading <em>glTF 2.0</em> resource. <br />
		<a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an
		<a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">open format specification</a>
		for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf)
		or binary (.glb) format. External files store textures (.jpg, .png, ...) and additional binary
		data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials,
		textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
		</div>

		<h2>Extensions</h2>

		<div>
		GLTFLoader supports the following glTF extensions:
		</div>

		<ul>
			<li>
				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness">
					KHR_materials_pbrSpecularGlossiness
				</a>
			</li>
			<li>
				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression">
					KHR_draco_mesh_compression
				</a>
			</li>
			<li>
				KHR_lights (experimental)
			</li>
		</ul>

		<h2>Example</h2>

		<code>
		// Instantiate a loader
		var loader = new THREE.GLTFLoader();

		// Optional: Provide a DRACOLoader instance to decode compressed mesh data
		THREE.DRACOLoader.setDecoderPath( '/examples/js/libs/draco' );
		loader.setDRACOLoader( new THREE.DRACOLoader() );

		// Load a glTF resource
		loader.load(
			// resource URL
			'models/gltf/duck/duck.gltf',
			// called when the resource is loaded
			function ( gltf ) {

				scene.add( gltf.scene );

				gltf.animations; // Array&lt;THREE.AnimationClip&gt;
				gltf.scene; // THREE.Scene
				gltf.scenes; // Array&lt;THREE.Scene&gt;
				gltf.cameras; // Array&lt;THREE.Camera&gt;
				gltf.asset; // Object

			},
			// called when loading is in progresses
			function ( xhr ) {

				console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );

			},
			// called when loading has errors
			function ( error ) {

				console.log( 'An error happened' );

			}
		);
		</code>

		[example:webgl_loader_gltf]

		<h2>Browser compatibility</h2>

		<p>GLTFLoader relies on ES6 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promises</a>,
		which are not supported in IE11. To use the loader in IE11, you must
		<a href="https://github.com/stefanpenner/es6-promise">include a polyfill</a>
		providing a Promise replacement.</p>

		<br>
		<hr>

{'fraction_non_alphanumeric': 0.15092066769919119, 'fraction_numerical': 0.009292720702116675, 'mean_word_length': 3.298816568047337, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, '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': '6943959', 'n_tokens_mistral': 2440, 'n_tokens_neox': 2045, 'n_words': 479}