|
@@ -27,7 +27,14 @@ try { |
|
|
// Lack of "about" display is not a big deal |
|
|
// Lack of "about" display is not a big deal |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var config; |
|
|
|
|
|
|
|
|
var config, popoutmode = false, hfov = 70, pitch = 0, yaw = 0, haov = 360, |
|
|
|
|
|
vaov = 180, voffset = 0, renderer, isUserInteracting = false, |
|
|
|
|
|
onMouseDownMouseX = 0, onMouseDownMouseY = 0, onMouseDownYaw = 0, |
|
|
|
|
|
onMouseDownPitch = 0, phi = 0, theta = 0, keysDown = new Array(10), |
|
|
|
|
|
fullWindowActive = false, loaded = false, error = false, isTimedOut = false, |
|
|
|
|
|
about_box = document.getElementById('about_box'), autoRotate = false, |
|
|
|
|
|
canvas = document.getElementById('canvas'); |
|
|
|
|
|
|
|
|
if(getURLParameter('config')) { |
|
|
if(getURLParameter('config')) { |
|
|
// Get JSON configuration file |
|
|
// Get JSON configuration file |
|
|
var request = new XMLHttpRequest(); |
|
|
var request = new XMLHttpRequest(); |
|
@@ -67,8 +74,6 @@ if(getURLParameter('license')) { |
|
|
license.width = '80px'; |
|
|
license.width = '80px'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var popoutmode = false; |
|
|
|
|
|
|
|
|
|
|
|
if(getURLParameter('popout') == 'yes') { |
|
|
if(getURLParameter('popout') == 'yes') { |
|
|
document.getElementById('fullwindowtoggle_button').classList.add('fullwindowtoggle_button_active'); |
|
|
document.getElementById('fullwindowtoggle_button').classList.add('fullwindowtoggle_button_active'); |
|
|
popoutmode = true; |
|
|
popoutmode = true; |
|
@@ -83,7 +88,6 @@ if(getURLParameter('preview')) { |
|
|
document.body.style.backgroundSize = "auto"; |
|
|
document.body.style.backgroundSize = "auto"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var hfov = 70, pitch = 0, yaw = 0, haov = 360, vaov = 180, voffset = 0; |
|
|
|
|
|
if(getURLParameter('hfov')) { |
|
|
if(getURLParameter('hfov')) { |
|
|
hfov = parseFloat(getURLParameter('hfov')); |
|
|
hfov = parseFloat(getURLParameter('hfov')); |
|
|
|
|
|
|
|
@@ -94,6 +98,7 @@ if(getURLParameter('hfov')) { |
|
|
hfov = 100; |
|
|
hfov = 100; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('pitch')) { |
|
|
if(getURLParameter('pitch')) { |
|
|
pitch = parseFloat(getURLParameter('pitch')); |
|
|
pitch = parseFloat(getURLParameter('pitch')); |
|
|
|
|
|
|
|
@@ -104,36 +109,23 @@ if(getURLParameter('pitch')) { |
|
|
pitch = 85; |
|
|
pitch = 85; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('yaw')) { |
|
|
if(getURLParameter('yaw')) { |
|
|
yaw = parseFloat(getURLParameter('yaw')); |
|
|
yaw = parseFloat(getURLParameter('yaw')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('haov')) { |
|
|
if(getURLParameter('haov')) { |
|
|
haov = parseFloat(getURLParameter('haov')); |
|
|
haov = parseFloat(getURLParameter('haov')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('vaov')) { |
|
|
if(getURLParameter('vaov')) { |
|
|
vaov = parseFloat(getURLParameter('vaov')); |
|
|
vaov = parseFloat(getURLParameter('vaov')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('voffset')) { |
|
|
if(getURLParameter('voffset')) { |
|
|
voffset = parseFloat(getURLParameter('voffset')); |
|
|
voffset = parseFloat(getURLParameter('voffset')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var camera, scene, renderer, renderGL; |
|
|
|
|
|
|
|
|
|
|
|
var texture_placeholder, |
|
|
|
|
|
isUserInteracting = false, |
|
|
|
|
|
onMouseDownMouseX = 0, onMouseDownMouseY = 0, |
|
|
|
|
|
onMouseDownYaw = 0, onMouseDownPitch = 0, |
|
|
|
|
|
phi = 0, theta = 0; |
|
|
|
|
|
|
|
|
|
|
|
var keysDown = new Array(10); |
|
|
|
|
|
|
|
|
|
|
|
var fullWindowActive = false; |
|
|
|
|
|
var loaded = false; |
|
|
|
|
|
var error = false; |
|
|
|
|
|
var isTimedOut = false; |
|
|
|
|
|
|
|
|
|
|
|
var about_box = document.getElementById('about_box'); |
|
|
|
|
|
|
|
|
|
|
|
if(getURLParameter('autoload') == 'yes' || getURLParameter('popoutautoload') == 'yes') { |
|
|
if(getURLParameter('autoload') == 'yes' || getURLParameter('popoutautoload') == 'yes') { |
|
|
if(getURLParameter('popoutautoload') != 'yes') { |
|
|
if(getURLParameter('popoutautoload') != 'yes') { |
|
|
// show loading box |
|
|
// show loading box |
|
@@ -147,17 +139,14 @@ if(getURLParameter('autoload') == 'yes' || getURLParameter('popoutautoload') == |
|
|
document.getElementById('load_button').style.display = 'table'; |
|
|
document.getElementById('load_button').style.display = 'table'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var autoRotate = false; |
|
|
|
|
|
|
|
|
|
|
|
if(getURLParameter('autorotate') == 'cw') { |
|
|
if(getURLParameter('autorotate') == 'cw') { |
|
|
autoRotate = 'cw'; |
|
|
autoRotate = 'cw'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(getURLParameter('autorotate') == 'ccw') { |
|
|
if(getURLParameter('autorotate') == 'ccw') { |
|
|
autoRotate = 'ccw'; |
|
|
autoRotate = 'ccw'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var canvas = document.getElementById('canvas'); |
|
|
|
|
|
|
|
|
|
|
|
function init() { |
|
|
function init() { |
|
|
var panoimage = new Image() |
|
|
var panoimage = new Image() |
|
|
panoimage.onload = function() { |
|
|
panoimage.onload = function() { |
|
@@ -647,12 +636,7 @@ function fullScreenError() { |
|
|
// open new window instead |
|
|
// open new window instead |
|
|
var windowspecs = 'width=' + screen.width + ',height=' + screen.height + ',left=0,top=0'; |
|
|
var windowspecs = 'width=' + screen.width + ',height=' + screen.height + ',left=0,top=0'; |
|
|
var windowlocation = window.location.href + '&popout=yes'; |
|
|
var windowlocation = window.location.href + '&popout=yes'; |
|
|
try { |
|
|
|
|
|
camera.aspect = window.innerWidth / window.innerHeight; |
|
|
|
|
|
windowlocation += '&popoutautoload=yes'; |
|
|
|
|
|
} catch(event) { |
|
|
|
|
|
// panorama not loaded |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
windowlocation += '&popoutautoload=yes'; |
|
|
window.open(windowlocation,null,windowspecs) |
|
|
window.open(windowlocation,null,windowspecs) |
|
|
} else { |
|
|
} else { |
|
|
window.close(); |
|
|
window.close(); |
|
|