<?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>SpotGeek.net &#187; accelerometer</title>
	<atom:link href="http://spotgeek.net/tag/accelerometer/feed/" rel="self" type="application/rss+xml" />
	<link>http://spotgeek.net</link>
	<description>Tecnologia , Programação , web , internet, php</description>
	<lastBuildDate>Sat, 04 Feb 2012 14:42:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Firefox accelerometer</title>
		<link>http://spotgeek.net/firefoxaccelerometer/</link>
		<comments>http://spotgeek.net/firefoxaccelerometer/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:21:13 +0000</pubDate>
		<dc:creator>Filipe Teixeira Nunes</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://spotgeek.net/?p=472</guid>
		<description><![CDATA[Paul Rouget shows off some]]></description>
			<content:encoded><![CDATA[<p>Paul Rouget <a href="http://blog.mozbox.org/post/2009/10/12/Some-new-demos" target="_blank">shows off some cool new demos</a> that are baking on the trunk of Firefox currently.</p>
<p>First are some nifty new events that get fired if your computer has an accelerometer:</p>
<div><a href="javascript:void(0);" target="_blank">PLAIN TEXT</a></div>
<div><span style="color: #000000; font-weight: bold;">JAVASCRIPT:</span></p>
<div>
<div>
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">window.<span style="color: #006600;">addEventListener</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #3366cc;">“MozOrientation”</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #006600; font-weight: bold;">(</span>e<span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/* 3 values: e.x, e.y, e.y */</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #006600; font-weight: bold;">}</span>, <span style="color: #003366; font-weight: bold;">true</span><span style="color: #006600; font-weight: bold;">)</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>It works with MacBooks and on Windows and Linux with Thinkpads.</p>
<p><a href="http://people.mozilla.com/%7Eprouget/demos/resources/videos/mozOrientation.ogv" target="_blank">Check out this cool screencast</a> of the orientation event in action:</p>
<p style="text-align: center;"><a href="http://people.mozilla.com/%7Eprouget/demos/resources/videos/mozOrientation.ogv" target="_blank"><img title="orientation_demo" src="http://ajaxian.com/wp-content/images/orientation_demo.png" alt="orientation_demo" width="415" height="312" /></a></p>
<p style="text-align: left;">They also have WebGL and CSS Transitions going in Firefox trunk now as well! There are some demos <a href="http://blog.mozbox.org/post/2009/10/12/Some-new-demos" target="_blank">in the original blog post</a> of <a href="http://people.mozilla.com/%7Eprouget/demos/3D_And_CSS/puls.xhtml" target="_blank">WebGL + CSS3 + SVG</a> as well as <a href="http://people.mozilla.com/%7Eprouget/demos/transition/index.xhtml" target="_blank">CSS Transitions + the HTML5 Video tag</a> that are very cool (<a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">require Firefox Nightly</a>).</p>
<p style="text-align: left;">Here’s an example code snippet showing how you can use CSS Transitions to change the background color of a DIV over time as well as changing the width and height of an HTML5 Video at the same time:</p>
<p style="text-align: left;">
<div><a href="javascript:void(0);" target="_blank">PLAIN TEXT</a></div>
<div><span style="color: #000000; font-weight: bold;">CSS:</span></p>
<div>
<div>
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">div <span style="color: #006600; font-weight: bold;">{</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–moz-transition-property: <span style="color: #000000; font-weight: bold;">background-color</span>, <span style="color: #000000; font-weight: bold;">height</span>, <span style="color: #000000; font-weight: bold;">width</span>, <span style="color: #000000; font-weight: bold;">font-size</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–moz-transition-duration: 2s, 1s, 2s, 1s;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–webkit-transition-property: <span style="color: #000000; font-weight: bold;">background-color</span>, <span style="color: #000000; font-weight: bold;">height</span>, <span style="color: #000000; font-weight: bold;">width</span>, <span style="color: #000000; font-weight: bold;">font-size</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–webkit-transition-duration: 2s, 1s, 2s, 1s;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #006600; font-weight: bold;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;"></li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">div video <span style="color: #006600; font-weight: bold;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–moz-transition-property: <span style="color: #000000; font-weight: bold;">width</span>, <span style="color: #000000; font-weight: bold;">height</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–moz-transition-duration: 2s, 2s;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–webkit-transition-property: <span style="color: #000000; font-weight: bold;">width</span>, <span style="color: #000000; font-weight: bold;">height</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;">–webkit-transition-duration: 2s, 2s;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="color: #000000; font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #006600; font-weight: bold;">}</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>Someone’s also put together a <a href="http://dougt.org/random/orientationdemo/index.xhtml" target="_blank">cool demo</a> that puts the new accelerometer support with some SVG to create a Super Mario Kart clone:</p>
<p style="text-align: center;"><a href="http://dougt.org/random/orientationdemo/index.xhtml" target="_blank"><img title="mario_orientation" src="http://ajaxian.com/wp-content/images/mario_orientation.png" alt="mario_orientation" width="329" height="298" /></a></p>
<p style="text-align: left;">Fonte:<a href="http://feedproxy.google.com/~r/ajaxian/~3/XCrTKE-d4ew/firefox-trunk-accelerometers-webgl-and-css-transitions" target="_blank">Ajaxian</a></p>
]]></content:encoded>
			<wfw:commentRss>http://spotgeek.net/firefoxaccelerometer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://people.mozilla.com/%7Eprouget/demos/resources/videos/mozOrientation.ogv" length="11252636" type="video/ogg" />
		</item>
	</channel>
</rss>

