-
Notifications
You must be signed in to change notification settings - Fork 4
/
1mt_webgl.php
executable file
·1432 lines (1063 loc) · 54.2 KB
/
1mt_webgl.php
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<? include("1mt_global_inc.php"); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="ONE MILLIONth TOWER re-imagines the urban landscape, using the magic of cinema, architecture, animation and cutting-edge open-source web technology to transform a dilapidated highrise neighbourhood into a vibrant resident-led community. A documentary set in an HTML5 virtual landscape." />
<meta name="keywords" content="NFB, National Film Board, HTML5, Firefox, WebGL, interactive documentary, Emmy, highrise, highrises, apartments, architecture, animation, google streetview, urban, suburbs,Urban renewal, participatory design, collaboration, resident-led, tenant's rights, imagination, transformation, urban planning, public space, playground, chrome, social innovation" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>NFB - One Millionth Tower</title>
<link rel="stylesheet" href="<?= $media_server_url?>css/style.css" type="text/css" />
<script type="text/javascript" src="<?= $media_server_url?>three/build/Three.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/custom_imageutils.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/custom_JSONLoader.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>three/js/RequestAnimationFrame.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>three/js/Stats.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>three/js/Detector.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>three/js/customQuake_bk.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/tween.js"></script>
<script src="<?= $media_server_url?>popcorn/popcorn.js"></script>
<script src="<?= $media_server_url?>popcorn/plugins/code/popcorn.code.js"></script>
<script src="<?= $media_server_url?>popcorn/plugins/subtitle/popcorn.subtitle.js"></script>
<script src="<?= $media_server_url?>js/subtitle_manager.js"></script>
<script src="<?= $media_server_url?>js/build_timeline_01.js"></script>
<script src="<?= $media_server_url?>js/camera_move.js"></script>
<script src="<?= $media_server_url?>js/tower_utils.js"></script>
<script src="<?= $media_server_url?>js/get_point.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/particles.js"></script>
<script src="<?= $media_server_url?>js/materials.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/terrain_builder.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/create_scenes.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/precipitation.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/video_alpha.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/video_no_alpha.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/html5Preloader.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/preloading.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/constellation.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/fonts/helvetiker_bold.typeface.js"></script>
<script type="text/javascript" src="<?= $media_server_url?>js/text_builder.js"></script>
<script src="<?= $media_server_url?>js/cufon-yui.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/particles_large_01_geese.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/xpath_search.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/main_body_font.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/semantic_data_writer.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/nfb_font.js" type="text/javascript"></script>
<script src="<?= $media_server_url?>js/Helvetica_Neue_Bold_Condensed_700.font.js" type="text/javascript"></script>
<script type="text/javascript">
var GLOBAL_MEDIA_SERVER = "", GLOBAL_MEDIA_SERVER_THINK;
var ffversion;
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
}
if(! ffversion){
GLOBAL_MEDIA_SERVER_THINK = "";
}else{
if(ffversion <9){
GLOBAL_MEDIA_SERVER_THINK = "";
}
}
Cufon.replace('.start_links', { fontFamily: 'Helvetica Neue', hover:true });
Cufon.replace('.default_nav_grey', { fontFamily: 'Helvetica Neue Bold Condensed', hover:true });
Cufon.replace('.footer_links', { fontFamily: 'standard 07_56', hover:true });
//Cufon.replace('.title'); // Requires a selector engine for IE 6-7, see above
</script>
<script src="js/render_engine.js" type="text/javascript"></script>
<script src="js/mouse_control.js" type="text/javascript"></script>
<script type="text/javascript">
//////////////////// 3d engine
function start_everything(_weather_code){
weather_code = parseInt(_weather_code);
if(!weather_code){weather_code=1}
load_img_set(1)
}
var AMOUNT = 100;
var weather_code;
var container
var camera, scene, renderer,projector
var video_play_status = 0;
var pano_mesh;
var height = window.innerHeight-70;
if(height<570){
height = 570
}
var width = window.innerWidth;
var mouseX = 0;
var mouseY = 0;
//var ccX,ccY;
var fov = 75,isUserInteracting = false,
onMouseDownMouseX = 0, onMouseDownMouseY = 0,
lon = 123, onMouseDownLon = 0,
lat = 60, onMouseDownLat = 0,
phi = 0, theta = 0;
var TC_height = -50;
var explore = 0,is_intro = 1,is_outro;
var w_degree=-20;
var objects = [],global_view_mode,tween_array =[]
var videos_alpha =[]
var goose_trigger;
var can_move = true;
var global_pause_state = 0
var maquette_array =[]
var active_maquette;
var material_library
var tc1_complete=0,tc2_complete=0,rv1_complete=0,rv2_complete=0,rv3_complete=0,mk_complete=0,outro_complete=0
window.onresize = function(event) {
height = window.innerHeight-70;
width = window.innerWidth;
renderer.setSize( width, height )
container.style.width = "99%";
container.style.height = height+"px";
//$('#main_menu').css('height', height+"px")
camera.aspect = width/height;
camera.updateProjectionMatrix();
}
var init_3d = function () {
// createScroll("#googlebut", "#googlebutcont", "#google_content_container", "#google_wiki_text");
container = document.getElementById( '3d_screen');
var global_wrapper = document.getElementById( 'global_wrapper');
var startbar = document.getElementById( 'start_box');
var global_footer = document.getElementById( 'global_footer');
container.style.height = height+"px"
global_wrapper.style.height = height+"px"
//$('#main_menu').css('height', height+"px")
camera = new THREE.Camera( 54, width / height, 1, 22000);
camera.position.z = -2000;
camera.position.y = -150;
scene = new THREE.Scene();
renderer = new THREE.WebGLRenderer();
renderer.setClearColor( 0xffffff, 1 );
renderer.sortObjects = false
renderer.setSize( width, height );
container.appendChild( renderer.domElement );
projector = new THREE.Projector();
container.addEventListener( 'mousedown', onDocumentMouseDown, false );
container.addEventListener( 'mousemove', onDocumentMouseMove, false );
container.addEventListener( 'mouseup', onDocumentMouseUp, false );
container.addEventListener( 'mouseout', onDocumentMouseOut, false );
container.addEventListener( 'mouseover', onDocumentMouseOver, false );
//overlays
document.getElementById( 'startbar' ).addEventListener( 'mousedown', onDocumentMouseDown, false );
document.getElementById( 'startbar' ).addEventListener( 'mousemove', onDocumentMouseMove, false );
document.getElementById( 'startbar' ).addEventListener( 'mouseup', onDocumentMouseUp, false );
//document.getElementById( 'live_feed' ).addEventListener( 'mousedown', onDocumentMouseDown, false );
//document.getElementById( 'live_feed' ).addEventListener( 'mousemove', onDocumentMouseMove, false );
//document.getElementById( 'live_feed' ).addEventListener( 'mouseup', onDocumentMouseUp, false );
//document.getElementById( 'main_menu' ).addEventListener( 'mousedown', onDocumentMouseDown, false );
//document.getElementById( 'main_menu' ).addEventListener( 'mousemove', onDocumentMouseMove, false );
//document.getElementById( 'main_menu' ).addEventListener( 'mouseup', onDocumentMouseUp, false );
document.getElementById( 'main_story_dashboard' ).addEventListener( 'mouseover', main_story_dashboard_mouse_over, false );
document.getElementById( 'main_story_dashboard' ).addEventListener( 'mouseout', main_story_dashboard_mouse_out, false );
global_footer.addEventListener( 'mouseup', onDocumentMouseUp, false );
container.addEventListener( 'dblclick', onDocumentDoubleClick, false );
container.addEventListener( 'rightclick', onDocumentRightClick, false );
document.addEventListener( 'keydown', onKeyDown, false );
document.addEventListener( 'keyup',onKeyUp, false );
startbar.addEventListener( 'mousemove', onStartBarMouseOver, false );
startbar.addEventListener( 'mouseout', onStartBarMouseOut, false );
global_footer.addEventListener( 'mousemove', onFooterBarMouseOver, false );
container.style.cursor="move"
if(height<570){
document.getElementById('startbar').style.top= "0px"
}
material_library = new MaterialLibrary()
material_library.load_materials();
scene.fog = new THREE.FogExp2( material_library.fog_color, material_library.fog_density);
terrain_builder()
document.getElementById('bells').volume=0
document.getElementById('audio').volume=0
document.getElementById('geese').volume=0
document.getElementById('audio').play()
document.getElementById('bells').play()
document.getElementById('geese').play()
console.log(material_library.weather_condition)
if(material_library.weather_condition =="night"){
document.getElementById('audio').src="<?= $media_server_url?>videos/ambient/ambient_night.ogg"
document.getElementById('audio').play()
}
if(material_library.weather_condition =="rain"){
document.getElementById('audio').src="<?= $media_server_url?>videos/ambient/ambient_rain.ogg"
document.getElementById('audio').play()
}
if(material_library.weather_condition =="snow"){
document.getElementById('audio').src="<?= $media_server_url?>videos/ambient/ambient_snow.ogg"
document.getElementById('audio').play()
}
var dummy = { v: document.getElementById('audio').volume};
new TWEEN.Tween( dummy ).to( { v: .7 }, 3000 )
.onUpdate( function() {
document.getElementById('audio').volume = this.v
})
.start();
var dummy = { v: document.getElementById('bells').volume};
new TWEEN.Tween( dummy ).to( { v: .6 }, 3000 )
.onUpdate( function() {
document.getElementById('bells').volume = this.v
})
.delay(3000)
.start();
if(material_library.weather_condition !="night"){
var dummy = { v: document.getElementById('geese').volume};
new TWEEN.Tween( dummy ).to( { v: .3 }, 3000 )
.onUpdate( function() {
document.getElementById('geese').volume = this.v
})
.delay(5000)
.start();
}
}
function animate() {
requestAnimationFrame( animate );
if(global_pause_state == 0 || global_pause_state == 2){
TWEEN.update();
render();
//stats.update();
}
}
function createScroll(scrollbut, scrollbutcont, scrollcontainer, scrollinner) {
$(scrollbut).draggable({
axis : 'y',
containment : 'parent',
helper : function() {
return $(scrollbut).clone().css('opacity', 0)
}
});
var scrollheight = $(scrollcontainer).height() - $(scrollinner).height();
var scrollbarheight = $(scrollbutcont).height() - $(scrollbut).height();
var offset = scrollheight / scrollbarheight;
$(scrollbut).bind("drag", function(event, ui) {
$(scrollbut).stop().animate({
top : ui.helper.position().top,
easing : 'easeOutQuad'
}, 500, function() {
//animation complete
});
$(scrollinner).stop().animate({
marginTop : (-ui.helper.position().top * offset)/2,
easing : 'easeOutQuad'
}, 500, function() {
//animation complete
});
});
}
</script>
<script src="js/jquery.js"></script>
<script src="js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script type='text/javascript' src='js_autosuggest/jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="js_autosuggest/jquery.autocomplete.css" />
<script>
/////////////////////COUNTRY SELECTOR
function pre_start(){
if(document.getElementById('country_global').value != "Type in the name of a country, any country"){
set_var("chosen_land",document.getElementById('country_global').value);
}else{
set_var("chosen_land","Italy");
}
tracking_section ="explore/"
var tracking_url = track_base+tracking_section
track_this('flythru')
//piwikTracker.setCustomUrl(tracking_url )
// piwikTracker.trackPageView();
start()
}
function pre_start_linear(){
tracking_section ="justwatch/"
//var tracking_url = track_base+tracking_section
//piwikTracker.setCustomUrl(tracking_url )
//piwikTracker.trackPageView();
camera.position.y = -100
do_linear = 1
track_this('justwatch')
set_var("chosen_land","Italy");
start()
}
function findValue(li) {
if( li == null ) return alert("No match!");
if( !!li.extra ) var sValue = li.extra[0];
else var sValue = li.selectValue;
document.getElementById('enter_btn').style.display="block"
set_var("chosen_land",sValue)
//get_xpath(sValue)
}
function selectItem(li) {
findValue(li);
}
function formatItem(row) {
return row[0] ;
}
function searchKeyPress(e)
{
// look for window.event in case event isn't passed in
if (window.event) { e = window.event; }
if (e.keyCode == 13)
{
set_var("chosen_land",document.getElementById("country_global").value)
document.getElementById("results_id").style.display="none"
move_to_OUTRO_2()
}
}
$(document).ready(function() {
$("#country_global").autocomplete(
"js_autosuggest/search_xml.php",
{
delay:10,
minChars:1,
matchSubset:1,
cacheLength:10,
onItemSelect:selectItem,
onFindValue:findValue,
autoFill:true,
maxItemsToShow:10
}
);
});
</script>
</head>
<body onLoad="" style="margin:0">
<!--------------------------IFRAMES ---------------------------------->
<?
global $onfb_ntpg_app;
$onfb_ntpg_app = "interactive";
onfb_smart_navbar_print();
?>
<div id="3d_screen" style="display:none;position:absolute;top:35px;width:99%;height:100%;z-index:2"></div>
<iframe name="code_run" src="blank.php" style="display:none"></iframe>
<div id="global_wrapper" style="position:absolute;top:35px;width:100%">
<iframe id="street_view_underlay" frameborder="0" allowtransparency="true" src="blank.php" style="background:transparent;opacity: 100;display:none;position:absolute;width:100%;height:100%;overflow:hidden;z-index:1"></iframe>
<iframe id="streetview_inset" scrolling="no" frameborder="0" src="blank.php" style="display:none;position:absolute;z-index:6000;width:800px;height:500px;opacity: 0;overflow:hidden"></iframe>
<iframe id="page_overlay" frameborder="0" allowtransparency="true" src="blank.php" style="background:transparent;display:none;position:absolute;width:100%;height:100%;z-index:7999;"></iframe>
<iframe id="weather" scrolling="no" allowtransparency="true" frameborder="0" src="yahoo_rss_reader.php" style="display:none;position:fixed;bottom:35px;right:0px;z-index:1001;height:90px;width:300px;overflow:hidden"></iframe>
<div class="footer_links" style="display:block;position:absolute;top:0;z-index:5000;pointer-events:none" id="timecode"></div>
<div id="breadcrumbs">
<center>
<table width=170>
<tr>
<td><a href="javascript:move_to_TC();"><img id="bread_crumbs_tc1" src ="images/breadcrumbs/tc.png" border=0></a></td>
<td><a href="javascript:move_to_RV();"><img id="bread_crumbs_rv1" src ="images/breadcrumbs/ravine.png" border=0></a></td>
<td><a href="javascript:move_to_GV1();"><img id="bread_crumbs_rv2"src ="images/breadcrumbs/ravine.png" border=0></a></td>
<td><a href="javascript:move_to_GV2();"><img id="bread_crumbs_rv3" src ="images/breadcrumbs/ravine.png" border=0></a></td>
<td><a href="javascript:move_to_MK();"><img id="bread_crumbs_mk" src ="images/breadcrumbs/mk.png" border=0></a></td>
<td><a href="javascript:move_to_CHOOSE_A_COUNTRY();"><img id="bread_crumbs_outro" src ="images/breadcrumbs/outro.png" border=0></a></td>
<td width=20></td>
<td>
<div id="special_feature_btns" style="display:none">
<table width=80>
<tr>
<td><a href="javascript:move_to_IMAGINE()"><img id="bread_crumbs_sf1" src ="images/breadcrumbs/sf_01.png" border=0></a></td>
<td><a href="javascript:move_to_LIVING_PROOF()"><img id="bread_crumbs_sf2" src ="images/breadcrumbs/sf_02.png" border=0></a></td>
<td><a href="javascript:move_to_HIGHRISE();"><img id="bread_crumbs_sf3" src ="images/breadcrumbs/sf_01.png" border=0></a></td>
<td><a href="javascript:move_to_TECH()"><img id="bread_crumbs_sf4"src ="images/breadcrumbs/sf_02.png" border=0></a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
<!-- MAIN DASHBOARD -->
<div id="lat_long_text" style="display:none"></div>
<div id="debug_fireworks"><!--<a href="javascript:go_green()">green</a>--></div>
<div id="sidebar">
<!--<a href="javascript:close_help()"><img src="images/white_x.png"></a>-->
<div id="debug_text"></div>
<div id="sidebar_inner">
<div id="camera_controller"></div>
</div>
</div>
<!-- TOP DASH -->
<div id="main_story_dashboard" onmouseover="stop_spin()" onMouseOut="start_spin()">
<div id="btn_go_menu" onclick='javascript:load_menu()'><a class="bold_font_12_white" href="javascript:load_menu();">STORY MENU</a></div>
<div id="btn_skip_video" style="display:none; width:100%;margin-top:10px;font-size:15px"><table><tr><td><a class="bold_font_12" href="javascript:go_explore();">CLOSE</a></span></td><td><a class="default_nav_white" href="javascript:go_explore();">X</a></td></tr></table></div>
<div id="btn_stop_video" style="text-align:right;padding-right:10px" onclick="track_exit_event();go_explore()"><a id="control_label" class="bold_font_12" href="#">X</a></div>
<div id="btn_stop_video_linear" style="text-align:right;padding-right:10px" onclick="load_menu()"><a id="control_label_" class="bold_font_12" href="#"> STOP X</a></div>
<div id="btn_close_menu" style="display:none"><a class="bold_font_12" href="javascript:close_menu();">CLOSE X</a></div>
<div id="btn_close_google" style="display:none;padding:0"><a href="javascript:uncreate_google_pano();"><img src="images/return_to_1mt_3d.jpg" border=0></a></div>
<div id="btn_close_google_linear" style="display:none"><a class="bold_font_12" href="javascript:load_menu();"><img src="images/return_to_1mt_3d.jpg" border=0></a></div>
<div id="progress_header_sf" style="margin-top:10px">
<div style="float:left">
<div id="bar-holder_sf">
<div id="progress_bar_timeline_sf" style="pointer-events:none;background-color:#fff;opacity:.8;position:absolute;right:0px;top:0px;height:8px;z-index:400;width:100%"></div>
<div class="long-bar" style="cursor:none" id="light-blue-grey"></div>
</div>
</div>
<div id="timer_sf" class="normal_font_10" style="margin-top:-4px;margin-left:5px;float:left;font-size:10px;"></div>
</div>
<div id="progress_header">
<div style="float:left">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<div id="track-btn-holder">
<div id="track_backward" class="track-btns"><a href="javascript:track_previous()" onMouseOver="progressAct('rewind')" onMouseOut="progressInact('rewind')"><img name="rewind" src="images/track-rewind.png" /></a></div>
<div id='track_play' class="track-btns" style="display:none"><a href="javascript:track_play()" onMouseOver="progressAct('play')" onMouseOut="progressInact('play')"><img name="play" src="images/track-play.png" /></a></div>
<div id='track_pause' class="track-btns"><a href="javascript:track_pause()" onMouseOver="progressAct('pause')" onMouseOut="progressInact('pause')"><img name="pause" src="images/track-pause.png" /></a></div>
<div id="track_forward" class="track-btns"><a href="javascript:track_next()" onMouseOver="progressAct('fastForward')" onMouseOut="progressInact('fastForward')"><img name="fastForward" src="images/track-fast-forward.png" /></a></div>
</div>
</td>
</tr>
<tr>
<td align="center">
<div id="bar-holder" onMouseOut="setInvisibility()">
<div id="progress_bar_timeline" style="pointer-events:none;background-color:#ffffff;opacity:.5;position:absolute;right:0px;top:0px;height:8px;z-index:400;width:100%"></div>
<div class="long-bar" id="black-text"></div>
<div onClick="start_timeline()" onMouseOver="setVisibility('block','3','Introduction')" onMouseOut="setInvisibility()" class="long-bar" id="linear_intro"></div>
<div onClick="move_to_TC()" onMouseOver="setVisibility('block','74','Tennis Court')" class="long-bar" id="linear_tc"></div>
<div onClick="move_to_RV()" onMouseOver="setVisibility('block','120','Ravine')" class="long-bar" id="linear_rv"></div>
<div onClick="move_to_MK()" onMouseOver="setVisibility('block','218','Parking Lot')" class="long-bar" id="linear_mk"></div>
<div onClick="move_to_OUTRO()" onMouseOver="setVisibility('block','305','Whole World')" class="long-bar" id="linear_ot"></div>
</div><!--bar-holder-->
</td>
</tr>
</table>
</div>
<div id="timer" class="normal_font_10" style="margin-left:5px;margin-top:12px;float:left;font-size:10px;"></div>
</div><!--end header-->
</div><!-- end dash -->
<!-- MORE BUTTONS AND OVERLAYS -->
<div onmouseover="stop_spin()" onMouseOut="start_spin()" id="subtitles_toggle" style="position:fixed;bottom:35px; z-index:602;">
<div id="subtitles_links" style="padding-left:10px; margin-bottom:20px;display:none;background:url(images/sidebar_bg_white.png) repeat">
<table width=100%>
<tr>
<td valign=top>
</td>
<td valign=top>
<a href="#" onclick="$('#subtitles_links').css('display', 'none')" class="bold_font_12">X</a>
</td>
</tr>
<tr>
<td valign=top>
<a href="javascript:load_gl_subtitles('en')" class="bold_font_12">ENGLISH</a>
<br>
<a href="javascript:load_gl_subtitles('fr')" class="bold_font_12">FRANCAIS</a>
<br>
<a href="javascript:unload_subtitles()" class="bold_font_12">SUBTITLES OFF</a>
<br>
<a href="javascript:load_external('http://www.universalsubtitles.org/en/teams/HIGHRISE/')" class="bold_font_12">HELP US TRANSLATE INTO YOUR LANGUAGE</a>
<br>
</td>
<td valign=top>
</td>
</tr>
</table>
</div>
<a onmouseover="stop_spin()" onMouseOut="start_spin()" id="btn_subtitles" style="padding-left:10px;padding-top:5px;width:150px;height:25px;display:none;background:url(images/sidebar_bg_white.png) repeat" href="#" onclick="$('#subtitles_links').css('display', 'block')" class="bold_font_12">SUBTITLES</a>
</div>
<div id="subtitle-container" class="subtitle_font">
</div>
<script type="text/javascript" language="JavaScript">
if (document.images){
var rewindOff = new Image();
rewindOff.src = "images/track-rewind.png";
var rewindOn = new Image();
rewindOn.src = "images/track-rewind-hover.png";
var playOff = new Image();
playOff.src = "images/track-play.png";
var playOn = new Image();
playOn.src = "images/track-play-hover.png";
var fastForwardOff = new Image();
fastForwardOff.src = "images/track-fast-forward.png";
var fastForwardOn = new Image();
fastForwardOn.src = "images/track-fast-forward-hover.png";
var pauseOff = new Image();
pauseOff.src = "images/track-pause.png";
var pauseOn= new Image();
pauseOn.src = "images/track-pause-hover.png";
}
function progressAct(imgName){
if (document.images)
document.images[imgName].src = eval(imgName + "On.src");
}
function progressInact(imgName){
if (document.images)
document.images[imgName].src= eval(imgName + "Off.src");
}
function setVisibility(visibility,offset, txt){
document.getElementById('black-text').style.display = "block";
document.getElementById('black-text').style.left=offset-15+"px"
document.getElementById('black-text').innerHTML = txt
}
function setInvisibility(){
document.getElementById('black-text').style.display = "none";
}
function track_pause(){
pause_video()
document.getElementById('track_play').style.display = "block";
document.getElementById('track_pause').style.display = "none";
}
function track_play(){
resume_scene()
document.getElementById('track_play').style.display = "none";
document.getElementById('track_pause').style.display = "block";
}
</script>
<script>
function check_input(obj){
//switch_camera("railed")
//document.getElementById('enter_btn').style.display="none"
obj.focus();
if(obj.value=="Type in the name of a country, any country"){
obj.value =""
}
}
</script>
<div id="landscape" class="normal_font_10" style="display:none;position:absolute;top:170px; left:610px; z-index:500;width:220px">
This documentary was built using new open source technologies: HTML5, webGL and Mozilla's Popcorn.
</div>
<div id="friends" class="normal_font_10" style="display:none;position:absolute;top:270px; left:610px; z-index:500">
Jim Guthrie + Owen Pallett<br>
Ob, Priti, Faith, Jamal<br>
Graeme Stewart<br>
E.R.A. Architects<br>
Heather Frise<br>
Howie Shia, Lilian Chan<br>
+ Kelly Sommerfeld<br>
Branden Bratuhin<br>
Sarah Arruda<br>
Maria-Saroja Ponnambalam<br>
Gerry Flahive<br>
Silva Basmajian<br>
</div>
<div id="explore_text" class="normal_font_10" style="display:none;position:absolute;top:380px; left:610px; z-index:500;width:210px">
EXPLORE the full documentary on your own.
Walk and click through a virtual neighbourhood
to unleash stories of imagination on six locations.
</div>
<div id="linear_text" class="normal_font_10" style="display:none;position:absolute;top:460px; left:610px; z-index:500;width:193px">
Sit back and watch the full six minute
documentary unfold in an animated virtual space.
</div>
<div id="standard_text" class="normal_font_10" style="display:none;position:absolute;top:480px; left:610px; z-index:500;width:193px">
Watch the same story in the standard,
non-interactive non-experimental version.
</div>
<!-- START BAR -->
<div id="startbar" style="display:none; padding:10px; background:url(images/sidebar_bg_white.png) repeat">
<div id="title_container">
<div id="highrise_presents" style="display:none;position:absolute;top:0">
<img src="images/highrise_project.png">
</div>
<div id="1mtlogo" style="display:none;position:absolute;top:0"><img src="images/1mt_logo_clear_webgl.png">
</div>
</div>
<!-- 1mt text -->
<div id="1mttext" style="display:none;">
<div class="heavy_font_16 doc_intro">
an interactive documentary <a onMouseOver="$('#landscape').fadeIn(500, function() {})" onMouseOut="$('#landscape').fadeOut(500, function() {})" href="#">experiment</a>
<br>
by Katerina Cizek, Mike Robbins + friends
</div>
<div class="heavy_font_11 doc_intro">
music by Jim Guthrie, Owen Pallet
</div>
<div class="normal_font_11" style="width:512px">
<p>
You see them all over the world. More than a billion of us live in highrises. But most of these low- and middle-income buildings are now aging and falling into disrepair. </p>
<p>
Could life in the global highrise be different?
</p>
<p>
Take an interactive journey through a virtual landscape,
where the power of imagination transforms spaces - and lives.
</p>
</div>
</div>
<!-- 1mt text -->
<!-- start box -->
<div id="start_box" style="display:none;">
<div id="enter_btn">
<div id="enter_progress" style="text-align:left;height:20px; margin-bottom:15px; width:531px;" class="enter_btn_01"></div>
<div style="width:531px; height:20px;text-align:right;">
<a id="explore_text_btn" style="display:none;margin-right:5px; position:relative; top:3px;" class="bold_font_14" href="javascript:pre_start()" onMouseOver="$('#explore_text').fadeIn(100, function() {})" onMouseOut="$('#explore_text').fadeOut(100, function() {})">EXPLORE >></a>
</div>
<div id="watch_text_btn" style="margin-top:20px;height:20px;display:none" class="enter_btn_01">
<a class="bold_font_14" href="javascript: pre_start_linear()">or</a> <a class="bold_font_14" href="javascript:pre_start_linear()" onMouseOver="$('#linear_text').fadeIn(100, function() {})" onMouseOut="$('#linear_text').fadeOut(100, function() {})">JUST WATCH >></a>
</div>
</div>
</div>
<!-- start box -->
</div>
<div id="choose_country">
<div id="btn_close_choose" style="width:100%;text-align:right"><a href="javascript:resume_outro()" class="bold_font_12">X</a></div>
<div class="bold_font_14">CHOOSE A COUNTRY</div>
<div class="normal_font_12">And we'll connect this story to the whole world.</div>
<br />
<div id="choose_country_input">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<input style="margin:10px 0 0 10px; width:400px; border:none" onkeypress="searchKeyPress(event);" onclick="check_input(this)" style="width:200px" id="country_global" value="Type in the name of a country, any country"/>
</td>
<td align=right>
<div style="margin:10px 10px 0 10px;" id="enter_btn2"><a href="#" onClick="javascript:move_to_OUTRO_2()"><img width=100 src="images/enter_text.png" border=0></a></div>
</td>
</tr>
</table>
</div>
</div>
<script>
function hide_choose_country(){
$('#choose_country').fadeOut(500, function() {})
}
function show_country(){
$('#country').fadeIn(500, function() {})
}
function hide_country(){
$('#country').fadeOut(1000, function() {})
}
function show_feeds(){
$('#live_feeds').fadeIn(1000, function() {})
}
function hide_feeds(){
$('#live_feed').fadeOut(1000, function() {})
}
var menu_is_loaded =0
function load_menu(){
menu_is_loaded = 1
unbuild_maps()
$('#startbar').hide();
$('#text_use_keyboard').fadeOut(1000, function() {})
$('#share_btns').fadeOut(1000, function() {})
$('#btn_go_menu').fadeOut(1000, function() {})
$('#live_feed').fadeOut(1000, function() {})
$('#main_menu_div').fadeIn(1000, function() {})
$("#choose_country").css('display', 'none');
$('#btn_stop_video_linear').fadeOut(1000, function() {})
$('#breadcrumbs').css('display', 'none')
$('#progress_header_sf').fadeOut(1000, function() {})
//$("#progress_header_sf").css('display', 'none');
if(is_looking_at_google){
//$('#progress_header').fadeIn(1000, function() {})
$('#btn_close_google').fadeOut(1000, function() {})
$('#btn_close_google_linear').fadeOut(1000, function() {})
$('#btn_close_menu').fadeIn(1000, function() {})
uncreate_google_pano()
}else{
$('#btn_close_menu').fadeIn(1000, function() {})
if(do_linear==0){
pause()
}else{
$('#progress_header').fadeOut(1000, function() {})
pause_video()
}
}
}
function close_menu(){
console.log("close"+ is_intro + ":" + is_looking_at_google)
menu_is_loaded = 0
if(do_linear==1 && !is_looking_at_google){
$('#progress_header').fadeIn(1000, function() {})
if(is_intro!=1){
resume_scene()
}
if(is_intro_video==1){
INTRO_mesh.visible=true
start_timeline()
}
}
if(do_linear == 0 && !enter_has_cleared){
$('#breadcrumbs').css('display', 'block')
if(is_outro==1){
resume_scene()
}
}
if(do_linear != 1 && is_intro_video==1){
resume_scene()
}
$('#btn_go_menu').fadeIn(1000, function() {})
$('#btn_close_menu').fadeOut(1000, function() {})
$('#main_menu_div').fadeOut(1000, function() {})
}
</script>
<!---flythru text--->
<div id="intro_text_1" class="normal_font_12 intro_block">Welcome to the One Millionth Tower. <br> A virtual landscape.</div>
<div id="intro_text_2" class="normal_font_12 intro_block">A real highrise neighbourhood in Toronto, Canada, re-imagined. <br>But this could be almost anywhere.</div>
<div id ="breadcrumbs_text" class="normal_font_12 intro_block">
Discover six stories <br>
to unleash imagination on this neighbourhood.
</div>
<div id="next_step_pane" class="normal_font_12 intro_block" style="width:800px; margin-left:-400px">
You have discovered 6 stories that re-imagine this neighbourhood.
<br>
Now find 4 special features to go behind the scenes.
</div>
<div id="text_use_keyboard" style="top:40px;" class="normal_font_12 intro_block">To "look" around, use your mouse.<br> To "walk" around, use the arrow keys on your keyboard</div>
<div id="google_maps_desc" style="display:none;">
<div class='heavy_font_16'>WORLD OF HIGHRISES</div>
<div class='normal_font_10' id="google_caption"></div>
</div>
<div id="google_maps_side" style="left:30px">
<div class='bold_font_12' style="min-width:340px;max-width:400px;padding:5px;margin-bottom:5px;background:url(images/sidebar_bg_white.png)repeat;font-size:30px;line-height:30px;text-align:left;" id="google_caption_title">ITALY/Naples</div>
<div id="google_maps_side_inner" style="display:none">
<div style="width:100%;">
<div class='bold_font_12' style="float:left;font-size:20px">Wikipedia:</div>
<a class='bold_font_12' id="google_article_close" style="float:right;font-size:20px" href="#" onClick="javascript:$('#google_content_container').hide();javascript:$('#google_article_open').show();javascript:$('#google_article_close').hide();">X</a>
<a class='bold_font_12' id="google_article_open" style="display:none;float:right;font-size:20px" href="#" onClick="javascript:$('#google_content_container').show();javascript:$('#google_article_open').hide();javascript:$('#google_article_close').show();">></a>
<div style="clear:both;"></div>
</div>
<div id="google_content_container" style="height:400px;width:330px;overflow:auto;">
<div class='normal_font_10' id ="google_wiki_text" style="width:280px;padding-top:10px;overflow:hidden;text-align:left"></div>
</div>
</div>
</div>
<div id="google_maps_list" style="display:none;width:320px;">
<div>
<br>
<script>
get_countries();
</script>
</div>
</div>
<div class="" id="google_label" style="position:absolute;z-index:6001;display:none;text-align:left; width:600px" >Italy/Rome</div>
<div id="suggest_highrise" style="display:none" class="enter_btn_01">
<a style="font-size:20px" class="bold_font_12" onClick="set_google_form();$('#suggest_highrise').css('display', 'none')" href="#"><< SUGGEST A HIGHRISE</a>
</div>
<!----- POPCORN DIVS -->
<div id="live_feed" onmouseover="stop_spin()" onMouseOut="start_spin()" data-plugin="wikipedia" class="butter-plugin" style="width:370px; position:absolute;left:0px;top:35px;z-index:1000;display:none">
<table>
<tr>
<td><span id="live_feed_title"></span><div id="semantic_wrap"></div><div style="fontsize:15px;margin-top:20px" id="live_feed_sub" class="butter-plugin_sub"></div></div></td>
<td valign=top><a class="bold_font_12" href="javascript:hide_feeds()">x</a></td>
</tr>
<td><span id="live_feed_more"></span></td>
</tr>
</table>
</div>
<div id="live_feeds" style="width:350px; position:absolute;left:0px;top:30px;z-index:1000;display:none">
</div>
<!---- menu div ---->
<div id="main_menu_div" onmouseover="stop_spin()" onMouseOut="start_spin()">
<table cellpadding="0" cellspacing="0">
<tr>
<td class='heavy_font_34' style="color:#FFF;">MAIN STORY</td>
<td class='heavy_font_34' style="color:#FFF;" colspan="2">SPECIAL FEATURES</td>
<td></td>
</tr>
<tr>
<td><div class="menu_btn">
<a href="javascript:go_explore()" onclick="cancel_menu()" onmouseover="$('#cell_2').show();" onmouseout="$('#cell_2').hide();"><img src="images/menu buttons/freeroam.png"></a>
<div class="menu_title bold_font_16">Explore</div>
<div class="media-type bold_font_12">interactive</div>
<div id="cell_2" class="menu_caption normal_font_11">Explore the One Millionth Tower documentary on your own. Walk and click through a virtual neighbourhood to unleash stories of imagination on six locations. (Features current weather conditions at the real tower. fun!)</div>
</div>
</td>
<td><div class="menu_btn">
<a href="javascript:move_to_IMAGINE(1)" onmouseover="$('#cell_4').show();" onmouseout="$('#cell_4').hide();"><img src="images/menu buttons/imagine.png"></a>
<div class="menu_title bold_font_16">Imagine</div>