photo-sphere-viewer
Advanced tools
Comparing version 4.0.4 to 4.0.5
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -4,0 +4,0 @@ * @copyright 2015-2020 Damien "Mistic" Sorel |
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -4,0 +4,0 @@ * @copyright 2015-2020 Damien "Mistic" Sorel |
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -812,3 +812,3 @@ * @copyright 2015-2020 Damien "Mistic" Sorel | ||
var pinList = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"9 9 81 81\"><path d=\"M37.5 90S9.9 51.9 9.9 36.6 22.2 9 37.5 9s27.6 12.4 27.6 27.6S37.5 90 37.5 90zm0-66.3c-6.1 0-11 4.9-11 11s4.9 11 11 11 11-4.9 11-11-4.9-11-11-11zM86.7 55H70c-1.8 0-3.3-1.5-3.3-3.3s1.5-3.3 3.3-3.3h16.7c1.8 0 3.3 1.5 3.3 3.3S88.5 55 86.7 55zm0-25h-15a3.3 3.3 0 0 1-3.3-3.3c0-1.8 1.5-3.3 3.3-3.3h15c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3zM56.5 73h30c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3h-30a3.3 3.3 0 0 1-3.3-3.3 3.2 3.2 0 0 1 3.3-3.3z\"/><!--Created by Rohith M S from the Noun Project--></svg>\n"; | ||
var icon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"9 9 81 81\"><path fill=\"currentColor\" d=\"M37.5 90S9.9 51.9 9.9 36.6 22.2 9 37.5 9s27.6 12.4 27.6 27.6S37.5 90 37.5 90zm0-66.3c-6.1 0-11 4.9-11 11s4.9 11 11 11 11-4.9 11-11-4.9-11-11-11zM86.7 55H70c-1.8 0-3.3-1.5-3.3-3.3s1.5-3.3 3.3-3.3h16.7c1.8 0 3.3 1.5 3.3 3.3S88.5 55 86.7 55zm0-25h-15a3.3 3.3 0 0 1-3.3-3.3c0-1.8 1.5-3.3 3.3-3.3h15c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3zM56.5 73h30c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3h-30a3.3 3.3 0 0 1-3.3-3.3 3.2 3.2 0 0 1 3.3-3.3z\"/><!--Created by Rohith M S from the Noun Project--></svg>\n"; | ||
@@ -904,3 +904,3 @@ /** | ||
MarkersListButton.id = 'markersList'; | ||
MarkersListButton.icon = pinList; | ||
MarkersListButton.icon = icon; | ||
@@ -1979,3 +1979,3 @@ /** | ||
MarkersPlugin.MARKERS_LIST_TEMPLATE = function (markers, title, dataKey) { | ||
return "\n<div class=\"psv-markers-list-container\">\n <h1 class=\"psv-markers-list-title\">" + title + "</h1>\n <ul class=\"psv-markers-list\">\n " + markers.map(function (marker) { | ||
return "\n<div class=\"psv-markers-list-container\">\n <h1 class=\"psv-markers-list-title\">" + icon + " " + title + "</h1>\n <ul class=\"psv-markers-list\">\n " + markers.map(function (marker) { | ||
return "\n <li data-" + dataKey + "=\"" + marker.config.id + "\" class=\"psv-markers-list-item " + (marker.config.className || '') + "\">\n " + (marker.type === 'image' ? "<img class=\"psv-markers-list-image\" src=\"" + marker.config.image + "\"/>" : '') + "\n <p class=\"psv-markers-list-name\">" + marker.getListContent() + "</p>\n </li>\n "; | ||
@@ -1982,0 +1982,0 @@ }).join('') + "\n </ul>\n</div>\n"; |
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -8,4 +8,4 @@ * @copyright 2015-2020 Damien "Mistic" Sorel | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('photo-sphere-viewer'), require('photo-sphere-viewer/plugins/gyroscope'), require('three')) : | ||
typeof define === 'function' && define.amd ? define(['photo-sphere-viewer', 'photo-sphere-viewer/plugins/gyroscope', 'three'], factory) : | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('photo-sphere-viewer'), require('photo-sphere-viewer/dist/plugins/gyroscope'), require('three')) : | ||
typeof define === 'function' && define.amd ? define(['photo-sphere-viewer', 'photo-sphere-viewer/dist/plugins/gyroscope', 'three'], factory) : | ||
(global = global || self, (global.PhotoSphereViewer = global.PhotoSphereViewer || {}, global.PhotoSphereViewer.StereoPlugin = factory(global.PhotoSphereViewer, global.PhotoSphereViewer.GyroscopePlugin, global.THREE))); | ||
@@ -213,3 +213,3 @@ }(this, (function (photoSphereViewer, GyroscopePlugin, THREE) { 'use strict'; | ||
if (!_this.gyroscope) { | ||
throw new photoSphereViewer.PSVError('Stereo plugin requires the gyroscope plugin'); | ||
throw new photoSphereViewer.PSVError('Stereo plugin requires the Gyroscope plugin'); | ||
} | ||
@@ -216,0 +216,0 @@ /** |
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -4,0 +4,0 @@ * @copyright 2015-2020 Damien "Mistic" Sorel |
/*! | ||
* Photo Sphere Viewer 4.0.4 | ||
* Photo Sphere Viewer 4.0.5 | ||
* @copyright 2014-2015 Jérémy Heleine | ||
@@ -8,4 +8,4 @@ * @copyright 2015-2020 Damien "Mistic" Sorel | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('three'), require('photo-sphere-viewer'), require('photo-sphere-viewer/plugins/gyroscope'), require('photo-sphere-viewer/plugins/stereo'), require('photo-sphere-viewer/plugins/markers'), require('photo-sphere-viewer/plugins/visible-range')) : | ||
typeof define === 'function' && define.amd ? define(['three', 'photo-sphere-viewer', 'photo-sphere-viewer/plugins/gyroscope', 'photo-sphere-viewer/plugins/stereo', 'photo-sphere-viewer/plugins/markers', 'photo-sphere-viewer/plugins/visible-range'], factory) : | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('three'), require('photo-sphere-viewer'), require('photo-sphere-viewer/dist/plugins/gyroscope'), require('photo-sphere-viewer/dist/plugins/stereo'), require('photo-sphere-viewer/dist/plugins/markers'), require('photo-sphere-viewer/dist/plugins/visible-range')) : | ||
typeof define === 'function' && define.amd ? define(['three', 'photo-sphere-viewer', 'photo-sphere-viewer/dist/plugins/gyroscope', 'photo-sphere-viewer/dist/plugins/stereo', 'photo-sphere-viewer/dist/plugins/markers', 'photo-sphere-viewer/dist/plugins/visible-range'], factory) : | ||
(global = global || self, (global.PhotoSphereViewer = global.PhotoSphereViewer || {}, global.PhotoSphereViewer.ViewerCompat = factory(global.THREE, global.PhotoSphereViewer, global.PhotoSphereViewer.GyroscopePlugin, global.PhotoSphereViewer.StereoPlugin, global.PhotoSphereViewer.MarkersPlugin, global.PhotoSphereViewer.VisibleRangePlugin))); | ||
@@ -12,0 +12,0 @@ }(this, (function (THREE, photoSphereViewer, GyroscopePlugin, StereoPlugin, MarkersPlugin, VisibleRangePlugin) { 'use strict'; |
{ | ||
"name": "photo-sphere-viewer", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "A JavaScript library to display Photo Sphere panoramas", | ||
@@ -90,3 +90,3 @@ "homepage": "https://photo-sphere-viewer.js.org", | ||
"doc:jsdoc": "jsdoc --configure .jsdoc.json --destination public/api src", | ||
"doc:assets": "cpx \"example/assets/*\" public/assets && cpx example/Bryce-Canyon-National-Park-Mark-Doliner.jpg public/assets && cpx \"example/suntemple-cubemap/*\" public/assets/suntemple-cubemap", | ||
"doc:assets": "cpx \"example/assets/*\" public/assets && cpx example/sphere.jpg public/assets && cpx example/sphere_small.jpg public/assets && cpx \"example/cubemap/*\" public/assets/cubemap", | ||
"test": "npm-run-all --parallel test:*", | ||
@@ -93,0 +93,0 @@ "test:mocha": "mocha --require @babel/register --recursive \"src/**/*.spec.js\"", |
@@ -6,4 +6,5 @@ import { EASINGS } from './data/constants'; | ||
* @callback OnTick | ||
* @summary Function called for each animation frame with computed properties | ||
* @memberOf PSV.Animation | ||
* @param {Object[]} properties - current values | ||
* @param {Object.<string, number>} properties - current values | ||
* @param {float} progress - 0 to 1 | ||
@@ -31,3 +32,3 @@ */ | ||
* @param {Object} options | ||
* @param {Object[]} options.properties | ||
* @param {Object.<string, Object>} options.properties | ||
* @param {number} options.properties[].start | ||
@@ -34,0 +35,0 @@ * @param {number} options.properties[].end |
@@ -147,2 +147,7 @@ import { EVENTS } from '../data/constants'; | ||
if (this.prop.clickHandler) { | ||
this.content.removeEventListener('click', this.prop.clickHandler); | ||
this.prop.clickHandler = null; | ||
} | ||
this.content.innerHTML = config.content; | ||
@@ -149,0 +154,0 @@ this.content.scrollTop = 0; |
@@ -95,2 +95,10 @@ import { Animation } from './Animation'; | ||
/** | ||
* @callback PanoDataProvider | ||
* @summary Function to compute panorama data once the image is loaded | ||
* @memberOf PSV | ||
* @param {Image} image - loaded image | ||
* @returns {PSV.PanoData} computed panorama data | ||
*/ | ||
/** | ||
* @typedef {PSV.AnimateOptions} PSV.PanoramaOptions | ||
@@ -101,3 +109,3 @@ * @summary Object defining panorama and animation options | ||
* @property {PSV.SphereCorrection} [sphereCorrection] - new sphere correction to apply to the panorama | ||
* @property {PSV.PanoData | function<Image, PSV.PanoData>} [panoData] - new panorama data used for this panorama | ||
* @property {PSV.PanoData | PSV.PanoDataProvider} [panoData] - new panorama data used for this panorama | ||
*/ | ||
@@ -104,0 +112,0 @@ |
@@ -6,2 +6,3 @@ import { AbstractPlugin, CONSTANTS, DEFAULTS, PSVError, registerButton, utils } from 'photo-sphere-viewer'; | ||
import { MarkersListButton } from './MarkersListButton'; | ||
import icon from './pin-list.svg'; | ||
import './style.scss'; | ||
@@ -94,3 +95,3 @@ | ||
<div class="psv-markers-list-container"> | ||
<h1 class="psv-markers-list-title">${title}</h1> | ||
<h1 class="psv-markers-list-title">${icon} ${title}</h1> | ||
<ul class="psv-markers-list"> | ||
@@ -97,0 +98,0 @@ ${markers.map(marker => ` |
import { AbstractPlugin, CONSTANTS, DEFAULTS, PSVError, registerButton, utils } from 'photo-sphere-viewer'; | ||
import GyroscopePlugin from 'photo-sphere-viewer/plugins/gyroscope'; | ||
import GyroscopePlugin from 'photo-sphere-viewer/dist/plugins/gyroscope'; | ||
import * as THREE from 'three'; | ||
@@ -70,3 +70,3 @@ import 'three/examples/js/effects/StereoEffect'; | ||
if (!this.gyroscope) { | ||
throw new PSVError('Stereo plugin requires the gyroscope plugin'); | ||
throw new PSVError('Stereo plugin requires the Gyroscope plugin'); | ||
} | ||
@@ -73,0 +73,0 @@ |
@@ -40,3 +40,3 @@ import * as THREE from 'three'; | ||
* @param {string|string[]|PSV.Cubemap} panorama | ||
* @param {PSV.PanoData | function<Image, PSV.PanoData>} [newPanoData] | ||
* @param {PSV.PanoData | PSV.PanoDataProvider} [newPanoData] | ||
* @returns {Promise.<PSV.TextureData>} | ||
@@ -177,3 +177,3 @@ * @throws {PSV.PSVError} when the image cannot be loaded | ||
* @param {string} panorama | ||
* @param {PSV.PanoData | function<Image, PSV.PanoData>} [newPanoData] | ||
* @param {PSV.PanoData | PSV.PanoDataProvider} [newPanoData] | ||
* @returns {Promise.<PSV.TextureData>} | ||
@@ -180,0 +180,0 @@ * @throws {PSV.PSVError} when the image cannot be loaded |
@@ -340,3 +340,3 @@ import * as THREE from 'three'; | ||
getPlugin(pluginId) { | ||
return this.plugins[typeof pluginId === 'function' ? pluginId.id : pluginId]; | ||
return pluginId ? this.plugins[typeof pluginId === 'function' ? pluginId.id : pluginId] : null; | ||
} | ||
@@ -437,3 +437,3 @@ | ||
if (!this.prop.isReady) { | ||
if (!this.prop.ready) { | ||
if (!('longitude' in options) && !this.prop.isCubemap) { | ||
@@ -440,0 +440,0 @@ options.longitude = this.config.defaultLong; |
import * as THREE from 'three'; | ||
import { DEFAULTS, utils, Viewer } from 'photo-sphere-viewer'; | ||
import GyroscopePlugin from 'photo-sphere-viewer/plugins/gyroscope'; | ||
import StereoPlugin from 'photo-sphere-viewer/plugins/stereo'; | ||
import MarkersPlugin from 'photo-sphere-viewer/plugins/markers'; | ||
import VisibleRangePlugin from 'photo-sphere-viewer/plugins/visible-range'; | ||
import GyroscopePlugin from 'photo-sphere-viewer/dist/plugins/gyroscope'; | ||
import StereoPlugin from 'photo-sphere-viewer/dist/plugins/stereo'; | ||
import MarkersPlugin from 'photo-sphere-viewer/dist/plugins/markers'; | ||
import VisibleRangePlugin from 'photo-sphere-viewer/dist/plugins/visible-range'; | ||
@@ -8,0 +8,0 @@ /** |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1314543
117
21343