<commit_before>'use strict';

{
	window.Diorama.ModelPromise = function(url)
	{
		return new Promise((resolve, reject) =>
		{
			// NOTE: glTF loader does not catch errors
			if(/\.gltf$/i.test(url)){
				if(THREE.glTFLoader){
					let loader = new THREE.glTFLoader();
					loader.load(url, (result) => {
						resolve(result.scene.children[0].children[0]);
					});
				}
				else {
					console.error(`THREE.glTFLoader not found. "${url}" not loaded.`);
					reject();
				}
			}
			else if(/\.dae$/i.test(url)){
				if(THREE.ColladaLoader){
					let loader = new THREE.ColladaLoader();
					loader.load(url, result => resolve(result.scene.children[0]), null, reject);
				}
				else {
					console.error(`THREE.ColladaLoader not found. "${url}" not loaded.`);
					reject();
				}
			}
		});
	}

	window.Diorama.TexturePromise = function(url)
	{
		return new Promise((resolve, reject) =>
		{
			var loader = new THREE.TextureLoader();
			loader.load(url, resolve, null, reject);
		});
	}

	window.Diorama.VideoPromise = function(url)
	{
		// start loader
		var vidSrc = document.createElement('video');
		vidSrc.autoplay = true;
		vidSrc.loop = true;
		vidSrc.src = url;
		vidSrc.style.display = 'none';
		document.body.appendChild(vidSrc);
<commit_msg>Fix reference error in loader.js<commit_after>'use strict';

{
	Diorama.ModelPromise = function(url)
	{
		return new Promise((resolve, reject) =>
		{
			// NOTE: glTF loader does not catch errors
			if(/\.gltf$/i.test(url)){
				if(THREE.glTFLoader){
					let loader = new THREE.glTFLoader();
					loader.load(url, (result) => {
						resolve(result.scene.children[0].children[0]);
					});
				}
				else {
					console.error(`THREE.glTFLoader not found. "${url}" not loaded.`);
					reject();
				}
			}
			else if(/\.dae$/i.test(url)){
				if(THREE.ColladaLoader){
					let loader = new THREE.ColladaLoader();
					loader.load(url, result => resolve(result.scene.children[0]), null, reject);
				}
				else {
					console.error(`THREE.ColladaLoader not found. "${url}" not loaded.`);
					reject();
				}
			}
		});
	}

	Diorama.TexturePromise = function(url)
	{
		return new Promise((resolve, reject) =>
		{
			var loader = new THREE.TextureLoader();
			loader.load(url, resolve, null, reject);
		});
	}

	Diorama.VideoPromise = function(url)
	{
		// start loader
		var vidSrc = document.createElement('video');
		vidSrc.autoplay = true;
		vidSrc.loop = true;
		vidSrc.src = url;
		vidSrc.style.display = 'none';
		document.body.appendChild(vidSrc);

{'fraction_non_alphanumeric': 0.1657370517928287, 'fraction_numerical': 0.002390438247011952, 'mean_word_length': 3.0434782608695654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4841577', 'n_tokens_mistral': 1063, 'n_tokens_neox': 868, 'n_words': 168}