|
@@ -1962,7 +1962,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
var a = oe(e.originalEvent);
|
|
|
(ge.scrollTrap || a > 0 && Ce.dest < Ce.end || 0 > a && Ce.dest > Ce.start) && r(e, 1),
|
|
|
ye.slideBy(ge.scrollBy * a)
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
function ce(e) {
|
|
|
ge.clickBar && e.target === Be[0] && (r(e),
|
|
@@ -1999,6 +1999,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
T[he].call(ye, e, t)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var he, me, ge = e.extend({}, n.defaults, h), ye = this, we = l(t), be = e(t), Pe = ge.slidee ? e(ge.slidee).eq(0) : be.children().eq(0), Ie = 0, ze = 0, Ce = {
|
|
|
start: 0,
|
|
|
center: 0,
|
|
@@ -2022,6 +2026,8 @@ window.Modernizr = function(n, e, t) {
|
|
|
delta: 0,
|
|
|
resetTime: 200
|
|
|
}, it = 0, rt = 0, st = 0, ot = 0;
|
|
|
+
|
|
|
+
|
|
|
we || (t = be[0]),
|
|
|
ye.initialized = 0,
|
|
|
ye.frame = t,
|
|
@@ -2255,7 +2261,11 @@ window.Modernizr = function(n, e, t) {
|
|
|
ge.next && Ge.on(B, se),
|
|
|
ge.prevPage && Je.on(B, se),
|
|
|
ge.nextPage && Ke.on(B, se),
|
|
|
- Ue.on(C, le),
|
|
|
+
|
|
|
+ Ue.on(C, le),// C是 "wheel.sly" 滚动监听
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Be[0] && Be.on(B, ce),
|
|
|
Re && ge.activateOn && be.on(ge.activateOn + "." + g, "*", ue),
|
|
|
De[0] && ge.activatePageOn && De.on(ge.activatePageOn + "." + g, "*", fe),
|
|
@@ -3670,8 +3680,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
,
|
|
|
n.prototype.update = function(e) {
|
|
|
- e || (e = 1 / 60),
|
|
|
- this.rotationSpeed.multiplyScalar(1 - o.rotationFriction).addScaledVector(this.rotationAcceleration, o.rotationAccelerationOutside * e),
|
|
|
+ e || (e = 1 / 60)
|
|
|
+ var friction = Math.min(1, o.rotationFriction * e * 60) //add 如果deltaTime > 1/ 60 (比较卡),就增加rotationFriction, 以防止转动过久
|
|
|
+ this.rotationSpeed.multiplyScalar(1 - friction).addScaledVector(this.rotationAcceleration, o.rotationAccelerationOutside * e),
|
|
|
this.rotateLeft(-this.rotationSpeed.x),
|
|
|
this.noRotateUpDown || this.rotateUp(this.rotationSpeed.y),
|
|
|
this.updatePan(e);
|
|
@@ -4262,9 +4273,11 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.rotationHistory.shift();
|
|
|
this.lon += this.rotationDifference.x,
|
|
|
this.lat += this.rotationDifference.y,
|
|
|
- this.rotationDifference.set(0, 0),
|
|
|
- this.rotationSpeed.x = this.rotationSpeed.x * (1 - a.rotationFriction) + this.rotationAcc.x * a.rotationAccelerationInside,
|
|
|
- this.rotationSpeed.y = this.rotationSpeed.y * (1 - a.rotationFriction) + this.rotationAcc.y * a.rotationAccelerationInside,
|
|
|
+ this.rotationDifference.set(0, 0)
|
|
|
+ //改
|
|
|
+ var friction = Math.min(1, a.rotationFriction * e * 60) //如果deltaTime > 1/ 60 (比较卡),就增加rotationFriction, 以防止转动过久
|
|
|
+ this.rotationSpeed.x = this.rotationSpeed.x * (1 - friction) + this.rotationAcc.x * a.rotationAccelerationInside,
|
|
|
+ this.rotationSpeed.y = this.rotationSpeed.y * (1 - friction) + this.rotationAcc.y * a.rotationAccelerationInside,
|
|
|
this.lon += this.rotationSpeed.x * e,
|
|
|
this.lat += this.rotationSpeed.y * e
|
|
|
|
|
@@ -6864,8 +6877,28 @@ window.Modernizr = function(n, e, t) {
|
|
|
$("#status").find(".curIdx").text(t + 1);
|
|
|
for (var i = 0; i <= t; i++)
|
|
|
$("#progressBar").find("[data-idx='" + i + "']").addClass("active")
|
|
|
- }),
|
|
|
+ }),
|
|
|
w()
|
|
|
+
|
|
|
+ //add :
|
|
|
+
|
|
|
+ let scrollFrame = $(W.frame)
|
|
|
+ scrollFrame.on("wheel.sly", function() {
|
|
|
+ lastMoveScrollTime = Date.now()
|
|
|
+ })
|
|
|
+
|
|
|
+ let dragstart
|
|
|
+ scrollFrame.on("pointerdown", function() {
|
|
|
+ dragstart = true
|
|
|
+ })
|
|
|
+ scrollFrame.on("pointerup", function() {
|
|
|
+ dragstart = false
|
|
|
+ })
|
|
|
+ scrollFrame.on("pointermove", function() {
|
|
|
+ if(dragstart){
|
|
|
+ lastMoveScrollTime = Date.now()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
function w() {
|
|
|
var e = $("#player").width() - 20
|
|
@@ -7042,7 +7075,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
f = "recent") : (f = "active",
|
|
|
p = "recent");
|
|
|
var g = null === n.destinationItem || n.currentItem[0] === n.destinationItem[0];
|
|
|
- for (r = 0; r < e.heroLocations.length; r += 1)
|
|
|
+ /* for (r = 0; r < e.heroLocations.length; r += 1)
|
|
|
s = y.eq(r),
|
|
|
a = I.eq(r),
|
|
|
s.removeClass(f),
|
|
@@ -7051,7 +7084,28 @@ window.Modernizr = function(n, e, t) {
|
|
|
a.addClass(p),
|
|
|
W.activate(r)) : n.onTheBus && g && r === n.currentItem[0] ? (s.addClass(p),
|
|
|
a.addClass(p)) : (s.removeClass(p),
|
|
|
- a.removeClass(p))
|
|
|
+ a.removeClass(p)) */
|
|
|
+
|
|
|
+ for (r = 0; r < e.heroLocations.length; r += 1){
|
|
|
+ s = y.eq(r),
|
|
|
+ a = I.eq(r),
|
|
|
+ s.removeClass(f),
|
|
|
+ a.removeClass(f);
|
|
|
+
|
|
|
+ if(n.onTheBus && r === n.destinationItem[0]){
|
|
|
+ s.addClass(p)
|
|
|
+ a.addClass(p)
|
|
|
+ if(Date.now() - lastMoveScrollTime > 2000){ //add 如果一段时间内用户不拖拽滚动scroll,才focus回这个item
|
|
|
+ W.activate(r) // scrollbar slide to this
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ n.onTheBus && g && r === n.currentItem[0] ?
|
|
|
+ (s.addClass(p), a.addClass(p)) :
|
|
|
+ (s.removeClass(p), a.removeClass(p))
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
} else
|
|
|
for (r = 0; r < e.heroLocations.length; r += 1)
|
|
|
s = y.eq(r),
|
|
@@ -7327,6 +7381,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
"A" === e.target.nodeName && e.preventDefault())
|
|
|
}, !0)
|
|
|
}
|
|
|
+
|
|
|
+ var lastMoveScrollTime = 0;//add
|
|
|
+
|
|
|
var W, j, Y, X, Z, q, K = (e("three"),
|
|
|
e("../util/ajax"),
|
|
|
e("../util/browser")), Q = e("../settings"), J = e("../analytics"), ee = (e("../util/transitions"),
|
|
@@ -21827,6 +21884,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
, i = g.average(e.changedTouches, "clientY");
|
|
|
this.handleInputEnd.call(this, t, i, !0)
|
|
|
}
|
|
|
+ //add
|
|
|
+ if (this.intersectHot) this.intersectHot.setHoverState(false)
|
|
|
+ this.intersectHot = null
|
|
|
}
|
|
|
,
|
|
|
n.prototype.onPointerDown = function(e) {
|