<?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>Visual-Experiments.com &#187; multitouch</title>
	<atom:link href="http://www.visual-experiments.com/tag/multitouch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visual-experiments.com</link>
	<description>ASTRE Henri experiments with Ogre3D and web stuff</description>
	<lastBuildDate>Mon, 16 Jan 2017 18:59:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Multitouch prototype done using Awesomium and Ogre3D</title>
		<link>http://www.visual-experiments.com/2010/04/09/multitouch-prototype-done-using-awesomium-and-ogre3d/</link>
		<comments>http://www.visual-experiments.com/2010/04/09/multitouch-prototype-done-using-awesomium-and-ogre3d/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 10:04:57 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[ogre3d]]></category>
		<category><![CDATA[awesomium]]></category>
		<category><![CDATA[multitouch]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=148</guid>
		<description><![CDATA[I just want to present a 3-years prototype done by my company with Ogre3D. I have designed the GUI and the spatio-temporal request manager. Designing the GUI was particularly challenging because the timeline needs to handle multitouch gesture. I have chosen Awesomium to realize this timeline. The main reason was that I was very familiar [...]]]></description>
			<content:encoded><![CDATA[<p>I just want to present a 3-years prototype done by my company with Ogre3D. I have designed the GUI and the spatio-temporal request manager.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.dailymotion.com/swf/video/xcvgue" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="300" src="http://www.dailymotion.com/swf/video/xcvgue" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://visual-experiments.com/demo/timeline/index.xhtml"><img class="alignleft size-full wp-image-80" style="margin-right: 10px;" title="timeline-screenshot" src="http://www.visual-experiments.com/blog/wp-content/uploads/2010/03/timeline-screenshot.png" alt="" width="150" height="150" /></a> Designing the GUI was particularly challenging because the timeline needs to handle multitouch gesture. I have chosen <a href="http://www.khrona.com/products/awesomium/">Awesomium</a> to realize this timeline. The main reason was that I was very familiar with javascript prototyping and HTML5 canvas. I manage to create this timeline with Awesomium, but it turns out to be very hacky because javascript performance were very poor. See yourself on <a href="http://visual-experiments.com/demo/timeline/index.xhtml" style="font-size: 18px;">this demo page</a> (working with Google Chrome, Opera 10.51 and<span style="text-decoration: line-through;"> maybe with Firefox 3.6</span>).</p>
<p>The timeline was designed with a simple idea : all the gesture recognition are handle by a C++ Layer. Then the cursors events are translated into javascript function calls and the function are executed by the webpage. The main issue was that canvas drawing was slow and I was receiving cursors events every frame (meaning : the timeline needs a graphical update each frame). I finally found a solution to reduce timeline rendering to 25fps. The code can be found bellow :</p>
<pre class="brush: jscript; highlight: [9]; title: ;">
var Interface = new function() {
   var _that  = this;
   var _rendering = false;
   var _skippedRenderingTime = new Date();
   this.TimeLine = new function() {
      this.render = function() {
         if (!_rendering) {
            _rendering = true;
            TimeLine.render();
            setTimeout(function() {
               _rendering = false;
               if ((new Date() - _skippedRenderingTime) &lt; 45) {
                  _that.TimeLine.render();
               }
            }, 40); //25fps
         }
         else {
            _skippedRenderingTime = new Date();
         }
      };
   };
}
var TimeLine = new function() {
   this.render = function() {
      //do heavy canvas drawing
   };
};
</pre>
<p>The function &#8220;Interface.TimeLine.render();&#8221; is called each time the C++ needs a graphical update, but the javascript delay the rendering if it&#8217;s exceeds 25fps. It&#8217;s kinda hacky but the result is working properly.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2010%2F04%2F09%2Fmultitouch-prototype-done-using-awesomium-and-ogre3d%2F&amp;title=Multitouch%20prototype%20done%20using%20Awesomium%20and%20Ogre3D"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2010/04/09/multitouch-prototype-done-using-awesomium-and-ogre3d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
