<?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>Daniel&#039;s Blog &#187; code</title>
	<atom:link href="http://www.daniels.net.nz/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daniels.net.nz</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sun, 25 Sep 2011 02:14:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Some HTML5+CSS3+Touch experiments</title>
		<link>http://www.daniels.net.nz/2011/06/some-html5css3touch-experiments/</link>
		<comments>http://www.daniels.net.nz/2011/06/some-html5css3touch-experiments/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 22:14:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.daniels.net.nz/?p=103</guid>
		<description><![CDATA[I had been talking on my Twitters about experimenting with HTML5+CSS3 with touch events a few times, so I thought I should share as someone out there might find these useful. I got my iPad to play around with touch, and it&#8217;s already given me a few ideas about what to do next. The Canvas [...]]]></description>
			<content:encoded><![CDATA[<p>I had been talking on my Twitters about experimenting with HTML5+CSS3 with touch events a few times, so I thought I should share as someone out there might find these useful. I got my iPad to play around with touch, and it&#8217;s already given me a few ideas about what to do next.</p>
<p>The <a href="http://play.daniels.net.nz/html5/canvas.html">Canvas experiment</a> was my first foray into touch events. Put your finger down, and it draws circles. Put two fingers down, it draws lots of circles. Put all 10 of your fingers down, and you have a storm of circles.</p>
<p>This uses the touchmove event to loop through all the fingers that are passed through the <a href="http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchEventClassReference/TouchEvent/TouchEvent.html#//apple_ref/javascript/cl/TouchEvent">touch event handler</a>, drawing a circle at each.</p>
<p>The <a href="http://play.daniels.net.nz/html5/flick.html">Flick experiment</a> was on applying CSS3 transforms and animations to make a nice smooth effect when you attempted to drag around a box. I&#8217;m planning on applying this to <a href="http://www.getahome.co.nz">Get a Home</a> for the photo pop-up.</p>
<p>Put your finger on the box and drag left/right. Let go and it&#8217;ll animate back to its original position. Not only is it using Touch events, but also <a href="http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/WebKitTransitionEventClassReference/WebKitTransitionEvent/WebKitTransitionEvent.html">WebKit Transition Events</a>. Basically, in the touchend event, I apply the CSS3 &#8220;Transition&#8221; property &#8211; &#8220;all 0.25s ease&#8221; &#8211; and then remove the &#8220;Transform&#8221; property. It makes this nice effect that you&#8217;d be used to when, say, you don&#8217;t drag your finger enough to go further in a list, or even you are at the end of the list and get that bounce effect.</p>
<p>You can use them in Chrome, but you won&#8217;t get the full effect. Plus it appears that Chrome 14-dev is rather broken right now with Canvas. (However, while developing the Flick experiment, I found that Safari Mobile ran it better than Chrome-dev did).</p>
<p>Feel free to modify either as you see fit. There are a lot of effects you can play around with in the Flick experiment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daniels.net.nz/2011/06/some-html5css3touch-experiments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

