<commit_before><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Dungeon Builder</title>
	<style>
		body {
			background: #eee;
		}

		#dungeonBoundary {
			display: none;
		}

		#resultCanvas {
			image-rendering: pixelated;
			box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
		}

	</style>

</head>
<body>

<img src="dungeon-boundary.png" width="512" height="512" id="dungeonBoundary"/>
<script src="../src/DungeonBuilder.js"></script>

<script>

	/*
	 A dumb seedable RNG to make repeatable dungeons for this demo
	 */

	var _seed = 1.3;
	function rand() {
		var x = Math.sin(_seed++) * 10000;
		return x - Math.floor(x);
	}

	window.onload = function() {

		var buildStartTime = Date.now();
		var mapSpec = document.getElementById("dungeonBoundary");
		mapSpec = 'dungeon-boundary.png';

		DungeonBuilder.build(mapSpec, {

			roomGridSize: 30,
			wiggle: 2,
			frequency: 0.5,
			rng: rand,

			done: function (resultCanvas, harness, roomInfo) {

				var seconds = (Date.now() - buildStartTime) / 1000;
				console.log("DungeonBuilder.build - took: " + seconds + " seconds.");

				// add to document so we can see results
				resultCanvas.id = "resultCanvas";<commit_msg>Fix redundant image access in demo<commit_after><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Dungeon Builder</title>
	<style>
		body {
			background: #eee;
		}

		#dungeonBoundary {
			display: none;
		}

		#resultCanvas {
			image-rendering: pixelated;
			box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
		}

	</style>

</head>
<body>

<img src="dungeon-boundary.png" width="512" height="512" id="dungeonBoundary"/>
<script src="../src/DungeonBuilder.js"></script>

<script>

	/*
	 A dumb seedable RNG to make repeatable dungeons for this demo
	 */

	var _seed = 1.3;
	function rand() {
		var x = Math.sin(_seed++) * 10000;
		return x - Math.floor(x);
	}

	window.onload = function() {

		var buildStartTime = Date.now();
		var mapSpec = document.getElementById("dungeonBoundary");

		DungeonBuilder.build(mapSpec, {

			roomGridSize: 30,
			wiggle: 2,
			frequency: 0.5,
			rng: rand,

			done: function (resultCanvas, harness, roomInfo) {

				var seconds = (Date.now() - buildStartTime) / 1000;
				console.log("DungeonBuilder.build - took: " + seconds + " seconds.");

				// add to document so we can see results
				resultCanvas.id = "resultCanvas";
{'fraction_non_alphanumeric': 0.1553398058252427, 'fraction_numerical': 0.026171380329252848, 'mean_word_length': 3.4299065420560746, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '4194728', 'n_tokens_mistral': 1022, 'n_tokens_neox': 843, 'n_words': 210}