Procházet zdrojové kódy

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 před 9 roky
rodič
revize
473a2b2f81
1 změnil soubory, kde provedl 4 přidání a 8 odebrání
  1. +4
    -8
      src/js/pannellum.js

+ 4
- 8
src/js/pannellum.js Zobrazit soubor

@@ -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) {


Načítá se…
Zrušit
Uložit