Sfoglia il codice sorgente

Revert "Ignore zero degree heading in XMP data since it's used as a placeholder by some cameras that don't have a magnetometer (e.g. Ricoh Theta)."

This reverts commit 37d62a6043.
pull/101/head
Matthew Petroff 9 anni fa
parent
commit
473a2b2f81
1 ha cambiato i file con 4 aggiunte e 8 eliminazioni
  1. +4
    -8
      src/js/pannellum.js

+ 4
- 8
src/js/pannellum.js Vedi File

@@ -419,14 +419,10 @@ function parseGPanoXMP(image) {
config.vaov = xmp.croppedHeight / xmp.fullHeight * 180;
config.vOffset = ((xmp.topPixels + xmp.croppedHeight / 2) / xmp.fullHeight - 0.5) * -180;
if (xmp.heading !== null) {
if (xmp.heading == 0) {
console.log('Ignoring suspicious 0 degree heading in XMP data. Manually set heading to override.')
} else {
// TODO: make sure this works correctly for partial panoramas
config.northOffset = xmp.heading;
if (config.compass !== false) {
config.compass = true;
}
// TODO: make sure this works correctly for partial panoramas
config.northOffset = xmp.heading;
if (config.compass !== false) {
config.compass = true;
}
}
if (xmp.horizonPitch !== null && xmp.horizonRoll !== null) {


Caricamento…
Annulla
Salva