<?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>nooshu &#187; Browsers Archives </title>
	<atom:link href="http://nooshu.com/category/browsers/feed" rel="self" type="application/rss+xml" />
	<link>http://nooshu.com</link>
	<description>Kneeling on the shoulders of giants</description>
	<lastBuildDate>Sun, 15 Apr 2012 13:42:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Using the Fullscreen and Pointer Lock API&#8217;s</title>
		<link>http://nooshu.com/using-the-fullscreen-and-pointer-lock-apis?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-the-fullscreen-and-pointer-lock-apis</link>
		<comments>http://nooshu.com/using-the-fullscreen-and-pointer-lock-apis#comments</comments>
		<pubDate>Tue, 13 Mar 2012 13:17:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Three.js]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[three.js]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=2126</guid>
		<description><![CDATA[Browsers vendors are adding some very impressive features. Time to play with the Fullscreen and Pointer Lock API!]]></description>
			<content:encoded><![CDATA[<p>This post is a couple of months late due to real life getting in the way, but I finally got around to experimenting with the <a href="https://wiki.mozilla.org/Gecko:FullScreenAPI">Fullscreen</a> and <a href="https://developer.mozilla.org/en/API/Mouse_Lock_API">Pointer Lock API</a> (formally known as the Mouse Lock API). Both are still in the experimental stage, Pointer Lock especially. To get it to work you will have to be running the latest <a href="http://tools.google.com/dlpage/chromesxs">Canary build</a> of Chrome (currently 19.0.1067.0) and  enable it via about:flags. I&#8217;ve had no luck getting Pointer Lock working in the latest version of Firefox and <a href="http://www.mozilla.org/en-US/firefox/aurora/">Aurora</a>, even though most documentation on the API is written by Mozilla. Maybe there&#8217;s a setting I&#8217;m missing?</p>
<p>So what exactly do the Fullscreen and Pointer Lock API&#8217;s do you may ask. Well Fullscreen is obvious; it allows you to view any web content in fullscreen mode, removing the browser UI for distraction free reading. Pointer Lock gives a developer access to raw mouse movement data, not just the absolute position of the cursor. You are no longer limited to the size of the browser window, so you can scroll continuously in one direction without having to stop. Where both of these API&#8217;s come in very handy is the development of HTML5 games. It&#8217;s now possible to create a games like <a href="http://media.tojicode.com/q3bsp/">Quake 3</a> directly in the browser with usable controls&#8230; impressive!</p>
<p>To have a play with both API&#8217;s I put together a <a href="http://dl.dropbox.com/u/7851949/fullscreen-pointer-api/index.html">little experiment</a> using three.js and a panoramic image.</p>
<div id="attachment_2130" class="wp-caption alignnone" style="width: 528px"><a href="http://dl.dropbox.com/u/7851949/fullscreen-pointer-api/index.html"><img src="http://nooshu.com/wp-content/uploads/2012/03/panoramic-three-js.jpg" alt="Fullscreen, Pointer Lock and three.js" title="panoramic-three-js" width="518" height="236" class="size-full wp-image-2130" /></a><p class="wp-caption-text">What a beautiful day in Sydney, just round the corner from where I live.</p></div>
<p>I started by building on an excellent blog post by Paul Lewis called <a href="http://aerotwist.com/tutorials/create-your-own-environment-maps/">&#8220;Create your own environment maps&#8221;</a>. Using Microsoft&#8217;s Photosynth App and Blender it&#8217;s dead simple to create a panoramic image. After adapting Paul&#8217;s code to my needs, I added the Fullscreen and Pointer lock API&#8217;s. To enable Fullscreen mode press enter. If you have a compatible browser, the browser UI will disappear and you will enter fullscreen mode. If Pointer Lock is available, a prompt will appear asking for permission to hide your cursor. You will now be able to scroll left and right continuously without having to stop, if Pointer Lock isn&#8217;t available the demo will drop back to standard mouse co-ordinates.</p>
<p>A quick tip for working with both of these API&#8217;s: use a <a href="https://github.com/toji/game-shim/blob/master/game-shim.js">shim like that made by Brandon Jones</a>, it will save you a lot of cross browser pain! Browser vendors are still changing the way both of these API&#8217;s are implemented, so until this stabilises, using a shim is the way to go. Big thank you to Paul and Brandon for their excellent contributions.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/using-the-fullscreen-and-pointer-lock-apis/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML5 date input type on mobile</title>
		<link>http://nooshu.com/html5-date-input-type-on-mobile?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html5-date-input-type-on-mobile</link>
		<comments>http://nooshu.com/html5-date-input-type-on-mobile#comments</comments>
		<pubDate>Tue, 06 Mar 2012 12:36:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=2118</guid>
		<description><![CDATA[While developing a new mobile website I ran into an annoying issue while validating the input. Here's a solution, not nice but it works!]]></description>
			<content:encoded><![CDATA[<p>Whilst developing a new mobile only website, the UX team specified in the wireframes that a datepicker was needed for an input field; but nowhere else on the site was a datepicker used, so I really wanted to avoid using a <a href="http://jqueryui.com/demos/datepicker/">JavaScript heavy solution</a>. I couldn&#8217;t justify including so much extra JavaScript, CSS and images for so little usage. So what other options do we have?</p>
<p>Well there is a jQuery plug-in called <a href="http://code.google.com/p/mobiscroll/">Mobiscroll</a> which is around 16KB is size and works on iOS and Android devices. Unfortunately there&#8217;s no mention of Windows-based mobiles which is a real shame, as it&#8217;s almost a perfect solution. The other option we have is to take advantage of some cutting edge HTML5 form input types; the date input type. Support is <a href="http://www.quirksmode.org/html5/inputs_mobile.html">nowhere near 100%</a> yet, but if you approach its usage from a progressive enhancement standpoint, it works well. On mobile browsers that support it, the user gets a fancy datepicker that&#8217;s very intuitive; browsers that don&#8217;t simply drop back to a standard text input. It&#8217;s worth noting that <a href="http://www.modernizr.com/docs#inputtypes">Modernizr can&#8217;t detect that date inputs create a datepicker</a>, since Modernizr can&#8217;t do it I assume it isn&#8217;t possible. Damn!</p>
<div id="attachment_2120" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2012/03/date-type-input-mobile.gif"><img src="http://nooshu.com/wp-content/uploads/2012/03/date-type-input-mobile-518x420.gif" alt="An example of the date input type on iPhone, iPad and iPods." title="date-type-input-mobile" width="518" height="420" class="size-medium wp-image-2120" /></a><p class="wp-caption-text">The date input type as displayed on iOS mobile Webkit devices.</p></div>
<p>Once I&#8217;d decided on how the date picker was going to work (HTML5) it was time to implement it and test it across my available mobile browsers. Implementation was dead simple:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- Fancy datepicker on supported devices, standard text input on unsupported --&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;date&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fancyDate&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fancyDate&quot;</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Where things got a little tricky (and annoying) was the client-side validation of the input. Since the wireframes contained lots of forms with a varying range of input types and requirements, I decided to go with quite a heavyweight <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">validation script</a> (around 21KB minified). This turned out to be a very good decision in the end, as there are a few quirks to the date input element.</p>
<p>First thing I had to consider was how were users going to input the date when they don&#8217;t have the fancy datepicker? The most intuitive way (at least for me) is they simply enter in the format dd/mm/yyyy. Great, that&#8217;s sorted! And guess what, when a user uses the fancy datepicker it also returns a value of dd/mm/yyyy&#8230;. no, no it doesn&#8217;t! It looks like that&#8217;s the value that will be returned as that&#8217;s how it is displayed, but no, it&#8217;s never that easy. Webkit actually returns the date in the format yyyy-mm-dd, not quite what I was expecting! Unfortunately this breaks our validation as it is looking for a format of dd/mm/yyyy!</p>
<p>So what&#8217;s the fix? Well you could take the easy route and make your non-fancy datepicker users enter the date in the yyyy-mm-dd format; but that just feels wrong. No user is going to expect to enter a date like that, it&#8217;s completely unintuitive! No I&#8217;m afraid it&#8217;s going to take a little hack to fix this issue. The hack involves using a second input field of type &#8220;text&#8221;; when a user interacts with the fancy datepicker or enters in the date manually, the date is &#8220;cleaned up&#8221; and passed along to the second input field. You then do your form validation against this second field. You can see an example of this working <a href="http://dl.dropbox.com/u/7851949/html5-mobile-datepicker/form.html">here</a>.</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">/**<br />
&nbsp;* iOS input type=&quot;date&quot; returns a value of yyyy-mm-dd even when<br />
&nbsp;* it displays dd/mm/yyyy. This breaks validation. Fix for this using a second input.<br />
&nbsp;* Keyup event for testing in a browser, not needed for mobile.<br />
&nbsp;*/</span><br />
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;input[type='date']&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">on</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;blur keyup&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> $this <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; value <span style="color: #339933;">=</span> $this.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Does the input have &quot;-&quot;, if so it is from the webkit datepicker, fix it</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>value.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> cleanDateArray <span style="color: #339933;">=</span> value.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; value <span style="color: #339933;">=</span> cleanDateArray<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;/&quot;</span> <span style="color: #339933;">+</span> cleanDateArray<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;/&quot;</span> <span style="color: #339933;">+</span> cleanDateArray<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Set the hidden value to validate on, trigger the blur and keyup event for validation as you type</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#hiddenDateField&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;blur&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;keyup&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>A couple of points to note about using this method. Even though we aren&#8217;t validating the datepicker input, we still have to set &#8220;date: false&#8221; in the validation rules. This is because the validation plug-in automatically tries to validate date inputs. Validation fails because it doesn&#8217;t like the dd/mm/yyyy format. I&#8217;ve also used the dateITA method to validate the date on the &#8220;hidden&#8221; input (you can find this in the additional-methods.min.js file). This additional method is more robust than the plug-ins standard date validation. A minor pitfall with this hack is that setting the second input to type &#8220;hidden&#8221; will stop its validation; this is due to the validation plug-in ignoring hidden inputs. So to hide the input you can set &#8220;display: none&#8221; in the CSS (urghh I know, I feel dirty too!).</p>
<p>So there you have it, that&#8217;s how I solved validating a date input on mobile with fancy datepicker and standard text fallback. It&#8217;s not ideal by any means, but it works. Another solution would be writing a validator Regex that accepts both dd/mm/yyyy and yyyy-mm-dd date formats, but this means returning both types of dates to the server on submit. Due to server-side constraints with the project, this isn&#8217;t an option (boo!). Is there a much simpler method that I&#8217;m completely missing? If so please leave a comment! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/html5-date-input-type-on-mobile/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Loading HTML5 Elements with jQuery</title>
		<link>http://nooshu.com/remote-loading-html5-elements-with-jquery?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remote-loading-html5-elements-with-jquery</link>
		<comments>http://nooshu.com/remote-loading-html5-elements-with-jquery#comments</comments>
		<pubDate>Fri, 18 Nov 2011 10:31:28 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1946</guid>
		<description><![CDATA[Working with Internet Explorer is never easy. jQuery takes some of the pain out of it, but not always!]]></description>
			<content:encoded><![CDATA[<p>I ran into a rather annoying problem a few months ago while developing my <a href="http://solostrightnow.com/">travel blog</a>; the problem of course was involving Internet Explorer. I&#8217;m used to working with WordPress as I use it all the time, but I wanted to get away from the standard pagination you find on a blog. So I decided to use jQuery 1.6.4 to pull in articles from other pages (blogname.com/page/2, blogname.com/page/3 etc). Now this is all fairly simple using the handy jQuery .load() method; point it to a URL, pull in the page, pick the bits you need and reinsert into the page. Simple! Unfortunately once I got a prototype working in &#8216;good&#8217; browsers, IE8 and below was having non of it!</p>
<p>After a little head scratching to work out what was failing, I worked out it was because I was using HTML5 elements such as &#8216;article&#8217;, &#8216;header&#8217; and &#8216;footer&#8217;. There was no problem displaying them on the page, as I&#8217;d used Remy Sharps excellent <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">HTML5 Shiv script</a>. It only failed when trying to pull in these &#8216;new&#8217; elements via Ajax.</p>
<p><strong>Note</strong>: Before you read on you&#8217;ll be happy to hear that this issue no longer occurs in <a href="http://blog.jquery.com/2011/11/03/jquery-1-7-released/">jQuery 1.7.0</a>. Horray! </p>
<p>If you can&#8217;t upgrade, for whatever reason, I hashed together a <a href="http://dl.dropbox.com/u/7851949/html5-load-method/index.html">little work-around</a> for browsers IE8 and below, so read on. I admit the work around isn&#8217;t pretty, but it works. I tried for a few hours to get IE8- to recognise the &#8216;new&#8217; elements after an Ajax request, but to no avail. Eventually I had to wrap the HTML5 tags in a div using conditionals:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!--[if lt IE 9]&gt;&lt;div id=&quot;ieHackContainer&quot;&gt;&lt;![endif]--&gt;</span><br />
<br />
<span style="color: #009900;">&lt;article <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;html5Content&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;header&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>H2 wrapped in a header element<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Other HTML here... --&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;footer&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>This is the footer element<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span><br />
<br />
<span style="color: #808080; font-style: italic;">&lt;!--[if lt IE 9]&gt;&lt;/div&gt;&lt;![endif]--&gt;</span></div></td></tr></tbody></table></div>
<p>The div is added for browsers IE8 and below, you can then use it as a hook to pull in the elements inside the div. I was hoping that wrapping the HTML5 elements in a standard div would be the end of it, I&#8217;m afraid not. The .load() method still didn&#8217;t work, IE just ignored the elements it didn&#8217;t recognise. I used jQuerys much more customisable .ajax() method to fix the issue in IE6, 7 and 8:</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">//IE8- work around to load HTML5 elements into a page</span><br />
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#loadHTML5LinkOld&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;page_to_load.html&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> HTML<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Clear before load</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#html5LoadHolder&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//IE: Look for the hacky wrapper before insertion</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HTML <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>html<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div#ieHackContainer&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//If HTML var is empty assume using newer browsers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>HTML<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HTML <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>html<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#html5Content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Append to page</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#html5LoadHolder&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>HTML<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>This method works in all browsers I&#8217;ve tested in as I&#8217;ve added a fall back (or should that be forward?) for newer browsers. The solution isn&#8217;t ideal (I really hate the conditional comments), but older versions of IE aren&#8217;t going away any time soon, and it works. Maybe there&#8217;s a more obvious solution that I missed? Leave a comment if there is, I&#8217;d love to know!</p>
<p>You can see a working example <a href="http://dl.dropbox.com/u/7851949/html5-load-method/index.html">here</a>. The page I&#8217;m loading from is <a href="http://dl.dropbox.com/u/7851949/html5-load-method/page_to_load.html">here</a> and the JavaScript in full <a href="http://dl.dropbox.com/u/7851949/html5-load-method/js/html5test.js">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/remote-loading-html5-elements-with-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome Developer Tools at Google IO 2011</title>
		<link>http://nooshu.com/chrome-developer-tools-at-google-io-2011?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=chrome-developer-tools-at-google-io-2011</link>
		<comments>http://nooshu.com/chrome-developer-tools-at-google-io-2011#comments</comments>
		<pubDate>Wed, 18 May 2011 10:31:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1707</guid>
		<description><![CDATA[As a long time user of Firebug for Firefox, Google Chrome's Developer Tools are making me think about changing my debug tool!]]></description>
			<content:encoded><![CDATA[<p><iframe width="518" height="325" src="http://www.youtube.com/embed/N8SS-rUEZPg?rel=0&amp;hd=1&amp;modestbranding=1" frameborder="0" allowfullscreen></iframe></p>
<p>I&#8217;ve been a long time user of Firefox&#8217;s magnificent <a href="http://getfirebug.com/">Firebug extension</a>; I honestly cannot remember how I used to develop websites without it (can you?). Changing web pages on the fly and debugging issues in seconds rather than minutes, we really are spoiled. I thought it would be hard for any other debugging tool to come close to Firebug in terms of ease of use and available tool set. Oh how I was wrong!</p>
<p>Paul Irish and Pavel Feldman hosted a talk at this years Google I/O about Chrome Dev Tools and what&#8217;s new in the world of debugging in Chrome. I must admit, there were a number of jaw dropping moments in the video where it dawned on me how powerful the tools actually are. Here are a few of my favourite points:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=N8SS-rUEZPg&#038;feature=player_embedded#t=431s">7:11</a>: Chrome monitoring the changes to the style sheets and letting you know what has changed.</li>
<li><a href="http://www.youtube.com/watch?v=N8SS-rUEZPg&#038;feature=player_detailpage#t=475s">7:55</a>: Ability to revert back to different CSS versions. The Dev Tools automatically creates a new version as you change code.</li>
<li><a href="http://www.youtube.com/watch?v=N8SS-rUEZPg&#038;feature=player_detailpage#t=1262s">21:02</a>: A whole host of JavaScript debugging tools. Edit the script in the browser (with code colouring.. nice) rather than edit in IDE, upload, test, repeat&#8230;</li>
<li><a href="http://www.youtube.com/watch?v=N8SS-rUEZPg&#038;feature=player_detailpage#t=1831s">30:31</a>: My favourite part, the remote debugging feature. Chrome can act as a server meaning you can connect too and edit pages remotely. At first you may think &#8220;well, what&#8217;s the point?&#8221;. As this is being done at the WebKit level it will soon be available for all WebKit browsers including mobile devices. Debug mobiles browser directly from your desktop. Wow!</li>
</ul>
<p>I&#8217;m definitely going to have to wean myself off Firebug and give the Chrome Dev Tools a blast. As mentioned in the video, the tools are being developed all the time with new features landing daily (on dev channel). Looks like Firebug has some serious competition! If you&#8217;re a developer with 43 minutes to spare, watch the video, you won&#8217;t regret it.</p>
<p>A few helpful links mentioned in the video:</p>
<ul>
<li><a href="http://leaverou.me/css3patterns/">Lea Verous CSS3 pattern gallery</a></li>
<li><a href="http://code.google.com/chrome/devtools/docs/overview.html">Full documentation for Dev Tools</a></li>
<li><a href="http://goo.gl/IYNuQ">The slides &#8211; Chrome Dev Tools: Reloaded</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/chrome-developer-tools-at-google-io-2011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The developing WebGL demoscene</title>
		<link>http://nooshu.com/the-developing-webgl-demoscene?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-developing-webgl-demoscene</link>
		<comments>http://nooshu.com/the-developing-webgl-demoscene#comments</comments>
		<pubDate>Mon, 07 Mar 2011 00:36:43 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[webgl]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1614</guid>
		<description><![CDATA[Cool graphics in the browser, the demoscene has woken up to WebGL. Bring on the amazing demos!]]></description>
			<content:encoded><![CDATA[<p>One of my key memories from playing a friends <a href="http://en.wikipedia.org/wiki/Amiga">Amiga</a> oh so many years ago (apart from <a href="http://en.wikipedia.org/wiki/Cannon_Fodder">Cannon Fodder</a>) is the cool intro demos created by the <a href="http://www.scene.org/">demoscene</a>. These were usually found on, <em>cough</em>, slightly dodgy versions of games that were &#8220;acquired&#8221; from various sources :)</p>
<p>What&#8217;s always amazed me about these demos is the amount of space the programmers had to play with and the hardware available at the time; both extremely limited. While the space and hardware limitations are no longer an issue, people are still developing these amazing demos. One reason for this is due to an exciting area in Web Development that&#8217;s currently flourishing: <a href="http://en.wikipedia.org/wiki/WebGL">WebGL</a>. The <a href="http://www.khronos.org/news/press/releases/khronos-releases-final-webgl-1.0-specification">technical specification</a> was finalised last week and developers have started to take notice of this very powerful visual programming language. Developing demos in the browser environment is a new limitation and programmers are looking at WebGL to push the boundaries.</p>
<div id="attachment_1616" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2011/03/full-webgl-demo.jpg"><img src="http://nooshu.com/wp-content/uploads/2011/03/full-webgl-demo-518x518.jpg" alt="The demoscene in action via WebGL" title="full-webgl-demo" width="518" height="518" class="size-medium wp-image-1616" /></a><p class="wp-caption-text">WebGL port of &quot;glass&quot;, an old 64kb demo from 2000. </p></div>
<p>The <a href="http://possan.se/junk/webglass/index.html">demo above</a> has been converted into WebGL by a very talented programmer called <a href="http://possan.se/">Per-Olov Jernberg</a> (Possan). You can even take a look at the <a href="https://github.com/possan/webglass">source on Github</a> if your that way inclined! You can view the original from April 2000 <a href="http://pouet.net/prod.php?which=94">here</a>.</p>
<p>With modern browsers like Chrome, Firefox 4 and <a href="http://my.opera.com/chooseopera/blog/2011/03/03/a-sneak-preview-of-our-upcoming-webgl-demo">now Opera</a> adding WebGL support and improving their JavaScript engines, there&#8217;s never been a better time for Web Developers to get involved in this new demoscene. All that&#8217;s needed is some JavaScript, Canvas and a little creativity. I genuinely look forward to seeing all the old school programmers diving into WebGL. I personally know very little about this new language so I&#8217;ll be able to learn so much by doing a quick &#8220;view source&#8221;.</p>
<p>There&#8217;s already a WebGL competition in progress called <a href="http://gl64k.com/">gl64k</a> where programmers have to create an interesting visual demo with only 64k (65,536 bytes) at their disposal. Awesome stuff will be emerging from this new technology in the next couple of years and I for one can&#8217;t wait to see what!</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/the-developing-webgl-demoscene/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimenting with Webkit form speech input</title>
		<link>http://nooshu.com/experimenting-with-webkit-form-speech-input?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=experimenting-with-webkit-form-speech-input</link>
		<comments>http://nooshu.com/experimenting-with-webkit-form-speech-input#comments</comments>
		<pubDate>Wed, 22 Dec 2010 20:46:06 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[speech]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1563</guid>
		<description><![CDATA[The HTML5 specifications are adding some very interesting new features. Here's one that's just landed in Google Chrome: speech input.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a few weeks now since I attended a <a href="http://nooshu.com/game-on-london-2010/">Web Gaming event hosted by Mozilla</a> and I&#8217;ve not yet had chance to write about one of the coolest features that was demonstrated: <a href="https://docs.google.com/View?id=dcfg79pz_5dhnp23f5">Speech input in forms</a>. Now I must admit, I had no idea this was even possible; so it was quite a surprise when I saw the demonstration. With a few extra attributes added to a standard input box you can enable speech input:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;speech&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;speech&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> x-webkit-speech speech error onwebkitspeechchange<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dosomething.coolhere(true);&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></td></tr></tbody></table></div>
<p>It really is that simple! You may notice the &#8220;x-webkit-speech&#8221; attribute so will have guessed it currently only works in Webkit; and as far as I&#8217;m aware only in very <a href="http://peter.sh/2010/12/crankshaft-the-chrome-web-store-and-html5s-figure-element/">recent versions of Google Chrome</a> (note: &#8220;The Input Speech API will now be available by default on Chrome’s dev-channel&#8221;). The Speech API seems very new and is still a draft, so it will be a while before it&#8217;s fully adopted by other browser vendors.</p>
<div id="attachment_1568" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/12/speak-to-santa-speech-api.gif"><img src="http://nooshu.com/wp-content/uploads/2010/12/speak-to-santa-speech-api.gif" alt="Demo of the new HTML5 Speech API" title="speak-to-santa-speech-api" width="518" height="180" class="size-full wp-image-1568" /></a><p class="wp-caption-text">A quick demonstration of the Speech API in action.</p></div>
<p>To demonstrate the speech input I&#8217;ve put together a very simple <strong>festive</strong> <a href="http://nooshu.com/explore/santa-speech-api/">demo</a> that queries the Flickr API looking for images related to a value entered. So if you have a microphone and the <a href="http://www.google.com/chrome/intl/en/eula_dev.html">dev channel of Chrome</a>, why not give it a try. Chrome records the input of the microphone before sending it off to an external server to be processed, where a value is then sent back to the browser. At first I thought it was all processed inside the browser but I guess that&#8217;s a little to much to expect! It isn&#8217;t 100% accurate and the demo accepts Googles first guess so you may get a few strange results. The server returns multiple guesses which a user can select from, but this hasn&#8217;t been added (to my demo at least).</p>
<p>Since the API is very new it took a little trial and error to work out how to detect if the Speech API was available in the browser; but with a little help from <a href="http://paulirish.com/">Paul Irish</a> I managed to crack it:</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> speechcapable<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> elem <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'input'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> support <span style="color: #339933;">=</span> <span style="color: #3366CC;">'onwebkitspeechchange'</span> <span style="color: #000066; font-weight: bold;">in</span> elem <span style="color: #339933;">||</span> <span style="color: #3366CC;">'speech'</span> <span style="color: #000066; font-weight: bold;">in</span> elem<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> support<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>This function will return true if the API is available. It&#8217;s worth noting that since it&#8217;s very new this function is likely to break in the future as the properties always seem to be changing. It works at the moment, so get thinking about what this brilliant new API can be used for! It&#8217;s a big plus for accessibility if used correctly and I can also see some cool applications in web gaming too. View the <a href="http://nooshu.com/explore/santa-speech-api/">demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/experimenting-with-webkit-form-speech-input/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Three.js and the Audio Data API Visualisation</title>
		<link>http://nooshu.com/three-js-and-the-audio-data-api-visualisation?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=three-js-and-the-audio-data-api-visualisation</link>
		<comments>http://nooshu.com/three-js-and-the-audio-data-api-visualisation#comments</comments>
		<pubDate>Mon, 15 Nov 2010 13:18:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[visualisations]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1468</guid>
		<description><![CDATA[I've played with the HTML5 Audio Data API in the past for 2D visualisations. So how about some 3D?]]></description>
			<content:encoded><![CDATA[<div id="attachment_1471" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/11/full.gif"><img src="http://nooshu.com/wp-content/uploads/2010/11/full-518x359.gif" alt="3D audio visualisation" title="full" width="518" height="359" class="size-medium wp-image-1471" /></a><p class="wp-caption-text">Mr Doob has created a superb JavaScript 3D Engine in three.js. Screenshots from my 'Bowl' demo.</p></div>
<p>I&#8217;ve been watching the development of <a href="https://github.com/mrdoob/three.js/">three.js</a> by <a href="http://mrdoob.com/">Mr Doob</a> for a couple of months and have been desperate to experiment with it. With Firefox 4 well into the <a href="http://www.mozilla.com/en-GB/firefox/beta/">beta stage</a> I decided to bite the bullet and do a little Audio Data visualisation in 3D!</p>
<p>I&#8217;ve <a href="http://nooshu.com/audio-visualisation-using-html5-and-canvas/">dabbled with audio visualisation</a> and the <a href="https://wiki.mozilla.org/Audio_Data_API">HTML5 Audio Data API</a> in the past, so I&#8217;m pleased I&#8217;ve had a chance to use it again and see what&#8217;s new. <strong>Note</strong>: My previous audio visualisations using canvas no longer work due to specification changes in the API. A pitfall of using an API that&#8217;s still in the draft stages I guess.</p>
<p>I&#8217;ve put together 5 simple demo&#8217;s all based around the same theme showing some of the options available in three.js. My favourite is &#8220;bowl&#8221;, pretty colours galore!</p>
<ul>
<li><strong><a href="http://nooshu.com/explore/threejs-visualisation/circle/">Circle</a></strong>: Simple circle, zoom in / out using the mouse wheel.</li>
<li><strong><a href="http://nooshu.com/explore/threejs-visualisation/cubes/">Cubes</a></strong>: Same as circle only using the cube primitive.</li>
<li><strong><a href="http://nooshu.com/explore/threejs-visualisation/cylinder/">Cylinder</a></strong>: Using the cylinder primitive with a floating camera.</li>
<li><strong><a href="http://nooshu.com/explore/threejs-visualisation/sinewave/">Sinewave</a></strong>: Rotated sinewave (looks a little like a chandelier).</li>
<li><strong><a href="http://nooshu.com/explore/threejs-visualisation/bowl/">Bowl</a></strong>: A combination of the above demos to create an interesting 3D bowl effect.</li>
</ul>
<p>Please note these demos will <strong>only work in <a href="http://www.mozilla.com/firefox/beta/">Firefox 4</a></strong>. The Audio Data API is still a draft specification and Mozilla is the only browser vendor to have added it to date. I&#8217;m looking forward to it being added to Chrome (Webkit), with its superb V8 JavaScript engine. The demo&#8217;s really are just the tip of the iceberg for both three.js and the Audio Data API. It&#8217;s certainly an area of the HTML5 specification to keep your eye on. </p>
<p>The music track used in the visualisation is called &#8220;Sad Robot&#8221; by a group called &#8220;Pornophonique&#8221;. Very catchy tune that you can <a href="http://www.jamendo.com/en/track/81740">download from Jamendo</a>.</p>
<p><strong>Update</strong>: It looks like enabling the Google Page Speed Apache module seems to have broken the demos. I&#8217;ve disabled it now so it should hopefully fix it (fingers crossed!).</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/three-js-and-the-audio-data-api-visualisation/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 9 Preview 6, we have a winner</title>
		<link>http://nooshu.com/internet-explorer-9-preview-6-we-have-a-winner?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=internet-explorer-9-preview-6-we-have-a-winner</link>
		<comments>http://nooshu.com/internet-explorer-9-preview-6-we-have-a-winner#comments</comments>
		<pubDate>Mon, 08 Nov 2010 16:07:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[W3c]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1463</guid>
		<description><![CDATA[Microsoft have finally pulled their finger out and produced a respectable browser* (*Only for Vista and Windows 7 users)]]></description>
			<content:encoded><![CDATA[<p>No you aren&#8217;t dreaming; winner and Internet Explorer (IE) have been mentioned in the same sentence. I know it&#8217;s hard to believe, but the browser that has been the bane of every Web Developer&#8217;s life since 2001 has finally grown up and accepted web standards. According to the <a href="http://test.w3.org/html/tests/reporting/report.htm">W3C HTML5 Test Suite</a> released last week, IE9 p6 is the most compliant browser. Now before the huge (geek) party and dancing on the grave of IE6 starts,  there are a couple of major points to note:</p>
<ol>
<li>IE9 is still only a preview release, not a complete browser.</li>
<li>When released IE9 will only work on Vista and Windows 7.</li>
</ol>
<p>Point 2 is unfortunately a big party pooper. Windows XP is the operating system that <a href="http://www.w3schools.com/browsers/browsers_os.asp">refuses to die</a>, 48% of users who visited W3schools in October were on XP. That&#8217;s a large percentage of people who are excluded from installing IE9. We can always hope that these users are using a standards compliant browser from another company (Firefox, Chrome, Safari, Opera) but that may be a little optimistic.</p>
<p>So, even though IE9 is a huge step forward by Microsoft, it doesn&#8217;t look like older versions of IE are going to die out any time soon. Luckily the UK government are forward thinkers&#8230; wait, no, <a href="http://www.guardian.co.uk/technology/pda/2010/jul/30/internet-explorer-6-uk-government">that&#8217;s a lie</a>. So the browser that&#8217;s been crippling the web for the best part of a decade looks like it may be around for another 10 years. I&#8217;ll put the party poppers back in the draw then.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/internet-explorer-9-preview-6-we-have-a-winner/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nooshu.com now with added HTML5 goodness</title>
		<link>http://nooshu.com/nooshu-com-now-with-added-html5-goodness?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nooshu-com-now-with-added-html5-goodness</link>
		<comments>http://nooshu.com/nooshu-com-now-with-added-html5-goodness#comments</comments>
		<pubDate>Sat, 17 Jul 2010 14:05:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1279</guid>
		<description><![CDATA[Finally got round to HTML5ing my Wordpress theme. Lots to learn with the (ongoing) HTML5 specifications.]]></description>
			<content:encoded><![CDATA[<p>So I finally pulled my finger out and took the HTML5 plunge over the past day or so; the Nooshu WordPress theme now has a sprinkling of HTML5. Mmmm I have that warm fuzzy feeling of completeness! In all honesty it&#8217;s been an easy way to learn about the new <a href="http://dev.w3.org/html5/spec/Overview.html">HTML5 specifications</a> (although they aren&#8217;t complete and won&#8217;t become a W3C recommendation until 2022&#8230; no that isn&#8217;t a typo!).</p>
<p>HTML5 has added a host of new tags which have much more semantic meaning. So instead of using &#8216;divs&#8217; to section off areas of your page layout, you can now use:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- Some of the new HTML5 Tags --&gt;</span><br />
<span style="color: #009900;">&lt;header&gt;&lt;<span style="color: #66cc66;">/</span>header&gt;</span><br />
<span style="color: #009900;">&lt;footer&gt;&lt;<span style="color: #66cc66;">/</span>footer&gt;</span><br />
<span style="color: #009900;">&lt;article&gt;&lt;<span style="color: #66cc66;">/</span>article&gt;</span><br />
<span style="color: #009900;">&lt;section&gt;&lt;<span style="color: #66cc66;">/</span>section&gt;</span><br />
<span style="color: #009900;">&lt;nav&gt;&lt;<span style="color: #66cc66;">/</span>nav&gt;</span></div></td></tr></tbody></table></div>
<p>It&#8217;s certainly a welcome addition to the modern web. My favourite part of HTML5 has to be the doctype (other than the canvas element):</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- No more --&gt;</span><br />
<span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span><br />
<br />
<span style="color: #808080; font-style: italic;">&lt;!-- Much better! --&gt;</span><br />
<span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span></div></td></tr></tbody></table></div>
<p>Look how simple it is! No more copy / paste from a previous project for this doctype.</p>
<p>My main concern when converting the theme to HTML5 was how it would work in IE; as IE8 supports parts of HTML5 but IE6 and IE7 not at all. When IE comes across a tag it doesn&#8217;t recognise it just ignores it. Since the tags aren&#8217;t recognised you won&#8217;t be able to style your lovely new HTML5 template in IE6 &#038; IE7. Lucky you can patch this missing functionality using JavaScript. Remy Sharp has created a script called <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">html5shim</a>, that adds the missing tags to IE. Just add the following code to your header and you will now be able to style your HTML5 tags:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!--[if lt IE 9]&gt;</span><br />
<span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;</span><br />
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></div></td></tr></tbody></table></div>
<p>The script must be in the header and must fire before the DOM is created. The script simply creates all the new HTML5 elements using the document method &#8216;createElement&#8217;, you don&#8217;t even need to attach the created elements to the DOM! Now IE will recognise the tags and you can get on with your page styling. Yay!</p>
<p>Those who use WordPress 3.0 may have noticed that the default Kubric theme is no more and it&#8217;s been replaced with a new theme called twenty ten. The theme uses the HTML5 doctype but it doesn&#8217;t use any of the new tags. I guess because of the IE issues. Maybe this will be changed in future releases.</p>
<p>The Nooshu theme is still a work in progress, and I&#8217;ll modify areas as I learn more about the new HTML5 features. Here are a selection of links that I found incredibly useful while working on the theme:</p>
<ul>
<li><strong><a href="http://diveintohtml5.org/">Dive into HTML5</a></strong>: Read through this article and you will be well on your way to learning HTML5. It delves into the history of HTML and progresses forward right up to implementing the new specifications.</li>
<li><strong><a href="http://html5doctor.com/">HTML5 Doctor</a></strong>: Looking for HTML5 related news or need some clarification of a new tag? Look no further than HTML5 Doctor. Lots of articles available for you to read and there&#8217;s even the option to ask a question if you don&#8217;t find the answers you are looking for.</li>
<li><strong><a href="http://gsnedders.html5.org/outliner/">HTML 5 Outliner</a></strong>: So you&#8217;ve created your shiny new HTML5 template; why not check it with the outliner to see if it makes sense to a user / search engine.</li>
<li><strong><a href="http://validator.w3.org/">W3C Markup Validator</a></strong>: It&#8217;s been a while since I&#8217;ve used a validator since I have one <a href="https://addons.mozilla.org/firefox/addon/249">built into Firefox</a>, but the W3C validator was very handy for pointing out attributes and tags that are no longer supported in the specifications. It also gives you a quick benchmark to aim at.</li>
</ul>
<p>If you have any other useful HTML5 tips and links let me know below.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/nooshu-com-now-with-added-html5-goodness/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High Resolution Icons for Google Chrome</title>
		<link>http://nooshu.com/high-resolution-icons-for-google-chrome?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=high-resolution-icons-for-google-chrome</link>
		<comments>http://nooshu.com/high-resolution-icons-for-google-chrome#comments</comments>
		<pubDate>Tue, 15 Jun 2010 19:13:43 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[icons]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1188</guid>
		<description><![CDATA[Google Chrome has a superb feature called "Create application shortcut...". To polish off this feature with your web application use high resolution icons.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Google Chrome as my default browser for quite a few months, I still use Firefox for Web Development but for general browsing you really can&#8217;t beat the speed of Chrome. One of my favourite Chrome features is the &#8216;Create application shortcuts&#8230;&#8217; function. Creating an application shortcut essentially adds an icon to your desktop, Chrome will then run the web application like it is a free-standing desktop application (you still need to be connected to the internet unless it uses some form of offline storage).</p>
<p>If you are a Gmail user I highly recommend creating an application shortcut to see this function in action. One thing you will notice when you create the shortcut with Gmail is it uses a high resolution icon. If you create a shortcut using a standard website, by default the favicon.ico is used. As the favicon is limited to 16 by 16 resolution it will look very ugly blown up on your desktop.</p>
<div id="attachment_1191" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/06/chrome-icons.jpg"><img src="http://nooshu.com/wp-content/uploads/2010/06/chrome-icons.jpg" alt="Various application shortcuts I&#039;ve created" title="chrome-icons" width="518" height="161" class="size-full wp-image-1191" /></a><p class="wp-caption-text">You can really see the difference between the Gmail icon (left) and the standard favicons.</p></div>
<p>The image above really illustrates the difference between a 16 x 16 icon and a high resolution version. Now of course you could just change the icon in the Windows properties&#8230;. but that&#8217;s boring. Why not offer your users a high resolution image along with the standard favicon? It really is very simple:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/icon_32x32.png&quot;</span> sizes<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;32x32&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/icon_48x48.png&quot;</span> sizes<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;48x48&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Simply place this code in your head tag of your web application and link to the corresponding icons. Now when your user creates an application shortcut they will have a nice high resolution icon on their desktop. </p>
<div id="attachment_1194" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/06/hi-res-icon.jpg"><img src="http://nooshu.com/wp-content/uploads/2010/06/hi-res-icon.jpg" alt="Hi resolution Chrome icon" title="hi-res-icon" width="518" height="148" class="size-full wp-image-1194" /></a><p class="wp-caption-text">You can really see the difference when you add a high resolution icon</p></div>
<p>I&#8217;ve added a high resolution icon for my blog administration, now if only <a href="http://www.formula1.com/">F1 live timings</a> would do the same. For those of you who want to add a high resolution icon to your WordPress blog add the following code to your functions.php:</p>
<div class="codecolorer-container php default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> wp_hi_res_admin_icons<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;icon&quot; href=&quot;/wp-content/themes/'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/images/icon_name_32.png&quot; sizes=&quot;32x32&quot; /&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;icon&quot; href=&quot;/wp-content/themes/'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/images/icon_name_48.png&quot; sizes=&quot;48x48&quot; /&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_hi_res_admin_icons'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_hi_res_admin_icons'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>This will add the icon code to your administrator login panel and dashboard; or paste the raw HTML into your header.php so all users can see the icons.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/high-resolution-icons-for-google-chrome/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

