code style

This commit is contained in:
afc163 2015-05-09 15:43:51 +08:00
parent 095ff4ca24
commit 70b0829836

View File

@ -26,342 +26,26 @@ $(function() {
}
return [style, anim, pers]
};
var bannerAnim = {
w: 2185,
h: 1062,
p_w: 0,
p_h: 0,
img: "https://t.alipayobjects.com/images/T1URpfXeXtXXXXXXXX.jpg",
lineData: [{
x: 225,
y: 785,
w: 70,
h: 70,
line: 3,
color: "#BEC4C8",
anim: "from-x-left",
rotate: -19,
circ: {
x: 10,
y: 10,
w: 50,
h: 50
}
}, {
x: 870,
y: 245,
w: 70,
h: 70,
line: 3,
color: "#BEC4C8",
anim: "from-x-left",
circ: {
x: 10,
y: 10,
w: 50,
h: 50
}
}, {
x: 940,
y: 455,
w: 230,
h: 110,
line: 3,
color: "#6EB4E0",
anim: "from-x-right",
circ: [{
x: 20,
y: 15,
w: 80,
h: 80
}, {
x: 125,
y: 15,
w: 80,
h: 80
}]
}, {
x: 1160,
y: 670,
w: 410,
h: 110,
line: 3,
color: "#F0776F",
anim: "from-y-bottom",
circ: [{
x: 60,
y: 15,
w: 80,
h: 80
}, {
x: 165,
y: 15,
w: 80,
h: 80
}, {
x: 285,
y: 15,
w: 80,
h: 80
}]
}, {
x: 1285,
y: 170,
w: 484,
h: 110,
line: 3,
color: "#BEC4C8",
anim: "from-y-top",
circ: [{
x: 30,
y: 15,
w: 80,
h: 80
}, {
x: 145,
y: 15,
w: 80,
h: 80
}, {
x: 265,
y: 15,
w: 80,
h: 80
}, {
x: 375,
y: 15,
w: 80,
h: 80
}]
}, {
x: 1330,
y: 520,
w: 70,
h: 70,
line: 3,
color: "#F0776F",
anim: "from-x-left",
circ: {
x: 10,
y: 10,
w: 50,
h: 50
}
}, {
x: 1435,
y: 365,
w: 200,
h: 190,
line: 3,
color: "#BEC4C8",
anim: "from-x-right",
circ: [{
x: 20,
y: 10,
w: 75,
h: 75
}, {
x: 110,
y: 10,
w: 75,
h: 75
}, {
x: 20,
y: 100,
w: 75,
h: 75
}, {
x: 110,
y: 100,
w: 75,
h: 75
}]
}, {
x: 1655,
y: 325,
w: 115,
h: 320,
line: 3,
color: "#F0776F",
anim: "from-x-right",
circ: [{
x: 25,
y: 15,
w: 75,
h: 75
}, {
x: 35,
y: 25,
w: 55,
h: 55
}, {
x: 25,
y: 115,
w: 75,
h: 75
}, {
x: 35,
y: 125,
w: 55,
h: 55
}, {
x: 25,
y: 225,
w: 75,
h: 75
}, {
x: 35,
y: 235,
w: 55,
h: 55
}]
}, {
x: 1680,
y: 735,
w: 70,
h: 70,
line: 3,
color: "#F0776F",
anim: "from-y-bottom",
circ: {
x: 10,
y: 10,
w: 50,
h: 50
}
}, {
x: 1845,
y: 485,
w: 115,
h: 410,
line: 3,
color: "#6EB4E0",
anim: "from-y-bottom",
circ: [{
x: 25,
y: 15,
w: 75,
h: 75
}, {
x: 35,
y: 25,
w: 55,
h: 55
}, {
x: 25,
y: 115,
w: 75,
h: 75
}, {
x: 35,
y: 125,
w: 55,
h: 55
}, {
x: 25,
y: 215,
w: 75,
h: 75
}, {
x: 35,
y: 225,
w: 55,
h: 55
}, {
x: 25,
y: 310,
w: 75,
h: 75
}, {
x: 35,
y: 320,
w: 55,
h: 55
}]
}, {
x: 1865,
y: 290,
w: 70,
h: 70,
line: 3,
color: "#F0776F",
anim: "from-y-top",
circ: {
x: 10,
y: 10,
w: 50,
h: 50
}
}, {
x: 1995,
y: 280,
w: 230,
h: 420,
line: 3,
color: "#6EB4E0",
anim: "from-x-right",
circ: [{
x: 25,
y: 30,
w: 75,
h: 75
}, {
x: 35,
y: 40,
w: 55,
h: 55
}, {
x: 25,
y: 175,
w: 75,
h: 75
}, {
x: 35,
y: 185,
w: 55,
h: 55
}, {
x: 25,
y: 310,
w: 75,
h: 75
}, {
x: 35,
y: 320,
w: 55,
h: 55
}, {
x: 130,
y: 30,
w: 75,
h: 75
}, {
x: 140,
y: 40,
w: 55,
h: 55
}, {
x: 130,
y: 175,
w: 75,
h: 75
}, {
x: 140,
y: 185,
w: 55,
h: 55
}, {
x: 130,
y: 310,
w: 75,
h: 75
}, {
x: 140,
y: 320,
w: 55,
h: 55
}]
}, ],
var bannerAnim={
w:2185,
h:1062,
p_w:0,
p_h:0,
img:"https://t.alipayobjects.com/images/T1URpfXeXtXXXXXXXX.jpg",
lineData:[
{x:225,y:785,w:70,h:70,line:3,color:"#BEC4C8",anim:"from-x-left",rotate:-19,circ:{x:10,y:10,w:50,h:50}},
{x:870,y:245,w:70,h:70,line:3,color:"#BEC4C8",anim:"from-x-left",circ:{x:10,y:10,w:50,h:50}},
{x:940,y:455,w:230,h:110,line:3,color:"#6EB4E0",anim:"from-x-right",circ:[{x:20,y:15,w:80,h:80},{x:125,y:15,w:80,h:80}]},
{x:1160,y:670,w:410,h:110,line:3,color:"#F0776F",anim:"from-y-bottom",circ:[{x:60,y:15,w:80,h:80},{x:165,y:15,w:80,h:80},{x:285,y:15,w:80,h:80}]},
{x:1285,y:170,w:484,h:110,line:3,color:"#BEC4C8",anim:"from-y-top",circ:[{x:30,y:15,w:80,h:80},{x:145,y:15,w:80,h:80},{x:265,y:15,w:80,h:80},{x:375,y:15,w:80,h:80}]},
{x:1330,y:520,w:70,h:70,line:3,color:"#F0776F",anim:"from-x-left",circ:{x:10,y:10,w:50,h:50}},
{x:1435,y:365,w:200,h:190,line:3,color:"#BEC4C8",anim:"from-x-right",circ:[{x:20,y:10,w:75,h:75},{x:110,y:10,w:75,h:75},{x:20,y:100,w:75,h:75},{x:110,y:100,w:75,h:75}]},
{x:1655,y:325,w:115,h:320,line:3,color:"#F0776F",anim:"from-x-right",circ:[{x:25,y:15,w:75,h:75},{x:35,y:25,w:55,h:55},{x:25,y:115,w:75,h:75},{x:35,y:125,w:55,h:55},{x:25,y:225,w:75,h:75},{x:35,y:235,w:55,h:55}]},
{x:1680,y:735,w:70,h:70,line:3,color:"#F0776F",anim:"from-y-bottom",circ:{x:10,y:10,w:50,h:50}},
{x:1845,y:485,w:115,h:410,line:3,color:"#6EB4E0",anim:"from-y-bottom",circ:[{x:25,y:15,w:75,h:75},{x:35,y:25,w:55,h:55},{x:25,y:115,w:75,h:75},{x:35,y:125,w:55,h:55},{x:25,y:215,w:75,h:75},{x:35,y:225,w:55,h:55},{x:25,y:310,w:75,h:75},{x:35,y:320,w:55,h:55}]},
{x:1865,y:290,w:70,h:70,line:3,color:"#F0776F",anim:"from-y-top",circ:{x:10,y:10,w:50,h:50}},
{x:1995,y:280,w:230,h:420,line:3,color:"#6EB4E0",anim:"from-x-right",circ:[{x:25,y:30,w:75,h:75},{x:35,y:40,w:55,h:55},{x:25,y:175,w:75,h:75},{x:35,y:185,w:55,h:55},{x:25,y:310,w:75,h:75},{x:35,y:320,w:55,h:55}, {x:130,y:30,w:75,h:75},{x:140,y:40,w:55,h:55},{x:130,y:175,w:75,h:75},{x:140,y:185,w:55,h:55},{x:130,y:310,w:75,h:75},{x:140,y:320,w:55,h:55}]},
],
init: function() {
var self = this;
self.box = $(".banner-box");