Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

photo-sphere-viewer

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

photo-sphere-viewer - npm Package Compare versions

Comparing version 4.6.4 to 4.6.5

8

dist/adapters/cubemap-tiles.js
/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

@@ -975,3 +975,3 @@ import { Texture, Vector3, Euler, Intersection, Mesh } from 'three';

size?: Size;
fisheye?: boolean;
fisheye?: boolean | number;
minFov?: number;

@@ -978,0 +978,0 @@ maxFov?: number;

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -21,7 +21,6 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -28,0 +27,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -21,7 +21,6 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -28,0 +27,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -48,0 +46,0 @@ }

/*!
* Photo Sphere Viewer 4.6.4
* Photo Sphere Viewer 4.6.5
* @copyright 2014-2015 Jérémy Heleine

@@ -14,3 +14,3 @@ * @copyright 2015-2022 Damien "Mistic" Sorel

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {

@@ -28,3 +28,2 @@ var source = arguments[i];

};
return _extends.apply(this, arguments);

@@ -41,7 +40,6 @@ }

function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);

@@ -57,2 +55,3 @@ }

var EPS = 0.000001;
/**

@@ -126,13 +125,28 @@ * @summary Locks visible longitude and/or latitude

_proto.handleEvent = function handleEvent(e) {
var sidesReached;
var rangedPosition;
var currentPosition;
switch (e.type) {
case photoSphereViewer.CONSTANTS.CHANGE_EVENTS.GET_ANIMATE_POSITION:
case photoSphereViewer.CONSTANTS.CHANGE_EVENTS.GET_ROTATE_POSITION:
return this.applyRanges(e.value).rangedPosition;
currentPosition = e.value;
var _this$applyRanges = this.applyRanges(currentPosition);
rangedPosition = _this$applyRanges.rangedPosition;
return rangedPosition;
case photoSphereViewer.CONSTANTS.EVENTS.POSITION_UPDATED:
var _this$applyRanges = this.applyRanges(e.args[0]),
sidesReached = _this$applyRanges.sidesReached;
currentPosition = e.args[0];
var _this$applyRanges2 = this.applyRanges(currentPosition);
sidesReached = _this$applyRanges2.sidesReached;
rangedPosition = _this$applyRanges2.rangedPosition;
if ((sidesReached.left || sidesReached.right) && this.psv.isAutorotateEnabled()) {
this.__reverseAutorotate(sidesReached.left, sidesReached.right);
} else if (Math.abs(currentPosition.longitude - rangedPosition.longitude) > EPS || Math.abs(currentPosition.latitude - rangedPosition.latitude) > EPS) {
this.psv.dynamics.position.setValue(rangedPosition);
}

@@ -150,8 +164,9 @@

case photoSphereViewer.CONSTANTS.EVENTS.ZOOM_UPDATED:
var currentPosition = this.psv.getPosition();
currentPosition = this.psv.getPosition();
var _this$applyRanges2 = this.applyRanges(currentPosition),
rangedPosition = _this$applyRanges2.rangedPosition;
var _this$applyRanges3 = this.applyRanges(currentPosition);
if (currentPosition.longitude !== rangedPosition.longitude || currentPosition.latitude !== rangedPosition.latitude) {
rangedPosition = _this$applyRanges3.rangedPosition;
if (Math.abs(currentPosition.longitude - rangedPosition.longitude) > EPS || Math.abs(currentPosition.latitude - rangedPosition.latitude) > EPS) {
this.psv.rotate(rangedPosition);

@@ -158,0 +173,0 @@ }

{
"name": "photo-sphere-viewer",
"version": "4.6.4",
"version": "4.6.5",
"description": "A JavaScript library to display Photo Sphere panoramas",

@@ -76,3 +76,3 @@ "homepage": "https://photo-sphere-viewer.js.org",

"stylelint": "^14.0.0",
"stylelint-config-standard-scss": "^4.0.0",
"stylelint-config-standard-scss": "^5.0.0",
"typescript": "^4.4.2",

@@ -79,0 +79,0 @@ "vue-material": "^1.0.0-beta-15",

@@ -117,10 +117,11 @@ import { PSVError } from '../PSVError';

window.addEventListener('mousedown', listenerMouse, false);
window.addEventListener('touchstart', listenerTouch, false);
const listenerTimeoutId = setTimeout(listenerTimeout, 10000);
clear = () => {
window.removeEventListener('mousedown', listenerMouse);
window.removeEventListener('touchstart', listenerTouch);
clearTimeout(listenerTimeoutId);
};
window.addEventListener('mousedown', listenerMouse, false);
window.addEventListener('touchstart', listenerTouch, false);
setTimeout(listenerTimeout, 10000);
});

@@ -163,3 +164,3 @@

try {
if (ctx.getImageData(0, 0, 1, 1).data[0] === 255) {
if (ctx.getImageData(0, 0, 1, 1).data[0] > 0) {
return canvas.width;

@@ -166,0 +167,0 @@ }

@@ -12,2 +12,3 @@ import * as THREE from 'three';

const EPS = 0.000001;

@@ -76,12 +77,25 @@ /**

handleEvent(e) {
let sidesReached;
let rangedPosition;
let currentPosition;
switch (e.type) {
case CONSTANTS.CHANGE_EVENTS.GET_ANIMATE_POSITION:
case CONSTANTS.CHANGE_EVENTS.GET_ROTATE_POSITION:
return this.applyRanges(e.value).rangedPosition;
currentPosition = e.value;
({ rangedPosition } = this.applyRanges(currentPosition));
return rangedPosition;
case CONSTANTS.EVENTS.POSITION_UPDATED:
const { sidesReached } = this.applyRanges(e.args[0]);
currentPosition = e.args[0];
({ sidesReached, rangedPosition } = this.applyRanges(currentPosition));
if ((sidesReached.left || sidesReached.right) && this.psv.isAutorotateEnabled()) {
this.__reverseAutorotate(sidesReached.left, sidesReached.right);
}
else if (Math.abs(currentPosition.longitude - rangedPosition.longitude) > EPS
|| Math.abs(currentPosition.latitude - rangedPosition.latitude) > EPS) {
this.psv.dynamics.position.setValue(rangedPosition);
}
break;

@@ -96,5 +110,7 @@

case CONSTANTS.EVENTS.ZOOM_UPDATED:
const currentPosition = this.psv.getPosition();
const { rangedPosition } = this.applyRanges(currentPosition);
if (currentPosition.longitude !== rangedPosition.longitude || currentPosition.latitude !== rangedPosition.latitude) {
currentPosition = this.psv.getPosition();
({ rangedPosition } = this.applyRanges(currentPosition));
if (Math.abs(currentPosition.longitude - rangedPosition.longitude) > EPS
|| Math.abs(currentPosition.latitude - rangedPosition.latitude) > EPS) {
this.psv.rotate(rangedPosition);

@@ -101,0 +117,0 @@ }

@@ -303,2 +303,8 @@ import * as THREE from 'three';

each(this.plugins, plugin => plugin.destroy());
delete this.plugins;
this.children.slice().forEach(child => child.destroy());
this.children.length = 0;
this.eventsHandler.destroy();

@@ -310,8 +316,2 @@ this.renderer.destroy();

this.children.slice().forEach(child => child.destroy());
this.children.length = 0;
each(this.plugins, plugin => plugin.destroy());
delete this.plugins;
this.parent.removeChild(this.container);

@@ -329,2 +329,3 @@ delete this.parent[VIEWER_DATA];

delete this.overlay;
delete this.dynamics;

@@ -331,0 +332,0 @@ delete this.config;

@@ -42,3 +42,3 @@ import { Vector3 } from 'three';

size?: Size;
fisheye?: boolean;
fisheye?: boolean | number;
minFov?: number;

@@ -45,0 +45,0 @@ maxFov?: number;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc