|
@@ -68,7 +68,8 @@ var config, |
|
|
specifiedPhotoSphereExcludes = [], |
|
|
specifiedPhotoSphereExcludes = [], |
|
|
update = false, // Should we update when still to render dynamic content |
|
|
update = false, // Should we update when still to render dynamic content |
|
|
eps = 1e-6, |
|
|
eps = 1e-6, |
|
|
hotspotsCreated = false; |
|
|
|
|
|
|
|
|
hotspotsCreated = false, |
|
|
|
|
|
destroyed = false; |
|
|
|
|
|
|
|
|
var defaultConfig = { |
|
|
var defaultConfig = { |
|
|
hfov: 100, |
|
|
hfov: 100, |
|
@@ -1357,6 +1358,10 @@ function animateInit() { |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
function animate() { |
|
|
function animate() { |
|
|
|
|
|
if (destroyed) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
render(); |
|
|
render(); |
|
|
if (autoRotateStart) |
|
|
if (autoRotateStart) |
|
|
clearTimeout(autoRotateStart); |
|
|
clearTimeout(autoRotateStart); |
|
@@ -3079,6 +3084,9 @@ function fireEvent(type) { |
|
|
* @memberof Viewer |
|
|
* @memberof Viewer |
|
|
*/ |
|
|
*/ |
|
|
this.destroy = function() { |
|
|
this.destroy = function() { |
|
|
|
|
|
destroyed = true; |
|
|
|
|
|
clearTimeout(autoRotateStart); |
|
|
|
|
|
|
|
|
if (renderer) |
|
|
if (renderer) |
|
|
renderer.destroy(); |
|
|
renderer.destroy(); |
|
|
if (listenersAdded) { |
|
|
if (listenersAdded) { |
|
|