mirror of
https://github.com/blasten/turn.js.git
synced 2025-04-05 12:36:24 +08:00
r3
This commit is contained in:
parent
93bff0157f
commit
c07524d05c
12
turn.js
12
turn.js
@ -21,8 +21,8 @@ var has3d,
|
||||
|
||||
isTouch = 'Touch' in window,
|
||||
|
||||
events = (isTouch) ? {start: 'touchstart', move: 'touchmove', end: 'touchend'}
|
||||
: {start: 'mousedown', move: 'mousemove', end: 'mouseup'},
|
||||
events = (isTouch) ? {start: 'touchstart', move: 'touchmove', end: 'touchend'}
|
||||
: {start: 'mousedown', move: 'mousemove', end: 'mouseup'},
|
||||
|
||||
// Contansts used for each corner
|
||||
// tl * tr
|
||||
@ -1512,14 +1512,18 @@ flipMethods = {
|
||||
gradient(data.ashadow,
|
||||
point2D(left?100:0, top?100:0),
|
||||
point2D(gradientEndPointA.x, gradientEndPointA.y),
|
||||
[[gradientStartV, 'rgba(0,0,0,0)'], [((1-gradientStartV)*0.8)+gradientStartV, 'rgba(0,0,0,'+(0.2*gradientOpacity)+')'], [1, 'rgba(255,255,255,'+(0.2*gradientOpacity)+')']],
|
||||
[[gradientStartV, 'rgba(0,0,0,0)'],
|
||||
[((1-gradientStartV)*0.8)+gradientStartV, 'rgba(0,0,0,'+(0.2*gradientOpacity)+')'],
|
||||
[1, 'rgba(255,255,255,'+(0.2*gradientOpacity)+')']],
|
||||
3);
|
||||
|
||||
if (flipMethods._backGradient.call(that))
|
||||
gradient(data.bshadow,
|
||||
point2D(left?0:100, top?0:100),
|
||||
point2D(gradientEndPointB.x, gradientEndPointB.y),
|
||||
[[0.8, 'rgba(0,0,0,0)'], [1, 'rgba(0,0,0,'+(0.3*gradientOpacity)+')'], [1, 'rgba(0,0,0,0)']],
|
||||
[[0.8, 'rgba(0,0,0,0)'],
|
||||
[1, 'rgba(0,0,0,'+(0.3*gradientOpacity)+')'],
|
||||
[1, 'rgba(0,0,0,0)']],
|
||||
3);
|
||||
|
||||
};
|
||||
|
2
turn.min.js
vendored
2
turn.min.js
vendored
@ -1,4 +1,4 @@
|
||||
/* turn.js | turnjs.com | (c) 2012 Emmanuel Garcia | MIT Licensed */
|
||||
/* turn.js r3 | turnjs.com | (c) 2012 Emmanuel Garcia | MIT Licensed */
|
||||
(function(i){var x,y="",G=Math.PI,E=G/2,w="Touch"in window,I=w?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},N={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br"]},O=["single","double"],P={page:1,gradients:!0,duration:600,acceleration:!0,display:"double",when:null},Q={folding:null,corners:"forward",cornerSize:100,gradients:!0,duration:600,acceleration:!0},J={"0":{top:0,left:0,right:"auto",bottom:"auto"},1:{top:0,right:0,left:"auto",
|
||||
bottom:"auto"}},m=function(a,b,c,d){return{css:{position:"absolute",top:a,left:b,overflow:d||"hidden","z-index":c||"auto"}}},K=function(a,b,c,d,e){var f=1-e,C=f*f*f,h=e*e*e;return j(Math.round(C*a.x+3*e*f*f*b.x+3*e*e*f*c.x+h*d.x),Math.round(C*a.y+3*e*f*f*b.y+3*e*e*f*c.y+h*d.y))},j=function(a,b){return{x:a,y:b}},r=function(a,b,c){return x&&c?" translate3d("+a+"px,"+b+"px, 0px) ":" translate("+a+"px, "+b+"px) "},s=function(a){return" rotate("+a+"deg) "},p=function(a,b){return Object.prototype.hasOwnProperty.call(b,
|
||||
a)},R=function(){for(var a=["Moz","Webkit","Khtml","O","ms"],b=document.body.style,c=a.length,d="";c--;)a[c]+"Transform"in b&&(d="-"+a[c].toLowerCase()+"-");return d},L=function(a,b,c,d,e){var f,C=[];if("-webkit-"==y){for(f=0;f<e;f++)C.push("color-stop("+d[f][0]+", "+d[f][1]+")");a.css({"background-image":"-webkit-gradient(linear, "+b.x+"% "+b.y+"%, "+c.x+"% "+c.y+"%, "+C.join(",")+" )"})}else{var h=c.x-b.x;f=c.y-b.y;var i=Math.atan2(f,h),g=i-Math.PI/2,g=Math.abs(100*Math.sin(g))+Math.abs(100*Math.cos(g)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user