1 |
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.TWEEN=e()}(this,(function(){"use strict";var t,e,n="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){var i=Object.keys(this._tweens);if(0===i.length)return!1;for(t=void 0!==t?t:n();i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]];r&&!1===r.update(t)&&!e&&delete this._tweens[i[o]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),o={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-o.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*o.Bounce.In(2*t):.5*o.Bounce.Out(2*t-1)+.5}}},r={Linear:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,s=r.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*s(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),s(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=r.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(t=[1],function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}),CatmullRom:function(t,e,n,i,o){var r=.5*(n-t),s=.5*(i-e),a=o*o;return(2*e-2*n+r+s)*(o*a)+(-3*e+3*n-2*r-s)*a+r*o+e}}},s=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),a=function(){function t(t,e){void 0===e&&(e=l),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=l.Easing.Linear.None,this._interpolationFunction=l.Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=l.nextId(),this._isChainStopped=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){for(var n in t)this._valuesEnd[n]=t[n];return void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?l.now()+parseFloat(t):t:l.now(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,n,i){for(var o in n){var r=t[o],s=Array.isArray(r),a=s?"array":typeof r,u=!s&&Array.isArray(n[o]);if("undefined"!==a&&"function"!==a){if(u){var l=n[o];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,r)),n[o]=[r].concat(l)}if("object"!==a&&!s||!r||u)void 0===e[o]&&(e[o]=r),s||(e[o]*=1),i[o]=u?n[o].slice().reverse():e[o]||0;else{for(var h in e[o]=s?[]:{},r)e[o][h]=r[h];i[o]=s?[]:{},this._setupProperties(r,e[o],n[o],i[o])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this.update(1/0),this},t.prototype.pause=function(t){return this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=void 0===t?l.now():t,this._group.remove(this)),this},t.prototype.resume=function(t){return this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=(void 0===t?l.now():t)-this._pauseStart,this._pauseStart=0,this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t){var e,n;if(t>this._startTime+this._duration&&!this._isPlaying)return!1;if(this.isPlaying||this.start(t),t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n;var i=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[e]||(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo&&this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,r=this._chainedTweens.length;o<r;o++)this._chainedTweens[o].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,n,i){for(var o in n)if(void 0!==e[o]){var r=e[o]||0,s=n[o],a=Array.isArray(t[o]),u=Array.isArray(s);!a&&u?t[o]=this._interpolationFunction(s,i):"object"==typeof s&&s?this._updateProperties(t[o],r,s,i):"number"==typeof(s=this._handleRelativeValue(r,s))&&(t[o]=r+(s-r)*i)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t];"string"==typeof this._valuesEnd[t]?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t]):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},t}(),u=this&&this.__extends||(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),l=new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.version="18.5.0",e.now=n,e.Group=i,e.Easing=o,e.Interpolation=r,e.nextId=s.nextId,e.Tween=a,e}return u(e,t),e}(i));return l}));var t=!1,e=0,n=0,i=0,o=0,r=0,s=0,a=0,u=0;const l={idx:0,nextId:null,title:"南京世茂项目",descript:"世茂天誉为城市综合体项目,主要包括约15万方集八大主题亮点商业、11万方的顶级酒店服务式公寓、15万方5A超甲级写字楼+五星级酒店,以及13万方高端住宅。 NO.2016G11地块东至云锦路,南至国有空地,西至江东中路,北至集庆门大街,出让面积:62699.92㎡,地下出让面积4472.12㎡,规划用地性质:R21住宅用地,Bb商办混合用地。",src:[{id:1,name:"01frontGate",title:"01正门",thumb:"panos/01frontGate_b.jpg",descript:"简介:01正门于俄罗斯北部,波罗的海沿岸..."},{id:2,name:"02masterBedroom",title:"02主卧",thumb:"panos/02masterBedroom_b.jpg",descript:"简介:02主卧位于俄罗斯北部,波罗的海沿岸..."},{id:3,name:"03masterBedroom",title:"03主卧",thumb:"panos/03masterBedroom_b.jpg",descript:"简介:03主卧位于俄罗斯北部,波罗的海沿岸..."},{id:4,name:"04masterBedroom",title:"04主卧",thumb:"panos/04masterBedroom_b.jpg",descript:"简介:04主卧于俄罗斯北部,波罗的海沿岸..."},{id:5,name:"05masterBedroomToilet",title:"05主卧卫生间",thumb:"panos/05masterBedroomToilet_b.jpg",descript:"简介:05主卧卫生间位于俄罗斯北部,波罗的海沿岸..."},{id:6,name:"06masterBedroomPorch",title:"06主卧门廊",thumb:"panos/06masterBedroomPorch_b.jpg",descript:"简介:06主卧门廊位于俄罗斯北部,波罗的海沿岸..."},{id:7,name:"07masterBedroomCloakroom",title:"07主卧衣帽间",thumb:"panos/07masterBedroomCloakroom_b.jpg",descript:"简介:07主卧衣帽间位于俄罗斯北部,波罗的海沿岸..."},{id:8,name:"08AguestRoom",title:"08客房",home:{T:90,R:100},thumb:"panos/08AguestRoom_b.jpg",descript:"简介:08客房于俄罗斯北部,波罗的海沿岸..."},{id:9,name:"09guestRoomA",title:"09客房A",home:{T:80,R:90},thumb:"panos/09guestRoomA_b.jpg",descript:"简介:09客房A于俄罗斯北部,波罗的海沿岸..."},{id:10,name:"10guestRoomAToilet",title:"10客房卫生间",home:{T:70,R:100},thumb:"panos/10guestRoomAToilet_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:11,name:"11guestRoomB",title:"11客房B",home:{T:85,R:70},thumb:"panos/11guestRoomB_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:12,name:"12guestRoomB",title:"12客房B",home:{T:80,R:60},thumb:"panos/12guestRoomB_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:13,name:"13guestRoomB",title:"13客房B",home:{T:95,R:70},thumb:"panos/13guestRoomB_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:14,name:"14livingRoom",title:"14客厅",home:{T:20,R:70},thumb:"panos/14livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:15,name:"15livingRoom",title:"15客厅",home:{T:30,R:50},thumb:"panos/15livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:16,name:"16livingRoom",title:"16客厅",home:{T:20,R:50},thumb:"panos/16livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:17,name:"17livingRoom",title:"17客厅",home:{T:8,R:60},thumb:"panos/17livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:18,name:"18livingRoom",title:"18客厅",home:{T:8,R:40},thumb:"panos/18livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:19,name:"19livingRoom",title:"19客厅",home:{T:8,R:50},thumb:"panos/19livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:20,name:"20livingRoom",title:"20客厅",home:{T:40,R:45},thumb:"panos/20livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:21,name:"21livingRoom",title:"21客厅",home:{T:42,R:55},thumb:"panos/21livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:22,name:"22livingRoom",title:"22客厅",home:{T:23,R:20},thumb:"panos/22livingRoom_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:23,name:"23kitchen",title:"23厨房",home:{T:-5,R:65},thumb:"panos/23kitchen_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:24,name:"24laundry",title:"24洗衣间",home:{T:-5,R:40},thumb:"panos/24laundry_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."},{id:25,name:"25frontGatePorch",title:"25前门门廊",home:{T:65,R:75},thumb:"panos/25frontGatePorch_b.jpg",descript:"简介:圣彼得堡位于俄罗斯北部,波罗的海沿岸..."}]};function h(){const t=window.location.search,e=new URLSearchParams(t);let n=e.get("id")?e.get("id"):-1,i=e.get("backurl")?e.get("backurl"):"../",o=n>l.src.length?l.src.length-1:n;if(document.getElementById("descriptContent").innerHTML=p(l.descript),-1!==o){const t=document.getElementById("cover");t.setAttribute("data-id",o),t.setAttribute("data-backurl",i)}else{o=0;const t=document.getElementById("cover");t.setAttribute("data-id",o),t.setAttribute("data-backurl",i)}l.idx=o,console.log("panoId",o);document.getElementById("listTitle").innerHTML="剧集列表("+l.src.length+"集全)";for(var r=document.getElementById("listContent");r.firstChild;)r.removeChild(r.firstChild);let s=0;for(let t of l.src){const e=document.createElement("div");e.className="pano",t.id-1==1*n&&(e.className="panoSelect"),s=t.id,1==s&&(e.style.marginLeft=0),e.setAttribute("data-id",s);const i=document.createElement("div");i.className="title",i.innerHTML=t.title;const o=document.createElement("div");o.className="thumb";const a=document.createElement("img");a.src="./panos/"+t.name+"4k_f.jpg",o.appendChild(a),e.appendChild(i),e.appendChild(o),r.appendChild(e)}if(-1!=n){const t=document.getElementsByClassName("thumb"),e=(t.length>1&&t[1].clientWidth?t[1].clientWidth:180)*n,i={x:document.getElementById("listContent").scrollLeft,y:0};new TWEEN.Tween(i).to({x:e,y:200},1e3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(()=>{document.getElementById("listContent").scrollLeft=i.x}).start()}console.log(history),history.pushState(null,null,document.URL),window.addEventListener("popstate",(function(){history.pushState(null,null,document.URL)})),document.addEventListener("keyup",f),document.getElementById("play").addEventListener("click",_)}function c(){window.removeEventListener("popstate",(function(){history.pushState(null,null,document.URL)})),document.removeEventListener("keyup",f),document.getElementById("play").removeEventListener("click",_)}function d(t){const e=document.getElementById("listContent").childNodes;for(let t=0;t<e.length-1;t++)"panoSelect"===e[t].className&&(e[t].className="pano");if(t){document.getElementById("listContent").firstChild.className="panoSelect";document.getElementById("play").style.backgroundImage='url("./nanimages/play4.png")',document.getElementById("listContent").scrollLeft=0}else{document.getElementById("play").style.backgroundImage='url("./nanimages/play_click.png")'}}function p(t){var e=t;return e.length>180&&(e=e.substr(0,180)+"..."),e}function m(t){const e=document.getElementById("listContent").childNodes;for(let n=0;n<e.length;n++)if("panoSelect"===e[n].className){e[n].className="pano";let i=-1;i=t?n===e.length-1?0:n+1:0===n?e.length-1:n-1,l.idx=i,e[i].className="panoSelect";document.getElementById("cover").setAttribute("data-id",i);const o=document.getElementsByClassName("thumb"),r=(o.length>1&&o[1].clientWidth?o[1].clientWidth:180)*i,s={x:document.getElementById("listContent").scrollLeft,y:0};new TWEEN.Tween(s).to({x:r,y:200},1e3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(()=>{document.getElementById("listContent").scrollLeft=s.x}).start();n=e.length}}function _(){const t=document.getElementById("cover"),e="tip.html?id="+t.getAttribute("data-id")+"&backurl="+t.getAttribute("data-backurl");console.log("url",e),c(),window.location.href=e}function f(t){switch(t.keyCode){case 38:d(!1);break;case 40:d(!0);break;case 37:m(!1);break;case 39:m(!0);break;case 13:_()}}function g(){requestAnimationFrame(g),TWEEN.update()}h(),g();var y=new tvSysBtnBind({id:"Jdoc",className:"ctrlBtn",currentClass:"current",keyRemoveDefault:!1,effect:"base",currentIndex:0,onLoad:function(t){},onPress:function(){this.event.keyCode},onEnterPress:function(){},onBack:function(){const t=document.getElementById("cover").getAttribute("data-backurl");console.log("backurl",t),c();const e="pano3.html?backurl="+t;document.getElementById("debug").innerHTML+="<br>"+e,window.location.href=e}});
|