<commit_before>package hxd.fmt.pak;

class Loader extends h2d.Object {

	var onDone : Void -> Void;
	var cur : hxd.net.BinaryLoader;
	var resCount : Int;
	var fs : FileSystem;
	var s2d : h2d.Scene;
	var bg : h2d.Graphics;

	public function new(s2d:h2d.Scene, onDone) {
		super(s2d);
		this.s2d = s2d;
		this.bg = new h2d.Graphics(this);
		this.onDone = onDone;
		if( hxd.res.Loader.currentInstance == null )
			hxd.res.Loader.currentInstance = new hxd.res.Loader(new FileSystem());
		fs = Std.instance(hxd.res.Loader.currentInstance.fs, FileSystem);
		if( fs == null )
			throw "Can only use loader with PAK file system";
		hxd.System.setLoop(render);
	}

	function render() {
		h3d.Engine.getCurrent().render(s2d);
	}<commit_msg>fixed pak loader for js<commit_after>package hxd.fmt.pak;

class Loader extends h2d.Object {

	var onDone : Void -> Void;
	var cur : hxd.net.BinaryLoader;
	var resCount : Int = 0;
	var fs : FileSystem;
	var s2d : h2d.Scene;
	var bg : h2d.Graphics;

	public function new(s2d:h2d.Scene, onDone) {
		super(s2d);
		this.s2d = s2d;
		this.bg = new h2d.Graphics(this);
		this.onDone = onDone;
		if( hxd.res.Loader.currentInstance == null )
			hxd.res.Loader.currentInstance = new hxd.res.Loader(new FileSystem());
		fs = Std.instance(hxd.res.Loader.currentInstance.fs, FileSystem);
		if( fs == null )
			throw "Can only use loader with PAK file system";
		hxd.System.setLoop(render);
	}

	function render() {
		h3d.Engine.getCurrent().render(s2d);
	}
{'fraction_non_alphanumeric': 0.13636363636363635, 'fraction_numerical': 0.016960651289009497, 'mean_word_length': 3.742765273311897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3788181', 'n_tokens_mistral': 611, 'n_tokens_neox': 574, 'n_words': 131}