<commit_before>var PIXI = require('pixi.js');
var kd = require('keydrown');
var World = require('./world');

var height = document.body.clientHeight;
var width = document.body.clientWidth;
var renderer = new PIXI.CanvasRenderer(width, 1000);

//var renderer = new PIXI.autoDetectRenderer(800, 600);
var scale = Math.min(width / 800, height / 600);
//scale = 1;

document.body.appendChild(renderer.view);

var stage = new PIXI.Stage();

var levels = {
	0: require('../levels/level.json')
};

var wintext = new PIXI.Text("Hello World", {
					font: "100px Arial",
					fill: 'white'
				});
var keypressed = false;

var activeWorld = null;
loadWorld();

requestAnimationFrame(animate);

function loadWorld() {
	var world = new World(levels[0]);
	activeWorld = world;
	stage.addChild(world.scene);
}

function animate() {
	kd.tick();
	
	if(keypressed) {		
		stage.addChild(wintext);
	} else {
		stage.removeChild(wintext);		
	}
	
	if (activeWorld) {	
		if(activeWorld.monsters) {
			activeWorld.monsters.forEach((monster) => {
				monster.init();
			});
		}

		if(activeWorld.walls) {
			activeWorld.walls.forEach((wall) => {
				wall.rotation += 0.1;
				wall.init();
			});
		}
	}
	
	renderer.render(stage);	
	
	requestAnimationFrame(animate);
}

kd.Q.down(() => {
	keypressed = true;
});

kd.W.down(() => {
	keypressed = false;
});
<commit_msg>test commit<commit_after>var PIXI = require('pixi.js');
var kd = require('keydrown');
var World = require('./world');

var height = document.body.clientHeight;
var width = document.body.clientWidth;
var renderer = new PIXI.CanvasRenderer(width, 1000);

//var renderer = new PIXI.autoDetectRenderer(800, 600);
var scale = Math.min(width / 800, height / 600);
//scale = 1;

document.body.appendChild(renderer.view);

var stage = new PIXI.Stage();

var levels = {
	0: require('../levels/level.json')
};

var wintext = new PIXI.Text("Test change", {
					font: "100px Arial",
					fill: 'white'
				});
var keypressed = false;

var activeWorld = null;
loadWorld();

requestAnimationFrame(animate);

function loadWorld() {
	var world = new World(levels[0]);
	activeWorld = world;
	stage.addChild(world.scene);
}

function animate() {
	kd.tick();
	
	if(keypressed) {		
		stage.addChild(wintext);
	} else {
		stage.removeChild(wintext);		
	}
	
	if (activeWorld) {	
		if(activeWorld.monsters) {
			activeWorld.monsters.forEach((monster) => {
				monster.init();
			});
		}

		if(activeWorld.walls) {
			activeWorld.walls.forEach((wall) => {
				wall.rotation += 0.1;
				wall.init();
			});
		}
	}
	
	renderer.render(stage);	
	
	requestAnimationFrame(animate);
}

kd.Q.down(() => {
	keypressed = true;
});

kd.W.down(() => {
	keypressed = false;
});

{'fraction_non_alphanumeric': 0.1720029784065525, 'fraction_numerical': 0.017870439314966492, 'mean_word_length': 3.7473498233215548, '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': '2698157', 'n_tokens_mistral': 1098, 'n_tokens_neox': 957, 'n_words': 189}