-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.js
More file actions
71 lines (64 loc) · 1.99 KB
/
Copy pathmain.js
File metadata and controls
71 lines (64 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
require([
'viz'
],function(
viz
){
'use strict';
function launchVapor(){
viz({
useFog: false,
landColours: [0x00ffff, 0xffffff, 0xffaadd, 0xff99cc, 0x00ffff, 0xff69b4, 0xff69b4],
wireframeOverlay: true,
spotlightColour: 0xff69b4,
includeDetail: false,
waterColour: 0x00ffff,
skyMap: 'img/vapor.png',
cameraHeight: 10,
mp3Url: 'mp3/starworshipper.mp3',
landscapeType: 'inverted'
});
}
function launchVolcano(){
viz({
fogColour: 0x000000,
fogMinimumDistance: 200,
landColours: [0x221111, 0x442222, 0x9C2A00, 0xcf5f10, 0xCF1020, 0xCF1020, 0xcf5f10],
spotlightColour: 0xa08f65,
includeDetail: true,
detailType: 'light',
waterColour: 0x9C2A00,
skyMap: 'img/cracks.jpg',
cameraHeight: 30,
mp3Url: 'mp3/move-around.mp3'
});
}
function launchHills(){
viz({
fogColour: 0xfff5ac,
fogMinimumDistance: 700,
landColours: [0x339900, 0x72B84F, 0xCCE5BF, 0xE5F2DF, 0xF2F8EF, 0xFFFFFF, 0xEFDD6F],
spotlightColour: 0xa08f65,
includeDetail: true,
detailType: 'tree',
waterColour: 0x40a4df,
skyMap: 'img/sky.jpg',
cameraHeight: 5,
mp3Url: 'mp3/morning-mood-grieg.mp3'
});
}
function handleClick(){
var introNode = document.querySelector('.intro');
document.body.removeChild(introNode);
if(this.className.indexOf('volcano') > -1){
return launchVolcano();
}
if(this.className.indexOf('vapor') > -1){
return launchVapor();
}
launchHills();
}
var links = Array.apply(null, document.querySelectorAll('.launch'));
links.forEach(function(link){
link.addEventListener('click', handleClick, false);
});
});