<commit_before>import h3d.scene.*;

class Main extends hxd.App {

	override function init() {
		var prim = hxd.Res.Model.toHmd();
		var obj = prim.makeObject(loadTexture);
		obj.scale(0.1);
		s3d.addChild(obj);
		s3d.camera.pos.set( -2, -3, 2);
		s3d.camera.target.z += 1;

		obj.playAnimation(prim.loadAnimation(LinearAnim));

		// add lights and setup materials
		var dir = new DirLight(new h3d.Vector( -1, 3, -10), s3d);
		for( m in obj.getMaterials() ) {
			var t = m.mainPass.getShader(h3d.shader.Texture);
			if( t != null ) t.killAlpha = true;
			m.mainPass.enableLights = true;
			m.mainPass.culling = None;
			m.shadows = true;
			m.getPass("shadow").culling = None;
		}
		s3d.lightSystem.ambientLight.set(0.4, 0.4, 0.4);

		var shadow = cast(s3d.renderer.getPass("shadow"), h3d.pass.ShadowMap);
		shadow.lightDirection = dir.direction;
		shadow.power = 50;
	}

	function loadMaterial( name : String, _ ) {
		var name = name.split("\\").pop();
		return new h3d.mat.MeshMaterial(loadTexture(name));
	}

	function loadTexture( name : String ) {
		name = name.split("/").pop();
		return hxd.Res.load(name).toTexture();<commit_msg>remove unused code<commit_after>import h3d.scene.*;

class Main extends hxd.App {

	override function init() {
		var prim = hxd.Res.Model.toHmd();
		var obj = prim.makeObject(loadTexture);
		obj.scale(0.1);
		s3d.addChild(obj);
		s3d.camera.pos.set( -2, -3, 2);
		s3d.camera.target.z += 1;

		obj.playAnimation(prim.loadAnimation());

		// add lights and setup materials
		var dir = new DirLight(new h3d.Vector( -1, 3, -10), s3d);
		for( m in obj.getMaterials() ) {
			var t = m.mainPass.getShader(h3d.shader.Texture);
			if( t != null ) t.killAlpha = true;
			m.mainPass.enableLights = true;
			m.mainPass.culling = None;
			m.shadows = true;
			m.getPass("shadow").culling = None;
		}
		s3d.lightSystem.ambientLight.set(0.4, 0.4, 0.4);

		var shadow = cast(s3d.renderer.getPass("shadow"), h3d.pass.ShadowMap);
		shadow.lightDirection = dir.direction;
		shadow.power = 50;
	}

	function loadTexture( name : String ) {
		name = name.split("/").pop();
		return hxd.Res.load(name).toTexture();
{'fraction_non_alphanumeric': 0.16784203102961917, 'fraction_numerical': 0.02679830747531735, 'mean_word_length': 3.5084745762711864, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5284533', 'n_tokens_mistral': 900, 'n_tokens_neox': 814, 'n_words': 165}