Преглед на файлове

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 години
родител
ревизия
473a2b2f81
променени са 1 файла, в които са добавени 4 реда и са изтрити 8 реда
  1. +4
    -8
      src/js/pannellum.js

+ 4
- 8
src/js/pannellum.js Целия файл

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


Зареждане…
Отказ
Запис