8 lines
79 KiB
JavaScript
8 lines
79 KiB
JavaScript
|
|
/**
|
||
|
|
* Minified by jsDelivr using Terser v3.14.1.
|
||
|
|
* Original file: /npm/photo-sphere-viewer@4.0.7/dist/photo-sphere-viewer.js
|
||
|
|
*
|
||
|
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||
|
|
*/
|
||
|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("three"),require("uevent")):"function"==typeof define&&define.amd?define(["exports","three","uevent"],e):e((t=t||self).PhotoSphereViewer={},t.THREE,t.uEvent)}(this,function(t,e,o){"use strict";var i=[0,2,4,5,3,1],n=["left","right","top","bottom","back","front"],r="photoSphereViewer",s={ROTATE_LAT_UP:"rotateLatitudeUp",ROTATE_LAT_DOWN:"rotateLatitudeDown",ROTATE_LONG_RIGHT:"rotateLongitudeRight",ROTATE_LONG_LEFT:"rotateLongitudeLeft",ZOOM_IN:"zoomIn",ZOOM_OUT:"zoomOut",TOGGLE_AUTOROTATE:"toggleAutorotate"},a={AUTOROTATE:"autorotate",BEFORE_RENDER:"before-render",BEFORE_ROTATE:"before-rotate",CLICK:"click",CLOSE_PANEL:"close-panel",CONFIG_CHANGED:"config-changed",DOUBLE_CLICK:"dblclick",FULLSCREEN_UPDATED:"fullscreen-updated",HIDE_NOTIFICATION:"hide-notification",HIDE_OVERLAY:"hide-overlay",HIDE_TOOLTIP:"hide-tooltip",OPEN_PANEL:"open-panel",PANORAMA_LOADED:"panorama-loaded",POSITION_UPDATED:"position-updated",READY:"ready",RENDER:"render",SHOW_NOTIFICATION:"show-notification",SHOW_OVERLAY:"show-overlay",SHOW_TOOLTIP:"show-tooltip",SIZE_UPDATED:"size-updated",STOP_ALL:"stop-all",ZOOM_UPDATED:"zoom-updated"},c={GET_ANIMATE_POSITION:"get-animate-position",GET_ROTATE_POSITION:"get-rotate-position"},h={MENU:"menu",TWO_FINGERS:"twoFingers",ERROR:"error"},p={linear:function(t){return t},inQuad:function(t){return t*t},outQuad:function(t){return t*(2-t)},inOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},inCubic:function(t){return t*t*t},outCubic:function(t){return--t*t*t+1},inOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},inQuart:function(t){return t*t*t*t},outQuart:function(t){return 1- --t*t*t*t},inOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},inQuint:function(t){return t*t*t*t*t},outQuint:function(t){return 1+--t*t*t*t*t},inOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},inSine:function(t){return 1-Math.cos(t*(Math.PI/2))},outSine:function(t){return Math.sin(t*(Math.PI/2))},inOutSine:function(t){return.5-.5*Math.cos(Math.PI*t)},inExpo:function(t){return Math.pow(2,10*(t-1))},outExpo:function(t){return 1-Math.pow(2,-10*t)},inOutExpo:function(t){return(t=2*t-1)<0?.5*Math.pow(2,10*t):1-.5*Math.pow(2,-10*t)},inCirc:function(t){return 1-Math.sqrt(1-t*t)},outCirc:function(t){return Math.sqrt(1-(t-1)*(t-1))},inOutCirc:function(t){return(t*=2)<1?.5-.5*Math.sqrt(1-t*t):.5+.5*Math.sqrt(1-(t-=2)*t)}},l=Object.freeze({__proto__:null,MOVE_THRESHOLD:4,DBLCLICK_DELAY:300,LONGTOUCH_DELAY:500,TWOFINGERSOVERLAY_DELAY:100,INERTIA_WINDOW:300,SPHERE_RADIUS:100,SPHERE_VERTICES:64,CUBE_VERTICES:8,CUBE_MAP:i,CUBE_HASHMAP:n,BUTTON_DATA:"psvButton",VIEWER_DATA:r,ACTIONS:s,EVENTS:a,CHANGE_EVENTS:c,IDS:h,EASINGS:p});function u(t,e,o){if(t.classList)void 0===o?t.classList.toggle(e):o&&!t.classList.contains(e)?t.classList.add(e):o||t.classList.remove(e);else{var i=t.getAttribute("class")||"",n=-1!==i.indexOf(e),r=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)");void 0!==o&&!o||n?o||(i=i.replace(r," ")):i+=i.length>0?" "+e:e,t.setAttribute("class",i)}}function d(t,e){e&&e.split(" ").forEach(function(e){u(t,e,!0)})}function v(t,e){var o=t.matches||t.msMatchesSelector,i=t;if(!o)return null;do{if(o.bind(i)(e))return i;i=i instanceof SVGElement?i.parentNode:i.parentElement}while(i);return null}var f={13:"Enter",27:"Escape",32:" ",33:"PageUp",34:"PageDown",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",46:"Delete",107:"+",109:"-"},m={Add:"+",Del:"Delete",Down:"ArrowDown",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Spacebar:" ",Subtract:"-",Up:"ArrowUp"};function g(t){var e=t.key||f[t.keyCode||t.which];return e&&m[e]&&(e=m[e]),e}function w(t){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)===t}function _(t){(t.requestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen||t.msRequestFullscreen).call(t)}function b(){(document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen).call(docu
|
||
|
|
//# sourceMappingURL=/sm/2503706bc3bad5ee806a4dc863db6a385e734b24eea820abaf4314e16f95f95d.map
|