Fix some bugs

This commit is contained in:
Schmelczer András 2020-08-07 18:12:53 +02:00
parent 345e183e34
commit 15151e53a7
10 changed files with 69 additions and 74 deletions

View file

@ -1,8 +1,7 @@
import { vec2, vec3 } from 'gl-matrix';
import { vec2 } from 'gl-matrix';
import { Physics } from '../../physics/physics';
import { Objects } from '../objects';
import { Tunnel } from '../types/tunnel';
import { Physics } from '../../physics/physics';
import { GameObject } from '../game-object';
export const createDungeon = (objects: Objects, physics: Physics): Tunnel => {
let previousRadius = 350;
@ -10,7 +9,7 @@ export const createDungeon = (objects: Objects, physics: Physics): Tunnel => {
let first: Tunnel;
for (let i = 0; i < 1; i += 500) {
for (let i = 0; i < 50000; i += 500) {
const deltaHeight = (Math.random() - 0.5) * 2000;
const height = previousEnd.y + deltaHeight;
const currentEnd = vec2.fromValues(i, height);