<commit_before>package com.haxepunk;

#if doc

#elseif js

// html5 doesn't support drawTiles
class Preloader extends NMEPreloader { }

#else

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;
import flash.geom.Rectangle;

import openfl.display.Tilesheet;

@:bitmap("assets/graphics/preloader/haxepunk.png")
class HaxePunkLogo extends BitmapData {}

class Preloader extends NMEPreloader
{

	public function new()
	{
		tileData = [
			  0,   0, 0, 1,  0, // powered by
			 80, 190, 3, 1, 20, // large cog
			190, 185, 4, 1, 40, // small cog
			187, 260, 2, 1,  0, // factory
			  0, 260, 1, 1,  0, // haxepunk
		];

		tiles = new Tilesheet(new HaxePunkLogo(0, 0));
		tiles.addTileRect(new Rectangle(0, 0, 274, 58)); // powered by
		tiles.addTileRect(new Rectangle(0, 65, 274, 80)); // haxepunk
		tiles.addTileRect(new Rectangle(0, 165, 114, 190), new Point(57, 190)); // factory
		tiles.addTileRect(new Rectangle(115, 164, 134, 136), new Point(67, 68)); // large cog
		tiles.addTileRect(new Rectangle(123, 305, 56, 56), new Point(28, 28)); // small cog

		scaleIncrement = 0.002;

		var width = 260;
		var height = 340;

		// update bar position
		var color = 0xCB6325;
		var padding = 5;

		super();

		outline.x = (getWidth() - width) / 2;
		outline.y = (getHeight() - height) / 2;
		outline.graphics.clear();

		progress.y = outline.y + 60;
		progress.x = outline.x + width / 2;
		progress.graphics.clear();
		progress.graphics.lineStyle(1, color);
		progress.graphics.moveTo(-width / 2 + padding, 0);
		progress.graphics.lineTo(width / 2 - padding, 0);<commit_msg>Add Preloader progress bar container and allow preloader on html5<commit_after>package com.haxepunk;

#if doc

#else

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;
import flash.geom.Rectangle;

import openfl.display.Tilesheet;

@:bitmap("assets/graphics/preloader/haxepunk.png")
class HaxePunkLogo extends BitmapData {}

class Preloader extends NMEPreloader
{

	public function new()
	{
		tileData = [
			  0,   0, 0, 1,  0, // powered by
			 80, 190, 3, 1, 20, // large cog
			190, 185, 4, 1, 40, // small cog
			187, 260, 2, 1,  0, // factory
			  0, 260, 1, 1,  0, // haxepunk
		];

		tiles = new Tilesheet(new HaxePunkLogo(0, 0));
		tiles.addTileRect(new Rectangle(0, 0, 274, 58)); // powered by
		tiles.addTileRect(new Rectangle(0, 65, 274, 80)); // haxepunk
		tiles.addTileRect(new Rectangle(0, 165, 114, 190), new Point(57, 190)); // factory
		tiles.addTileRect(new Rectangle(115, 164, 134, 136), new Point(67, 68)); // large cog
		tiles.addTileRect(new Rectangle(123, 305, 56, 56), new Point(28, 28)); // small cog

		scaleIncrement = 0.002;

		var width = 260;
		var height = 340;

		// update bar position
		var color = 0xFFCB6325;
		var padding = 5;

		super();

		outline.x = (getWidth() - width) / 2;
		outline.y = (getHeight() - height) / 2;
		outline.graphics.clear();

		var complete = new Sprite ();
		complete.x = outline.x + width / 2;
		complete.y = outline.y + 60;
		complete.graphics.lineStyle(1, 0xFFFFFFFF);
		complete.graphics.moveTo(-width / 2 + padding, 0);
		complete.graphics.lineTo(width / 2 - padding, 0);
		addChildAt(complete, 0);

		progress.y = outline.y + 60;
		progress.x = outline.x + width / 2;
		progress.graphics.clear();
		progress.graphics.lineStyle(1, color);
		progress.graphics.moveTo(-width / 2 + padding, 0);
		progress.graphics.lineTo(width / 2 - padding, 0);
{'fraction_non_alphanumeric': 0.14447201543975738, 'fraction_numerical': 0.07389026743865454, 'mean_word_length': 3.484548825710754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '5077089', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1317, 'n_words': 359}