Skip to content

Commit

Permalink
Default enabled "useNewAnglesOrder"
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Oct 17, 2024
1 parent 5453380 commit b5acfeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/Viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ import {
export class Viewer extends TypedEventTarget<ViewerEvents> {
/**
* Change the order in which the panoData and sphereCorrection angles are applied from 'ZXY' to 'YXZ'
* Will default to `true` in version 5.11
* @deprecated Will be removed in version 5.12
*/
static useNewAnglesOrder = false;
static useNewAnglesOrder = true;

readonly state: ViewerState;
readonly config: ParsedViewerConfig;
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/services/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ export class Renderer extends AbstractService {

const i = (cleanCorrection.pan ? 1 : 0) + (cleanCorrection.tilt ? 1 : 0) + (cleanCorrection.roll ? 1 : 0);
if (!Viewer.useNewAnglesOrder && i > 1) {
logWarn(`'panoData' Euler angles will change in version 5.11.0.`);
logWarn(`Set 'Viewer.useNewAnglesOrder = true;' to remove this warning (you might have to adapt your poseHeading/posePitch/poseRoll parameters).`);
logWarn(`'panoData' Euler angles have changed in version 5.11.0.`);
logWarn(`Remove your 'useNewAnglesOrder' override to remove this warning (you might have to adapt your poseHeading/posePitch/poseRoll parameters).`);
}

if (Viewer.useNewAnglesOrder) {
Expand All @@ -310,8 +310,8 @@ export class Renderer extends AbstractService {

const i = (cleanCorrection.pan ? 1 : 0) + (cleanCorrection.tilt ? 1 : 0) + (cleanCorrection.roll ? 1 : 0);
if (!Viewer.useNewAnglesOrder && i > 1) {
logWarn(`'sphereCorrection' Euler angles will change in version 5.11.0.`);
logWarn(`Set 'Viewer.useNewAnglesOrder = true;' to remove this warning (you might have to adapt your pan/tilt/roll parameters).`);
logWarn(`'sphereCorrection' Euler angles have changed in version 5.11.0.`);
logWarn(`Remove your 'useNewAnglesOrder' override to remove this warning (you might have to adapt your poseHeading/posePitch/poseRoll parameters).`);
}

if (Viewer.useNewAnglesOrder) {
Expand Down

0 comments on commit b5acfeb

Please sign in to comment.