<commit_before>var camera;
var scene;
var renderer;
var collectibleItemCube;
var collectibleItemSphere;
var center;

var maze = {width: 15, large: 9, cellSize: 500};

var angleX = 0;
var windowHalfX = window.innerWidth / 2;
var incrementoX = Math.PI / (windowHalfX);

var mouseX = windowHalfX;

var person = {
    startPosition: {
        x: 1,
        z: 8
    }
};

wallGeometries = [];

init();

function init() {
    scene = new THREE.Scene();

    camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000);
    camera.position.x = (person.startPosition.x - maze.width / 2) * maze.cellSize;
    camera.position.z = (person.startPosition.z - maze.large / 2) * maze.cellSize - maze.cellSize / 2;

    center = new THREE.Vector3(camera.position.x + 250, 0, 0);

    var geometryPlane = new THREE.PlaneBufferGeometry(maze.width * maze.cellSize, maze.large * maze.cellSize);
    var geometryPlaneBasic = new THREE.PlaneBufferGeometry(maze.cellSize, maze.cellSize, 1, 1);

    // ceiling
    var ceiling = new THREE.Mesh(geometryPlane, new THREE.MeshBasicMaterial({
        map: THREE.ImageUtils.loadTexture('textures/ceiling.jpg'),
        doubleSided: true,
        side: THREE.DoubleSide
    }));
    ceiling.side = THREE.DoubleSide;
    ceiling.rotation.x = -Math.PI / 2;
    ceiling.position.y = 250;
    ceiling.position.x = 0;
    ceiling.position.z = 0;
    scene.add(ceiling);

    // floor
    var floorTexture = THREE.ImageUtils.loadTexture('textures/floor.png');
    floorTexture.wrapS = THREE.RepeatWrapping;
    floorTexture.wrapT = THREE.RepeatWrapping;
    floorTexture.repeat.set(maze.width, maze.large);

    var floor = new THREE.Mesh(geometryPlane, new THREE.MeshBasicMaterial({
        map: floorTexture,
        doubleSided: true,
        side: THREE.DoubleSide
    }));
    floor.rotation.x = -Math.PI / 2;
    floor.position.y = -250;
    floor.position.x = 0;
    floor.position.z = 0;
    scene.add(floor);

    var wallMaterial = new THREE.MeshBasicMaterial({
        map: THREE.ImageUtils.loadTexture('textures/wall.png'),
        doubleSided: true,
        side: THREE.DoubleSide
    });
    // South and North walls
    for (var actualMazeWidth = 0; actualMazeWidth < maze.width; actualMazeWidth++) {
        var borderWallSN = new THREE.Mesh(geometryPlaneBasic, wallMaterial);
        borderWallSN.position.z = maze.large / 2 * maze.cellSize;
        borderWallSN.position.y = 0;
        borderWallSN.position.x = (actualMazeWidth - maze.width / 2) * maze.cellSize + maze.cellSize / 2;
        scene.add(borderWallSN);
        wallGeometries.push(borderWallSN);

        borderWallSN = new THREE.Mesh(geometryPlaneBasic, wallMaterial);
        borderWallSN.position.z = -maze.large / 2 * maze.cellSize;
        borderWallSN.position.y = 0;
        borderWallSN.position.x = (actualMazeWidth - maze.width / 2) * maze.cellSize + maze.cellSize / 2;
        scene.add(borderWallSN);
        wallGeometries.push(borderWallSN);<commit_msg>simplified transformation of planes<commit_after>var camera;
var scene;
var renderer;
var collectibleItemCube;
var collectibleItemSphere;
var center;

var maze = {width: 15, large: 9, cellSize: 500};

var angleX = 0;
var windowHalfX = window.innerWidth / 2;
var incrementoX = Math.PI / (windowHalfX);

var mouseX = windowHalfX;

var person = {
    startPosition: {
        x: 1,
        z: 8
    }
};

wallGeometries = [];

init();

function init() {
    scene = new THREE.Scene();

    camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000);
    camera.position.x = (person.startPosition.x - maze.width / 2) * maze.cellSize;
    camera.position.z = (person.startPosition.z - maze.large / 2) * maze.cellSize - maze.cellSize / 2;

    center = new THREE.Vector3(camera.position.x + 250, 0, 0);

    var geometryPlane = new THREE.PlaneBufferGeometry(maze.width * maze.cellSize, maze.large * maze.cellSize);
    var geometryPlaneBasic = new THREE.PlaneBufferGeometry(maze.cellSize, maze.cellSize, 1, 1);

    // ceiling
    var ceiling = new THREE.Mesh(geometryPlane, new THREE.MeshBasicMaterial({
        map: THREE.ImageUtils.loadTexture('textures/ceiling.jpg')
    }));
    ceiling.rotation.x = Math.PI / 2;
    ceiling.position.y = maze.cellSize / 2;
    scene.add(ceiling);

    // floor
    var floorTexture = THREE.ImageUtils.loadTexture('textures/floor.png');
    floorTexture.wrapS = THREE.RepeatWrapping;
    floorTexture.wrapT = THREE.RepeatWrapping;
    floorTexture.repeat.set(maze.width, maze.large);

    var floor = new THREE.Mesh(geometryPlane, new THREE.MeshBasicMaterial({
        map: floorTexture
    }));
    floor.rotation.x = -Math.PI / 2;
    floor.position.y = -maze.cellSize / 2;
    scene.add(floor);

    var wallMaterial = new THREE.MeshBasicMaterial({
        map: THREE.ImageUtils.loadTexture('textures/wall.png'),
        side: THREE.DoubleSide
    });
    // South and North walls
    for (var actualMazeWidth = 0; actualMazeWidth < maze.width; actualMazeWidth++) {
        var borderWallSN = new THREE.Mesh(geometryPlaneBasic, wallMaterial);
        borderWallSN.position.z = maze.large / 2 * maze.cellSize;
        borderWallSN.position.y = 0;
        borderWallSN.position.x = (actualMazeWidth - maze.width / 2) * maze.cellSize + maze.cellSize / 2;
        scene.add(borderWallSN);
        wallGeometries.push(borderWallSN);

        borderWallSN = new THREE.Mesh(geometryPlaneBasic, wallMaterial);
        borderWallSN.position.z = -maze.large / 2 * maze.cellSize;
        borderWallSN.position.y = 0;
        borderWallSN.position.x = (actualMazeWidth - maze.width / 2) * maze.cellSize + maze.cellSize / 2;
        scene.add(borderWallSN);
        wallGeometries.push(borderWallSN);
{'fraction_non_alphanumeric': 0.12228213602365628, 'fraction_numerical': 0.016002783092711775, 'mean_word_length': 3.020979020979021, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2299217', 'n_tokens_mistral': 2011, 'n_tokens_neox': 1833, 'n_words': 392}