Fix some bugs
This commit is contained in:
parent
345e183e34
commit
15151e53a7
10 changed files with 69 additions and 74 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue