02.06.2013 Views

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Download from Wow! eBook <br />

context.lineWidth = 1;<br />

function makeStripe(props) {<br />

context.beginPath();<br />

context.moveTo(props.startX, props.startY);<br />

context.lineTo(props.line1X, props.line1Y);<br />

context.lineTo(props.line2X, props.line2Y);<br />

context.lineTo(props.line3X, props.line3Y);<br />

context.fill();<br />

context.closePath();<br />

}<br />

setTimeout(function() { makeStripe({<br />

startX: 50, startY: 50,<br />

line1X: 195, line1Y: 125,<br />

line2X: 165, line2Y: 125,<br />

line3X: 50, line3Y: 66<br />

})}, 1);<br />

setTimeout(function() { makeStripe({<br />

startX: 450, startY: 50,<br />

line1X: 305, line1Y: 125,<br />

line2X: 275, line2Y: 125,<br />

line3X: 422, line3Y: 50<br />

})}, 50);<br />

setTimeout(function() { makeStripe({<br />

startX: 450, startY: 250,<br />

line1X: 310, line1Y: 175,<br />

line2X: 335, line2Y: 175,<br />

line3X: 450, line3Y: 235<br />

})}, 100);<br />

setTimeout(function() { makeStripe({<br />

startX: 50, startY: 250,<br />

line1X: 200, line1Y: 175,<br />

line2X: 225, line2Y: 175,<br />

line3X: 80, line3Y: 250<br />

})}, 150);<br />

},<br />

growVertical = function() {<br />

if (height < 100 || width < 200) {<br />

if (height < 100) {<br />

context.beginPath();<br />

context.moveTo(pos.up.x, pos.up.y);<br />

[ 287 ]<br />

Chapter 10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!