Хабрахабр

Создание браузерных 3d-игр с нуля на чистом html, css и js. Часть 2/2

// 1 уровень mapArray[0] = [ //основание [0,0,1000,0,180,0,2000,200,"#F0C0FF"], [0,0,-1000,0,0,0,2000,200,"#F0C0FF"], [1000,0,0,0,-90,0,2000,200,"#F0C0FF"], [-1000,0,0,0,90,0,2000,200,"#F0C0FF"], [0,100,0,90,0,0,2000,2000,"#EEEEEE"], //1 [-700,0,-800,0,180,0,600,200,"#F0C0FF"], [-700,0,-700,0,0,0,600,200,"#F0C0FF"], [-400,0,-750,0,90,0,100,200,"#F0C0FF"], //2 [100,0,-800,0,180,0,600,200,"#F0C0FF"], [50,0,-700,0,0,0,500,200,"#F0C0FF"], [400,0,-550,0,90,0,500,200,"#F0C0FF"], [-200,0,-750,0,-90,0,100,200,"#F0C0FF"], [300,0,-500,0,-90,0,400,200,"#F0C0FF"], [350,0,-300,0,0,0,100,200,"#F0C0FF"], //3 [700,0,-800,0,180,0,200,200,"#F0C0FF"], [700,0,500,0,0,0,200,200,"#F0C0FF"], [700,0,-150,0,90,0,1100,200,"#F0C0FF"], [600,0,-150,0,-90,0,1300,200,"#F0C0FF"], [800,0,-750,0,90,0,100,200,"#F0C0FF"], [800,0,450,0,90,0,100,200,"#F0C0FF"], [750,0,400,0,180,0,100,200,"#F0C0FF"], [750,0,-700,0,0,0,100,200,"#F0C0FF"], //4 [850,0,-100,0,180,0,300,200,"#F0C0FF"], [850,0,0,0,0,0,300,200,"#F0C0FF"], //5 [400,0,300,0,90,0,800,200,"#F0C0FF"], [300,0,300,0,-90,0,800,200,"#F0C0FF"], [350,0,-100,0,180,0,100,200,"#F0C0FF"], //6 [400,0,800,0,0,0,800,200,"#F0C0FF"], [450,0,700,0,180,0,700,200,"#F0C0FF"], [800,0,750,0,90,0,100,200,"#F0C0FF"], [100,0,550,0,90,0,300,200,"#F0C0FF"], [0,0,650,0,-90,0,300,200,"#F0C0FF"], [-100,0,500,0,0,0,200,200,"#F0C0FF"], [-100,0,400,0,180,0,400,200,"#F0C0FF"], [-200,0,750,0,90,0,500,200,"#F0C0FF"], [-300,0,700,0,-90,0,600,200,"#F0C0FF"], //7 [100,0,-250,0,90,0,900,200,"#F0C0FF"], [0,0,-300,0,-90,0,800,200,"#F0C0FF"], [-350,0,200,0,0,0,900,200,"#F0C0FF"], [-350,0,100,0,180,0,700,200,"#F0C0FF"], [-700,0,-50,0,90,0,300,200,"#F0C0FF"], [-800,0,0,0,-90,0,400,200,"#F0C0FF"], [-750,0,-200,0,180,0,100,200,"#F0C0FF"], //8 [-500,0,600,0,90,0,800,200,"#F0C0FF"], [-600,0,600,0,-90,0,800,200,"#F0C0FF"], //9 [-600,0,-500,0,180,0,800,200,"#F0C0FF"], [-650,0,-400,0,0,0,700,200,"#F0C0FF"], [-200,0,-300,0,90,0,400,200,"#F0C0FF"], [-300,0,-300,0,-90,0,200,200,"#F0C0FF"], [-350,0,-100,0,0,0,300,200,"#F0C0FF"], [-400,0,-200,0,180,0,200,200,"#F0C0FF"], [-500,0,-150,0,-90,0,100,200,"#F0C0FF"], //10 [-900,0,500,0,0,0,200,200,"#F0C0FF"], [-900,0,400,0,180,0,200,200,"#F0C0FF"], [-800,0,450,0,90,0,100,200,"#F0C0FF"] ]; thingsArray[0] = [[900,50,-900,0,0,0,50,50,"#FFFF00"], [-400,50,900,0,0,0,50,50,"#FFFF00"], [-400,50,-300,0,0,0,50,50,"#FFFF00"]]; keysArray[0] = [[-100,50,600,0,0,0,50,50,"#FF0000"]]; startArray[0] = [[-900,0,-900,0,0]]; finishArray[0] = [[-900,50,900,0,0,0,50,50,"#00FFFF"]]; // 2 уровень mapArray[1] = [ //основание [0,0,1200,0,180,0,2400,200,"#C0FFE0"], [0,0,-1200,0,0,0,2400,200,"#C0FFE0"], [1200,0,0,0,-90,0,2400,200,"#C0FFE0"], [-1200,0,0,0,90,0,2400,200,"#C0FFE0"], [0,100,0,90,0,0,2400,2400,"#EEEEEE"], //1 [1100,0,-800,0,180,0,200,200,"#C0FFE0"], [1000,0,-900,0,90,0,200,200,"#C0FFE0"], [850,0,-1000,0,180,0,300,200,"#C0FFE0"], [700,0,-950,0,-90,0,100,200,"#C0FFE0"], [800,0,-900,0,0,0,200,200,"#C0FFE0"], [900,0,-700,0,-90,0,400,200,"#C0FFE0"], [750,0,-500,0,180,0,300,200,"#C0FFE0"], [600,0,-450,0,-90,0,100,200,"#C0FFE0"], [800,0,-400,0,0,0,400,200,"#C0FFE0"], [1000,0,-550,0,90,0,300,200,"#C0FFE0"], [1100,0,-700,0,0,0,200,200,"#C0FFE0"], //2 [800,0,-200,0,180,0,800,200,"#C0FFE0"], [400,0,-300,0,90,0,200,200,"#C0FFE0"], [300,0,-400,0,180,0,200,200,"#C0FFE0"], [200,0,-700,0,90,0,600,200,"#C0FFE0"], [50,0,-1000,0,180,0,300,200,"#C0FFE0"], [-100,0,-950,0,-90,0,100,200,"#C0FFE0"], [0,0,-900,0,0,0,200,200,"#C0FFE0"], [100,0,-600,0,-90,0,600,200,"#C0FFE0"], [200,0,-300,0,0,0,200,200,"#C0FFE0"], [300,0,-200,0,-90,0,200,200,"#C0FFE0"], [750,0,-100,0,0,0,900,200,"#C0FFE0"], //3 [500,0,-950,0,90,0,500,200,"#C0FFE0"], [450,0,-700,0,0,0,100,200,"#C0FFE0"], [400,0,-950,0,-90,0,500,200,"#C0FFE0"], //4 [-700,0,-600,0,0,0,1000,200,"#C0FFE0"], [-200,0,-500,0,-90,0,200,200,"#C0FFE0"], [-300,0,-400,0,180,0,200,200,"#C0FFE0"], [-400,0,-250,0,-90,0,300,200,"#C0FFE0"], [-350,0,-100,0,0,0,100,200,"#C0FFE0"], [-300,0,-200,0,90,0,200,200,"#C0FFE0"], [-200,0,-300,0,0,0,200,200,"#C0FFE0"], [-100,0,-500,0,90,0,400,200,"#C0FFE0"], [-650,0,-700,0,180,0,1100,200,"#C0FFE0"], //5 [-300,0,-850,0,90,0,300,200,"#C0FFE0"], [-350,0,-1000,0,180,0,100,200,"#C0FFE0"], [-400,0,-850,0,-90,0,300,200,"#C0FFE0"], //6 [-600,0,-1050,0,90,0,300,200,"#C0FFE0"], [-650,0,-900,0,0,0,100,200,"#C0FFE0"], [-700,0,-1050,0,-90,0,300,200,"#C0FFE0"], //7 [-900,0,-850,0,90,0,300,200,"#C0FFE0"], [-950,0,-1000,0,180,0,100,200,"#C0FFE0"], [-1000,0,-850,0,-90,0,300,200,"#C0FFE0"], //8 [-600,0,-250,0,90,0,700,200,"#C0FFE0"], [-650,0,100,0,0,0,100,200,"#C0FFE0"], [-700,0,-250,0,-90,0,700,200,"#C0FFE0"], //9 [-900,0,-150,0,90,0,900,200,"#C0FFE0"], [-500,0,300,0,180,0,800,200,"#C0FFE0"], [-100,0,650,0,90,0,700,200,"#C0FFE0"], [-300,0,1000,0,0,0,400,200,"#C0FFE0"], [-500,0,950,0,-90,0,100,200,"#C0FFE0"], [-350,0,900,0,180,0,300,200,"#C0FFE0"], [-200,0,650,0,-90,0,500,200,"#C0FFE0"], [-600,0,400,0,0,0,800,200,"#C0FFE0"], [-1000,0,-100,0,-90,0,1000,200,"#C0FFE0"], //10 [-300,0,200,0,90,0,200,200,"#C0FFE0"], [-350,0,100,0,180,0,100,200,"#C0FFE0"], [-400,0,200,0,-90,0,200,200,"#C0FFE0"], //11 [-800,0,600,0,180,0,800,200,"#C0FFE0"], [-400,0,650,0,90,0,100,200,"#C0FFE0"], [-800,0,700,0,0,0,800,200,"#C0FFE0"], //12 [-700,0,1050,0,90,0,300,200,"#C0FFE0"], [-850,0,900,0,180,0,300,200,"#C0FFE0"], [-1000,0,950,0,-90,0,100,200,"#C0FFE0"], [-900,0,1000,0,0,0,200,200,"#C0FFE0"], [-800,0,1100,0,-90,0,200,200,"#C0FFE0"], //13 [1050,0,700,0,180,0,300,200,"#C0FFE0"], [900,0,800,0,-90,0,200,200,"#C0FFE0"], [550,0,900,0,180,0,700,200,"#C0FFE0"], [200,0,650,0,90,0,500,200,"#C0FFE0"], [300,0,400,0,0,0,200,200,"#C0FFE0"], [400,0,300,0,90,0,200,200,"#C0FFE0"], [550,0,200,0,0,0,300,200,"#C0FFE0"], [700,0,150,0,90,0,100,200,"#C0FFE0"], [500,0,100,0,180,0,400,200,"#C0FFE0"], [300,0,200,0,-90,0,200,200,"#C0FFE0"], [200,0,300,0,180,0,200,200,"#C0FFE0"], [100,0,650,0,-90,0,700,200,"#C0FFE0"], [550,0,1000,0,0,0,900,200,"#C0FFE0"], [1000,0,900,0,90,0,200,200,"#C0FFE0"], [1100,0,800,0,0,0,200,200,"#C0FFE0"], //14 [700,0,700,0,90,0,400,200,"#C0FFE0"], [850,0,500,0,0,0,300,200,"#C0FFE0"], [1000,0,300,0,90,0,400,200,"#C0FFE0"], [950,0,100,0,180,0,100,200,"#C0FFE0"], [900,0,250,0,-90,0,300,200,"#C0FFE0"], [750,0,400,0,180,0,300,200,"#C0FFE0"], [600,0,650,0,-90,0,500,200,"#C0FFE0"], //15 [500,0,600,0,180,0,200,200,"#C0FFE0"], [400,0,650,0,-90,0,100,200,"#C0FFE0"], [500,0,700,0,0,0,200,200,"#C0FFE0"] ]; thingsArray[1] = [[1100,50,900,0,0,0,50,50,"#FFFF00"], [500,50,800,0,0,0,50,50,"#FFFF00"], [-800,50,-500,0,0,0,50,50,"#FFFF00"], [-900,50,1100,0,0,0,50,50,"#FFFF00"], [-1100,50,-800,0,0,0,50,50,"#FFFF00"] ]; keysArray[1] = [[1100,50,-900,0,0,0,50,50,"#FF0000"]]; startArray[1] = [[0,0,0,0,0]]; finishArray[1] = [[-1100,50,-500,0,0,0,50,50,"#00FFFF"]];

Теги
Показать больше

Похожие статьи

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Кнопка «Наверх»
Закрыть