<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Darren Hall</title>
	<atom:link href="http://www.darrenhall.info/feed" rel="self" type="application/rss+xml" />
	<link>http://www.darrenhall.info</link>
	<description></description>
	<lastBuildDate>Tue, 14 Feb 2012 10:32:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Having Email Fun Without Images</title>
		<link>http://www.darrenhall.info/development/having-email-fun-without-images</link>
		<comments>http://www.darrenhall.info/development/having-email-fun-without-images#comments</comments>
		<pubDate>Sun, 15 Jan 2012 00:07:41 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=393</guid>
		<description><![CDATA[After seeing some pretty cool emails from Pizza Express I&#8217;ve been itching to do something similar for ...]]></description>
			<content:encoded><![CDATA[<p>After seeing <a href="http://www.emaildesignreview.com/email-design-inspiration/email-inspiration-pizza-express-optimising-for-no-images-1216/">some pretty cool emails from Pizza Express</a> I&#8217;ve been itching to do something similar for a while, building an email that looks great when images are turned off!<span id="more-393"></span></p>
<p>Now, of course all your emails should look great when images are turned off, but what Pizza Express has been doing is extra special and using table cells to create pixelated versions of images when they&#8217;re turned off.</p>
<p>Our Christmas email at work used pixelated artwork which provided a great use for this technique. By using table cells to create the images they&#8217;re visible whether or not images are turned on.</p>
<p>I used the table method sparingly to keep the HTML to content ratio as low as possible and avoid tripping the spam alarms, so there are still images in the emailer, but I think the effect that you can get is very effective and definitely something more people should be trying!</p>
<p>What I especially like about this technique is that there&#8217;s no new technology involved and it won&#8217;t only be viewed by people with the latest browsers. It&#8217;s just a great idea using existing methods!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/having-email-fun-without-images/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Beginning</title>
		<link>http://www.darrenhall.info/misc/a-new-beginning</link>
		<comments>http://www.darrenhall.info/misc/a-new-beginning#comments</comments>
		<pubDate>Sun, 27 Nov 2011 10:37:48 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=387</guid>
		<description><![CDATA[I&#8217;ve been neglecting this blog of late, but I have an excuse all lined up! I&#8217;ve started ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been neglecting this blog of late, but I have an excuse all lined up! I&#8217;ve started my new job at <a href="http://www.cube3marketing.com/" target="_blank">Cube³</a> as Digital Project Manager, and I have to say, it&#8217;s great! No, I really have to say that, otherwise they&#8217;ll sack me.<img title="More..." src="http://www.darrenhall.info/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /><span id="more-387"></span>My previous management roles have always included a large amount of development, but now I&#8217;ve left that all behind to focus solely on project management. I had worried that I might miss development and all the problem solving that makes it enjoyable for me, but I&#8217;ve found more than enough problems to solve managing projects to keep me occupied!</p>
<p>It&#8217;s been great though, and aside from the job itself the people are all right too! Oh, apart from one thing: they don&#8217;t drink nearly enough tea! Or make it for that matter (yes I&#8217;m talking about you Chris)!</p>
<p>I&#8217;m sure I&#8217;ll keep posting about development, I may be a project manager by trade now but in my heart I&#8217;ll always be a developer! Who knows though, there might even be a few project management posts coming too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/misc/a-new-beginning/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Creative QR Codes</title>
		<link>http://www.darrenhall.info/development/creating-creative-qr-codes</link>
		<comments>http://www.darrenhall.info/development/creating-creative-qr-codes#comments</comments>
		<pubDate>Wed, 21 Sep 2011 14:20:20 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Barcodes]]></category>
		<category><![CDATA[Pixels]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=358</guid>
		<description><![CDATA[QR codes are so hot right now, and clients are going gaga for them. They want them ...]]></description>
			<content:encoded><![CDATA[<p>QR codes are so hot right now, and clients are going gaga for them. They want them on their brochures, flyers, business cards, etc. Some even want them on their websites, but we <del>bitch slap</del> educate them and move on. <span id="more-358"></span></p>
<p>If you&#8217;ve been living under a rock, QR stands for &#8216;Quick Response&#8217;. QR codes can be scanned by smartphones and can contain links, vCards, text, etc. They can even initiate phone calls and text messages. They&#8217;re basically a great way for people on the move to grab a chunk of information quickly, saving them the hassle of typing a URL or contact into their phone.</p>
<p>There are loads of <a href="http://mashable.com/2011/07/23/creative-qr-codes/" target="_blank">examples of beautiful and creative QR codes</a> out there, including some great <a href="http://www.webdesignerdepot.com/2011/07/30-creative-qr-code-business-cards/" target="_blank">creative QR code business cards</a>. These are all great, but I&#8217;m a mere mortal, not some QR code designing genius. How easy will it be for me to create some funky QR codes?</p>
<p>The answer it seems, is really quite easy! Start off by generating a QR code, there are many online services available that do this for free. I&#8217;m using the <a href="http://qrcode.good-survey.com/" target="_blank">QR Code Platform</a> by Good Survey, mainly because it looks dead good, but also because it&#8217;s got a lot of advanced customisation features for creating codes with images in.</p>
<p>I&#8217;m just encoding a URL, so I enter that and then click &#8216;Show advanced options&#8217;. Here I&#8217;m going to change the Version (density) to 5, which gives me more pixels to play with. I&#8217;m also changing the error correction to H, which should give me a larger area to plop my picture in. The last thing I do is check the &#8216;Add Logo image box&#8217;.</p>
<p>After you press &#8216;Continue&#8217; you&#8217;ll see your QR code, you can then browse for an image to stick in it. I&#8217;m using this as a placeholder, so that I can create the actual image I want in Photoshop. If you use a transparent PNG then the QR code will fit around the image nicely. You can shift the position of the image around, and you&#8217;ll see at the top of the QR code can be read or not.</p>
<p>Once I&#8217;ve saved off the QR code that&#8217;s been generated, I take it into Photoshop. I take out the placeholder image I added and add my own in. I want a pixelated style, but you can stick whatever you like in there!</p>
<p><img class="alignright size-full wp-image-369" title="" src="http://www.darrenhall.info/wp-content/uploads/2011/09/qr-cube.gif" alt="" width="99" height="99" />So this is my first attempt at a custom QR code, it&#8217;s a pixelated version of a logo. I could have just stuck the real logo in there, but I was trying to replicate the style of the <a href="http://whomwah.com/2008/03/12/more-fun-with-qr-codes-and-the-bbc-logo/" target="_blank">BBC QR code</a>.</p>
<p><strong>Top Tip:</strong> Obviously if you&#8217;re using your QR codes on screen you&#8217;ll want them nice and crisp. So when you save for web, make sure you change the &#8216;Quality&#8217; setting from &#8216;Bicubic&#8217; to &#8216;Nearest Neighbour&#8217;. You might have to do a quick calculation to get everything looking square.</p>
<p><img class="alignleft size-full wp-image-372" src="http://www.darrenhall.info/wp-content/uploads/2011/09/qr-chunk.gif" alt="" width="111" height="111" />Just for fun, here&#8217;s a slightly more elaborate example, with a Chunk monster in there! Again, it&#8217;s pixelated but you can put anything of any shape in a QR code. As long as there&#8217;s enough code to be scanned then you&#8217;re fine.</p>
<p>I&#8217;m no designer, so these aren&#8217;t works of art, but they do show that practically anyone can spice up their QR codes with no trouble at all!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/creating-creative-qr-codes/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Protecting Passwords</title>
		<link>http://www.darrenhall.info/misc/protecting-passwords</link>
		<comments>http://www.darrenhall.info/misc/protecting-passwords#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:06:33 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=353</guid>
		<description><![CDATA[I&#8217;ve been using LastPass for a couple of months now, and it&#8217;s actually brilliant. Basically it stores ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using LastPass for a couple of months now, and it&#8217;s actually brilliant. Basically it stores all of my passwords securely online and by means of a browser plugin can automatically fill in all my online forms without storing the info in the browser. This is great at work where I don&#8217;t want to store my passwords in Firefox for all to access! I can also access the passwords via their site, or an iPhone app. What it also means is that I can replace the one password that I pretty much used everywhere (Yes, I know!) with unique 20 digit, alpha, numeric and special character passwords. Much more secure!<span id="more-353"></span></p>
<p>The reason I switched was after leaving my Mac with Apple to be fixed and then having to give them my password because I forgot to take it off, but I wish I&#8217;d have done it years ago. How many times have you registered on a site and got an email confirming your password or when you&#8217;ve forgotten it they just send it to you? I&#8217;m shuddering at the thought of them storing my password in plain text for anyone to see or steal.</p>
<p>I&#8217;m sure a great many of us are guilty of doing it. I&#8217;ve worked on content management systems which allow the admins to see people&#8217;s passwords, passwords that they obviously use everywhere. It&#8217;s criminal! Whenever I build a content management system, or any system that stores passwords, I make sure I hash and salt them. Users have to reset rather than be sent their new password, but it makes it harder for hackers to get hold of users&#8217;s passwords.</p>
<p>Most people probably aren&#8217;t aware of how websites are storing their passwords, or even why it matters. Even with high profile hacks like those on Sony&#8217;s PlayStation Network, people are still using one password across all of their accounts, usually with the same email address or username. Why? Because it&#8217;s easy. Who can be bother remembering umpteen passwords when you can just use one?</p>
<p>This is what hackers pray on. They have your username or email and your password, which they can then try on all the usual sites. They could access your email, your Facebook, Twitter, etc. From there who knows where they could go, or what they could get into. You might as well kiss your identity and your bank account goodbye! You could very easily blame the website storing your data if it falls into the wrong hands, but if you&#8217;re only using one password for everything you&#8217;re really not doing yourself any favours, especially when there are services like <a href="https://lastpass.com/" target="_blank">LastPass</a> and <a href="https://agilebits.com/products/1Password" target="_blank">1Password</a> making it easier than ever to use secure passwords.</p>
<p>Unfortunately, we don&#8217;t have much control over how the websites we use store our passwords. What we do have control over though, are the passwords we give them. How secure are your passwords?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/misc/protecting-passwords/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Premium Pixels Image Gallery In HTML</title>
		<link>http://www.darrenhall.info/development/premium-pixels-image-gallery-in-html</link>
		<comments>http://www.darrenhall.info/development/premium-pixels-image-gallery-in-html#comments</comments>
		<pubDate>Tue, 06 Sep 2011 20:27:25 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=346</guid>
		<description><![CDATA[I&#8217;ve taken the Premium Pixels Image Gallery Design (PSD) and turned it into HTML, as a means ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve taken the <a href="http://www.premiumpixels.com/freebies/image-gallery-design-psd/" target="_blank">Premium Pixels Image Gallery Design (PSD)</a> and turned it into HTML, as a means of testing what I can do with CSS3. I&#8217;m pretty pleased with what I&#8217;ve been able to accomplish using CSS rather than images.<span id="more-346"></span></p>
<p>The image above is a comparison of the PSD (top) and the HTML (bottom). The only images I used are the thumbnails. All of the corners, shadows, bevels and borders are done in CSS. I could have very easily accomplished all of this with a couple of images, but I wanted to see how faithfully I could recreate the design without them.</p>
<p>It was a really nice experiment and I learned a few things that are obvious when you think about them, but not things you might think about! Pseudo-elements can&#8217;t be modified by JavaScript, as they&#8217;re not part of the DOM and CSS gradients are background images, so if you set <code>background</code> as a gradient and then set <code>background-image</code> to none, your gradient will disappear. A couple of &#8220;duh!&#8221; moments there!</p>
<p>I did use jQuery to set some background images, which I could have done using hardcoded styles, but you would never want to have a style for each gallery image. If users have JavaScript turned off, it degrades nicely enough and still works, although doesn&#8217;t look as nice.</p>
<p>You can <a href="http://dev.darrenhall.info/demo/pp-image-gallery/" target="_blank">view the demo</a> or get the source from my <a href="https://bitbucket.org/darrenhall/pp-image-gallery/" target="_blank">Bitbucket repository</a>. As it&#8217;s just an experiment of what can be done in CSS3 I&#8217;ve only tested and got it working in the latest versions of Internet Explorer, Firefox, Chrome, Safari and Opera. The gallery isn&#8217;t actually functional, in terms of loading in images when clicking on thumbnails either.</p>
<p>If anyone has any suggestions or questions then please feel fee to drop me a comment! :D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/premium-pixels-image-gallery-in-html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Busy With CSS3</title>
		<link>http://www.darrenhall.info/development/getting-busy-with-css3</link>
		<comments>http://www.darrenhall.info/development/getting-busy-with-css3#comments</comments>
		<pubDate>Mon, 05 Sep 2011 08:43:49 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Mercurial]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=341</guid>
		<description><![CDATA[I&#8217;m a big fan of Premium Pixels, by Orman Clark and love his little freebies that he ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://www.premiumpixels.com/" target="_blank">Premium Pixels</a>, by Orman Clark and love his little freebies that he gives away every now and then. What annoys me about them is that they&#8217;re just designs, I want it to work! For ages I&#8217;ve sat there going &#8220;I wish someone would code these up!&#8221;. Can you see where I&#8217;m going with this one? For ages I&#8217;ve also wanted to play with CSS3 and see how far I could push it. Cue eureka! moment&#8230;<span id="more-341"></span></p>
<p>I&#8217;m starting with the most recent freebie which is an <a href="http://www.premiumpixels.com/freebies/image-gallery-design-psd/" target="_blank">image gallery design</a>.I&#8217;m also getting started with Mercurial, so I&#8217;m hosting this little test on Bitbucket. I&#8217;ve done my first commit, and got it to a stage where I have the thumbnail grid done, complete with rollovers. Everything except the actual thumbnail image is CSS.</p>
<p>My next step is to get the main image in, and then start making it compatible with more browsers than just Mozilla and Webkit. I&#8217;m quite pleased with it (and myself!) so far though, and it&#8217;s been good to see how far I can push CSS3 into doing what I want.</p>
<p>You can download the source, and do lots of Mercuial type stuff over at the <a href="https://bitbucket.org/darrenhall/pp-image-gallery/" target="_blank">Bitbucket repository</a>, or you can <a href="http://dev.darrenhall.info/demo/pp-image-gallery/" target="_blank">view the demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/getting-busy-with-css3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designer Slash Model</title>
		<link>http://www.darrenhall.info/misc/designer-slash-model</link>
		<comments>http://www.darrenhall.info/misc/designer-slash-model#comments</comments>
		<pubDate>Thu, 01 Sep 2011 08:41:29 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=338</guid>
		<description><![CDATA[This brilliant mockumentary from Digital Kitchen is a bit of an oldie now, but still makes me ...]]></description>
			<content:encoded><![CDATA[<p>This brilliant mockumentary from <a href="http://www.d-kitchen.com/" target="_blank">Digital Kitchen</a> is a bit of an oldie now, but still makes me laugh every time I watch it! Check out <a href="http://www.designerslashmodel.com" target="_blank">Designer Slash Model</a> for some more funny clips and content! Remember, perfect people create perfect designs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/misc/designer-slash-model/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I&#8217;m Considering A Distributed Version Control System</title>
		<link>http://www.darrenhall.info/development/why-im-considering-a-distributed-version-control-system</link>
		<comments>http://www.darrenhall.info/development/why-im-considering-a-distributed-version-control-system#comments</comments>
		<pubDate>Tue, 30 Aug 2011 10:51:47 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HG]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[VCS]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=332</guid>
		<description><![CDATA[I&#8217;ve been using Subversion for a good few years now, it&#8217;s saved my bacon many a time ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Subversion for a good few years now, it&#8217;s saved my bacon many a time and I really believe that everyone should a Version Control System in place, however, whilst Subversion has served me well, I do have a few issues with it.<span id="more-332"></span></p>
<p>I&#8217;m not a fan of the way Subversion keeps track of changes, using the hidden directories in every directory you have. I&#8217;d much rather have it all in one place so that I don&#8217;t have to export everything, or worry when copying or moving folders.</p>
<p>Subversion doesn&#8217;t handle merges very well at all, and as a result I don&#8217;t create branches very often because I can&#8217;t be arsed with the headache I&#8217;m going to have later trying to merge it all back together.</p>
<p>Sometimes I&#8217;m not connected to the internet, and my repositories which are hosted on my domain, or at work can&#8217;t be accessed. This effectively means I can&#8217;t commit, which kinda leaves me stumped. :/</p>
<p>OK, so those are my main issues with Subversion, and it seems I&#8217;m not alone! I&#8217;m definitely moving towards a Distributed Version Control System for future projects. The problem I&#8217;m having is getting over the distributed part, there&#8217;s no master copy! I&#8217;m a bit of a control freak, so I like to know that there is one copy that&#8217;s right.</p>
<p>What I need to do is change the way I think about the process. In Subversion committing is like publishing, people can then see and check-out your changes. With DVCS you can have you own private copy of the repository and then you can merge in your changes to the &#8216;master&#8217; one later. Because the repository is on your machine, you don&#8217;t need to be connected to the network or internet to do it.</p>
<p>I&#8217;m looking at the two big boys of DVCS: <a href="http://git-scm.com/" target="_blank">Git</a> and <a href="http://mercurial.selenic.com/" target="_blank">Mercurial</a>. Obviously I need to have an in-depth look at the pros and cons, and then a play with each before I decide. I&#8217;ll keep you posted!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/why-im-considering-a-distributed-version-control-system/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infinite CSS Shapes</title>
		<link>http://www.darrenhall.info/development/infinite-css-shapes</link>
		<comments>http://www.darrenhall.info/development/infinite-css-shapes#comments</comments>
		<pubDate>Fri, 12 Aug 2011 14:06:10 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Maths]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=298</guid>
		<description><![CDATA[I&#8217;ve used CSS to create squares and rectangles (obviously), I&#8217;ve also created lozenges and circles, even triangles ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used CSS to create squares and rectangles (obviously), I&#8217;ve also created lozenges and circles, even triangles in CSS. I&#8217;ve seen hexagons and pentagons, but never the infinity symbol! It&#8217;s really cool, there&#8217;s also some nice stars and hearts!<span id="more-298"></span></p>
<p>It&#8217;s actually amazing what you can do with <code>:before</code> and <code>:after</code> pseudo-elements and a dash of Css3. I could make a really geeky joke about <code>#infinity:after</code>, but I&#8217;m not going to. Oh, wait.</p>
<p>Anyway! Check out this great article about <a href="http://css-tricks.com/examples/ShapesOfCSS/" target="_blank">CSS shapes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/infinite-css-shapes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nested Animation On Canvas</title>
		<link>http://www.darrenhall.info/development/nested-animation-on-canvas</link>
		<comments>http://www.darrenhall.info/development/nested-animation-on-canvas#comments</comments>
		<pubDate>Tue, 09 Aug 2011 12:19:53 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Maths]]></category>

		<guid isPermaLink="false">http://www.darrenhall.info/?p=254</guid>
		<description><![CDATA[I wanted to explore the possibility of using animated butterflies on a site I was doing, so ...]]></description>
			<content:encoded><![CDATA[<p>I wanted to explore the possibility of using animated butterflies on a site I was doing, so took the opportunity to try out some animation on Canvas using JavaScript. <span id="more-254"></span></p>
<p>I started by taking a vector drawing of a butterfly (I simplified it by removing some points) and saving as a SVG so I could easily extract the points. I can then draw the butterfly onto the canvas. To create animation the canvas is redrawn on whatever interval you set, I&#8217;ve gone for 20 times a second. To simulate the butterfly&#8217;s wings flapping I&#8217;ve simply adjusted the horizontal scaling.</p>
<p>To add the butterflies onto the canvas I start by using <code>context.save()</code>, which keeps a record of the current state of the canvas (scale, rotation etc). I can then use <code>context.translate(x,y)</code> to shift the insertion point of the canvas before I add the butterfly, I aslo use <code>context.rotate(r)</code> to move the butterfly around in a circle. I can then use <code>context.restore()</code> to reset the canvas to the state it was in before placing the butterfly.</p>
<p>Obviously a butterfly going round in circles isn&#8217;t a great example of animation, but you could quite easily make it go in random directions or along a path with a few changes to the code. In the end I decided not to use canvas animation, as I wanted hundres of butterflies, which ends up killing the browser.</p>
<p>You can <a onclick="window.open ($(this).attr('href'),'','width=550,height=300,location=0,menubar=0,scrollbars=0,status=0,toolbar=0,resizable=0'); return false;" href="http://dev.darrenhall.info/demo/nested-animation-on-canvas/index.html" target="_blank">view the demo</a>, and look at the source to see how I did it all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenhall.info/development/nested-animation-on-canvas/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

