<?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>Tojio Lab &#187; Flash</title>
	<atom:link href="http://lab.tojio.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.tojio.com</link>
	<description>"Tojio Labs is the place where little useful insights (and unimportant ones) from our everyday work as an interactive agency found their home."</description>
	<lastBuildDate>Tue, 12 Oct 2010 07:35:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Verbreitung / Penetration Adobe Flash Player [de/en]</title>
		<link>http://lab.tojio.com/2008/11/07/verbreitung-penetration-adobe-flash-player/</link>
		<comments>http://lab.tojio.com/2008/11/07/verbreitung-penetration-adobe-flash-player/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 14:37:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Adobe Flash Player]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/11/07/verbreitung-penetration-adobe-flash-player/</guid>
		<description><![CDATA[Neue Statistik: Verbreitung des Adobe Flash Players [de] Adobe hat die neusten Zahlen (Sept. 08) zur Verbreitung des Flash Player 9 veröffentlicht. In den &#8220;Mature Markets&#8221; (USA, Kanada, Gross Britannien, Deutschland, Frankreich, Japan) hat der Flash Player 9 demnach eine Verbreitung von 97,7%. Die Version 9.0.115 liegt bei 89,4%. Die Statistik für die &#8220;Emerging Markets&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Neue Statistik: Verbreitung des Adobe Flash Players [de]<br />
</strong></p>
<p><a href="http://www.adobe.de/" title="Adobe Deutschland" target="_blank">Adobe</a> hat die neusten Zahlen (Sept. 08) zur Verbreitung des Flash Player 9 veröffentlicht. In den <strong>&#8220;Mature Markets&#8221;</strong> (USA, Kanada, Gross Britannien, Deutschland, Frankreich, Japan) hat der Flash Player 9 demnach eine Verbreitung von <strong>97,7%</strong>. Die Version 9.0.115 liegt bei <strong>89,4%</strong>.</p>
<p>Die Statistik für die <strong>&#8220;Emerging Markets&#8221;</strong> (China, Süd Korea, Russland, Indien, Taiwan) ist immer noch auf dem Stand von Juni 2008 und liegt immerhin bei <strong>96,2%</strong>, bzw. <strong>82,4%</strong> für die  Version 9.0.115.</p>
<p>Für den aktuellen <strong>Flash Player 10</strong> gibt es noch keine Daten, da dieser noch zu neu ist. Wer ihn noch nicht hat, bekommt ihn hier:</p>
<p><a href="http://get.adobe.com/de/flashplayer/" title="Get Adobe Flash Player" target="_blank">Download: Adobe Flash Player 10</a><br />
<a href="http://www.adobe.com/products/player_census/flashplayer/version_penetration.html" title="Verbreitung des Adobe Flash Players" target="_blank">Statistik: Adobe Flash Player Verbreitung</a></p>
<p><em>english:</em></p>
<p><strong>New Statistics: Adobe Flash Player Version Penetration [en]<br />
</strong></p>
<p><a href="http://www.adobe.com/" title="Adobe USA" target="_blank">Adobe</a> has updated the statistics (Sept. 08): The worldwide ubiquity of the Adobe Flash Player 9 in the <strong>&#8220;Mature Markets&#8221;</strong> (US, Canada, UK, Germany, France, Japan) is <strong>97,7%</strong>. The version 9.0.115 has a penetration up to <strong>89,4%</strong>.</p>
<p>The statistics for the <strong>&#8220;Emerging Markets&#8221;</strong> (China, South Korea, Russia, India, Taiwan) is still from June 2008: The worldwide ubiquity for Flash Player 9 is <strong>96,2%</strong> and <strong>82,4%</strong> for the version 9.0.115.</p>
<p>There is no data for the current version of the Flash Player (Version 10), because it is to new. If you don&#8217;t have it yet, you can get it here:</p>
<p><a href="http://get.adobe.com/de/flashplayer/" title="Get Adobe Flash Player" target="_blank">Download: Adobe Flash Player 10</a><br />
<a href="http://www.adobe.com/products/player_census/flashplayer/version_penetration.html" title="Adobe Flash Player Version Penetration" target="_blank">Statistics: Adobe Flash Player Version Penetration</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/11/07/verbreitung-penetration-adobe-flash-player/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WiiFlash 0.4.1 Server for Mac [en]</title>
		<link>http://lab.tojio.com/2008/07/01/wiiflash-041-server-for-mac/</link>
		<comments>http://lab.tojio.com/2008/07/01/wiiflash-041-server-for-mac/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 16:55:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[WiiFlash]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/07/01/wiiflash-041-server-for-mac/</guid>
		<description><![CDATA[Just finished a new version of the WiiFlashServerJ to keep up with the great PC version, by Thibault Imbert and Joa Ebert. Besides from adding the cross domain policy functionality, the mac version has also experienced some other small updates: + More then one connected Flash client can receive Wiimote input now + Changed setting [...]]]></description>
			<content:encoded><![CDATA[<p>Just finished a new version of the WiiFlashServerJ to keep up with the great <a href="http://wiiflash.bytearray.org/?p=78" target="_blank">PC version</a>, by Thibault Imbert and Joa Ebert. Besides from adding the cross domain policy functionality, the mac version has also experienced some other small updates:<br />
+ More then one connected Flash client can receive Wiimote input now<br />
+ Changed setting the LED status functionlity on the server. Now more than one LED can be on simultaneously</p>
<p>You can find the latest source and .app <a href="http://lab.tojio.com/2008/04/14/open-source-wiiflash-04-server-written-in-java-for-mac-os-x/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/07/01/wiiflash-041-server-for-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WiiFlash interactive Ribbons and some other WiiFlash examples [en]</title>
		<link>http://lab.tojio.com/2008/05/05/wiiflash-interactive-ribbons-and-some-other-wiiflash-examples/</link>
		<comments>http://lab.tojio.com/2008/05/05/wiiflash-interactive-ribbons-and-some-other-wiiflash-examples/#comments</comments>
		<pubDate>Mon, 05 May 2008 19:36:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[WiiFlash]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/05/05/wiiflash-interactive-ribbons-and-some-other-wiiflash-examples/</guid>
		<description><![CDATA[WiiFlash Ribbons uses the mouse, or if connected, the pitch- and roll- data of a Wiimote as input for this little Papervision3D experiment. The source code is based on Ribbons3D by Felix Turner and Line 2.0 by Mark Barcinski. Click here to have a look at the result (use your mouse, or, if running the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflashribbons.thumbnail.jpg" alt="WiiFlash interactive ribbons" />WiiFlash Ribbons uses the mouse, or if connected, the pitch- and roll- data of a Wiimote as input for this little Papervision3D experiment. The source code is based on <a href="http://www.airtightinteractive.com/demos/" target="_blank">Ribbons3D</a> by Felix Turner and<a href="http://blog.barcinski-jeanjean.com/2007/12/17/lines-in-3d/" target="_blank"> Line 2.0</a> by Mark Barcinski.</p>
<p>Click <a title="WiiFlash interactive ribbons" href="http://lab.tojio.com/projects/wiiflashribbons/">here</a> to have a look at the result (use your mouse, or, if running the newest WiiFlashServer, your Wiimote as input device). You can also download <a title="Wiimote demo ribbons" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemoRibbons.zip">Wiimote Demo Ribbons.zip</a> containing the source files to use it with the Wiimote and the WiiFlashserver.<br />
<br style="clear: both" /><br />
<img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflashfunctions.thumbnail.jpg" alt="WiiFlash LED, rumble and mouse control" /><a title="WiiFlash demo showing LED, IR and Mouse countrol" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemoFunctions.zip">Wiimote Demo Functions.zip</a> (demonstrating LED, Rumble and mouse control)</p>
<p><br style="clear: both" /><br />
<img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflashir.thumbnail.jpg" alt="WiiFlash dots or blobs or what ever" /><a title="WiiFlash demo showing how to access IR data" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemoIR.zip">Wiimote Demo IR.zip</a> (very simple way of using IR blob/dots/point data)</p>
<p><br style="clear: both" /><br />
<img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflashirtraces.thumbnail.jpg" alt="WiiFlash traces" /><a title="WiiFlash demo showing how to access IR data" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemoIRTraces.zip">Wiimote Demo IR Traces.zip</a> (using bitmaps, filters and matrix functions to generate a nice effect when handling IR blob/dots/point data)<br />
<br style="clear: both" /></p>
<p><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflash3dobject.thumbnail.jpg" alt="WiiFlash 3D object" /><a title="WiiFlash demo showing how to use Wiimote data" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemo3DObject.zip">Wiimote Demo 3D Object.zip</a> (using pitch, roll and yaw data to rotate and move a 3D object in Papervision 3D)<br />
<br style="clear: both" /></p>
<p><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflashheadtracking.thumbnail.jpg" alt="WiiFlash simple headtracking" /><a title="WiiFlash demo showing how to make a simple head tracking application" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemoHeadTracking.zip">Wiimote Demo Head Tracking.zip</a> (using two IR dots to do simple x, y an z positioning in Papervision 3D)<br />
<br style="clear: both" /></p>
<p><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/wiiflash3dobjectnunchuck.thumbnail.jpg" alt="WiiFlash Nunchuck 3D object" /><a title="WiiFlash demo showing how to use Nunchuck data" href="http://lab.tojio.com/projects/wiiflashdemos/WiimoteDemo3DObjectNunchuck.zip">Wiimote Demo 3D Object Nunchuck.zip</a> (using the Nunchuck to rotate and scale a 3D object in Papervision 3D)<br />
<br style="clear: both" /></p>
<p>More examples are on their way so check back soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/05/05/wiiflash-interactive-ribbons-and-some-other-wiiflash-examples/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Simple Webcam motion detection using bitmaps and filters [en]</title>
		<link>http://lab.tojio.com/2008/05/05/simple-webcam-motion-detection-using-bitmaps-and-filters/</link>
		<comments>http://lab.tojio.com/2008/05/05/simple-webcam-motion-detection-using-bitmaps-and-filters/#comments</comments>
		<pubDate>Mon, 05 May 2008 18:01:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[motion detection]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[Webcam]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/05/05/simple-webcam-motion-detection-using-bitmaps-and-filters/</guid>
		<description><![CDATA[After playing around with blob detection and somehow not getting it fast enough a neat little solution came up from Emil Korngold. Using the built in Adobe function &#8216;getColorBoundsRect&#8217; for the BitmapData object is so much faster looking for &#8216;Blobs&#8217;. (Thanks! I had a look at that when starting and then forgot all about it. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/motiondetection/" target="_blank"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/05/motiondetection.thumbnail.jpg" alt="Simple Webcam motion detection" /></a> After playing around with blob detection and somehow not getting it fast enough a neat little solution came up from <a href="http://www.clublime.com/lab/headtracking/" target="_blank">Emil Korngold</a>. Using the built in Adobe function &#8216;getColorBoundsRect&#8217; for the BitmapData object is so much faster looking for &#8216;Blobs&#8217;. (Thanks! I had a look at that when starting and then forgot all about it. Sometimes the simple things are just too far away).<br />
To get a usable result when detecting motion it is good to apply filters and thresholds. This reduces noise and errors when looking for the bounds of a given color.  This example is based on the &#8216;Focus&#8217; demo files provided by <a href="http://papervision3d.org/">Papervision3D</a>.</p>
<p>Click <a title="Head tracking" href="http://lab.tojio.com/projects/motiondetection/">here</a> to have a look at the result. Enjoy!</p>
<p>The interesting part of the code:</p>
<pre><code>private function loop(e:Event):void
{
	//bitmap containing difference between last &amp; this frame
 	newBmd.draw(input);
 	newBmd.applyFilter(newBmd,bounds,topLeft,filter);
 	newBmd.draw(oldBmd,null,null,BlendMode.DIFFERENCE);
 	newBmd.threshold(newBmd,bounds,topLeft,"&gt;",0xFFAAAAAA,0xFFFFFFFF);	//remember bitmap for next time round
 	oldBmd.draw(input);
 	oldBmd.applyFilter(oldBmd,bounds,topLeft,filter);
 	//now get bounds of a given color...
 	var newBound:Rectangle = newBmd.getColorBoundsRect(m,c,true);
	//now use the newBound to move something...
}</code></pre>
<p>Hope this is of any use to someone&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/05/05/simple-webcam-motion-detection-using-bitmaps-and-filters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Open source WiiFlash 0.4 Server (written in Java) for Mac OS X [en]</title>
		<link>http://lab.tojio.com/2008/04/14/open-source-wiiflash-04-server-written-in-java-for-mac-os-x/</link>
		<comments>http://lab.tojio.com/2008/04/14/open-source-wiiflash-04-server-written-in-java-for-mac-os-x/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 13:34:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[WiiFlash]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/04/14/open-source-wiiflash-04-server-written-in-java-for-mac-os-x/</guid>
		<description><![CDATA[WiiFlashServerJ is a Java application built on top of the great WiiremoteJ library by Michael Diamond which also uses the Bluecove library. WiiFlashServerJ sends and receives data from the Wiimote via WiiremoteJ. The data is transformed to a byte array in a way the WiiFlash library can handle it. In the current version all data [...]]]></description>
			<content:encoded><![CDATA[<p>WiiFlashServerJ is a Java application built on top of the great WiiremoteJ library by Michael Diamond which also uses the Bluecove library.  WiiFlashServerJ sends and receives data from the Wiimote via WiiremoteJ. The data is transformed to a byte array in a way the WiiFlash library can handle it.</p>
<p>In the current version all data from a Wiiremote can be sent (button states, battery level, the acceleration axes, 4 IR points and sizes and data from the Nunchuck extension). Data sent from the Classic Controller extension has not been tested yet and can be considered &#8216;guessplimented&#8217;. Its possible to activate the vibrating and LEDs as well as activate the Mouse mode by WiiFlash now. If an error occurs while connecting the Wiimote is disconnected again.</p>
<p><strong>Note</strong><br />
The software should be considered experimental. There is no guarantee the data sent by WiiFlashServerJ is exactly the same as by the Windows version provided by WiiFlash. WiiFlashServerJ was coded on lazy weekends and  without insight into the interna of the official (Windows) version.</p>
<p><strong>Download</strong><br />
<a title="WiiFlash Server 0.4.1a" href="http://lab.tojio.com/projects/wiiflashserverj/WiiFlashServerJ_2008_06_30.zip">WiiFlashServerJ</a> (Alpha version, 30 Jun. 2008)<br />
<a title="WiiFlash Server 0.4b" href="http://lab.tojio.com/projects/wiiflashserverj/WiiFlashServerJ_2008_04_24.zip">WiiFlashServerJ</a> (Alpha version, 24 Apr. 2008)<br />
<a title="WiiFlash Server 0.4a" href="http://lab.tojio.com/projects/wiiflashserverj/WiiFlashServerJ_2008_04_14.zip">WiiFlashServerJ</a> (Alpha version, 14 Apr. 2008)</p>
<p><strong>Examples</strong><br />
You can find some simple examples making use of the WiiFlash library in combination with e.g. Papervision <a title="WiiFlash Examples" href="http://lab.tojio.com/2008/05/05/wiiflash-interactive-ribbons-and-some-other-wiiflash-examples/">here</a>.</p>
<p><strong>Known Issues</strong><br />
- Sometimes Wiiremote is not properly connected and in that case does not send data (properly)</p>
<p>- Sometimes its not possible to activate the LEDs, or rumble function</p>
<p>- If Nunchuck extension is plugged in, the IR point size does not change.</p>
<p>- Point size, battery level and perhaps some other data (extensions?) are sent, but values could differ from what the windows server sends. (Feedback would be great&#8230;)</p>
<p>- Battery level is just read once, when connecting or extensions are connected / disconnected. Working on that one&#8230;</p>
<p>- Button states and IR start playing random. In this case you are probably using an older version of the WiiFlash API.<br />
(Since the first release of WiiFlash 0.4 there have been small, but important changes:  In &#8220;Wiimote.as&#8221; -&gt; &#8220;function update&#8221; -&gt; pack.position = 36 has been changed to 37 and in WiiSocket.as you will find a &#8220;I80&#8243; in the newer version. So make sure you have the newer version of <a href="http://wiiflash.googlecode.com/files/WiiFlash%200.4%20pre-release.zip" target="_blank">WiiFlash 0.4</a>. or even better <a href="http://wiiflash.bytearray.org/?page_id=50" target="_blank">WiiFlash 0.4.1</a>)</p>
<p>- Nunchuck does not send data. This sometimes happens, just restart WiiFlashServerJ</p>
<p>- Classic Controller has not been tested yet</p>
<p><strong>Used libraries and software</strong><br />
Java Wiiremote library: <a title="WiiremoteJ" href="http://www.wiili.org/WiiremoteJ" target="_blank"> WiiremoteJ</a><br />
Java Bluetooth library: <a href="http://bluecove.sourceforge.net/" target="_blank">Bluecove</a><br />
Flash Wiiremote library <a href="http://wiiflash.org/" target="_blank">WiiFlash</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/04/14/open-source-wiiflash-04-server-written-in-java-for-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Wow Physics Engine &amp; Papervision3D Engine Hello World [en]</title>
		<link>http://lab.tojio.com/2008/03/13/wow-physics-engine-papervision3d-engine-hello-world/</link>
		<comments>http://lab.tojio.com/2008/03/13/wow-physics-engine-papervision3d-engine-hello-world/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 17:40:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2008/03/13/wow-physics-engine-papervision3d-engine-hello-world/</guid>
		<description><![CDATA[This is a little Hello World app using Papervision3D, and the Wow Physics Engine, written in AS3 Click here to have a look at the result. Enjoy! Here are some basic tutorials to get things started with the Wow Engine: Your First WOW-Engine Application, how to use boundArea, how to use sphere and get position [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/wowpv3dhelloworld/" target="_blank"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2008/03/papervisionwow.thumbnail.jpg" alt="Papervision Wow HelloWorld" /></a> This is a little Hello World app using <a href="http://papervision3d.org/">Papervision3D</a>, and the <a href="http://seraf.mediabox.fr/wow-engine/as3-3d-physics-engine-wow-engine/" target="_blank">Wow Physics Engine</a>, written in AS3<br />
Click <a title="Papervision 3D Wow Physics Engine Hello World, Getting Started" href="http://lab.tojio.com/projects/wowpv3dhelloworld/" target="_blank">here</a> to have a look at the result. Enjoy!</p>
<p>Here are some basic tutorials to get things started with the Wow Engine:<br />
<a href="http://seraf.mediabox.fr/wow-engine/wow-engine-tutorial-your-first-wow-engine-application/" target="_blank">Your First WOW-Engine Application</a>,<br />
<a href="http://seraf.mediabox.fr/wow-engine/wow-engine-tutorial-how-to-use-boundarea/" target="_blank">how to use boundArea</a>, <a href="http://seraf.mediabox.fr/wow-engine/wow-engine-tutorial-how-to-use-sphere-and-get-position/" target="_blank"><br />
how to use sphere and get position</a> and</p>
<p><a href="http://seraf.mediabox.fr/wow-engine/wow-engine-tutorial-how-to-use-plane-sphere-constraint/" target="_blank">How to use plane, sphere &amp; constraint</a>.</p>
<p>The useful parts of the sourcode used in the hello World app is down below. Basicly you start by setting up the physics world, then the 3d. The Enterframe loop is used to update the rendering part to show what the objects in the physics world are doing.<br style="clear: both" /></p>
<p>Inititalize the physics world and its objects:</p>
<pre><code>
private function initPhysics():void
{
    //keep the objects in an array, so we can access them later on
    wowBalls = new Array();
    wowAnchorPoints = new Array();
    wowConstraints = new Array();

    // init wow basics
    wow=new WOWEngine();
    wow.collisionResponseMode = wow.SELECTIVE;
    //add some gravity
    wow.addMasslessForce(new WVector(0,gravity,0));

    var wowBall:WSphere;
    var wowAnchorPoint1:WSphere;
    var wowAnchorPoint2:WSphere;
    var constraint:WSpringConstraint;

    var x:int = 0;
    var y:int = -ballHeight/2;
    var z:int = 0;
    var fixed:Boolean = false;

    //make the physics represenation of the balls
    for(var i:uint=0; i &lt; NUM_OF_BALLS; i++)
    {
        //add the ball
        fixed = false;
        wowBall = new WSphere(1+((i-center)*ballSpacing),y,z,ballRadius,fixed,ballMass,ballElasticity,ballFriction);
        wowBalls.push(wowBall);
        wow.addParticle(wowBall);

        //add the first anchorpoint 'holding' the ball
        fixed = true;
        wowAnchorPoint1 = new WSphere(x+((i-center)*ballSpacing),y+ballHeight,z-150,ballRadius,fixed);
        wowAnchorPoints.push(wowAnchorPoint1);
        wow.addParticle(wowAnchorPoint1);

        //add the second anchorpoint 'holding' the ball
        wowAnchorPoint2 = new WSphere(x+((i-center)*ballSpacing),y+ballHeight,z+150,ballRadius,fixed);
        wowAnchorPoints.push(wowAnchorPoint2);
        wow.addParticle(wowAnchorPoint2);

        //build the 'holding' mechanism by using constraints
        constraint = new WSpringConstraint(wowBall, wowAnchorPoint1,stiffness);
        wowConstraints.push(constraint);
        wow.addConstraint(constraint);

        constraint = new WSpringConstraint(wowBall, wowAnchorPoint2,stiffness);
        wowConstraints.push(constraint);
        wow.addConstraint(constraint);
    }
}
</code></pre>
<p>Now create the Papervision 3D world:</p>
<pre><code>
private function init3D():void
{
    pv3dBalls = new Array();
    pv3dAnchorPoints = new Array();
    pv3dMirrorBalls = new Array();

    // init papervision basics
    view = new BasicView(stage.stageWidth, stage.stageHeight, true, true);
    view.camera.zoom = 10;
    view.camera.focus = 150;
    addChild(view);

    //use interactive 3dmouse
    vMouse = view.viewport.interactiveSceneManager.virtualMouse;
    mouse3D = view.viewport.interactiveSceneManager.mouse3D;
    Mouse3D.enabled = true;

    //create lines obj representing constraints between anchorpoints and balls
    pv3dLinesArray = new Array();
    pv3dLines = new Lines3D(new LineMaterial(0x666666,1));
    view.scene.addChild(pv3dLines);

    // create materials
    var shadowData = new glasTexture() as Bitmap;
    var mp:BitmapMaterial = new BitmapMaterial(shadowData.bitmapData);

    var ballData = new ballTexture() as Bitmap;
    var ballMirrorMaterial:BitmapMaterial = new  BitmapMaterial(ballData.bitmapData);

    light = new PointLight3D(false,false);
    envMaterial = new EnvMapMaterial(light, ballData.bitmapData,ballData.bitmapData,1);

    //create the glas "table"
    var glasPane:Plane = new Plane(mp,600,400);
    glasPane.rotationX = 270;
    glasPane.y = -120;
    view.scene.addChild(glasPane, "glasPane");

    var dragPlane:Plane = new Plane(new ColorMaterial(0xFF0000, 0), 1000,1000, 6, 6);
    dragPlane.material.interactive = true;
    dragPlane.material.doubleSided = true;
    dragPlane.z = 50;
    view.scene.addChild(dragPlane, "dragPlane");

    var pv3dBall:Sphere;
    var pv3dMirrorBall:Sphere;
    var pv3dAnchorPoint1:Sphere;
    var pv3dAnchorPoint2:Sphere;

    //create the 3d representation of the balls
    for(var i:uint=0; i &lt; NUM_OF_BALLS; i++)
    {
        //add the shiny little ball
        pv3dBall = new Sphere(envMaterial,ballRadius+2,16,16); //(new WireframeMaterial(0xaf8554),ballRadius+5,10,10);
        pv3dBall.material.interactive = true;
        pv3dBall.name = "pv3dBall"+i;
        pv3dBall.scale *=-1;
        view.scene.addChild(pv3dBall, "pv3dBall"+i);
        pv3dBalls.push(pv3dBall);

        //add the mirror ball
        pv3dMirrorBall = new Sphere(ballMirrorMaterial,ballRadius+2,10,10);
        view.scene.addChild(pv3dMirrorBall, "pv3dMirrorBall"+i);
        pv3dMirrorBalls.push(pv3dMirrorBall);

        //add the first anchorpoint 'holding' the ball
        pv3dAnchorPoint1 = new Sphere(new ColorMaterial(0x999999,0.5),1);
        view.scene.addChild(pv3dAnchorPoint1, "pv3dAnchorPoint1"+i);
        pv3dAnchorPoints.push(pv3dAnchorPoint1);

        //add the second anchorpoint 'holding' the ball
        pv3dAnchorPoint2 = new Sphere(new ColorMaterial(0x999999,0.5),1);
        view.scene.addChild(pv3dAnchorPoint2, "pv3dAnchorPoint2"+i);
        pv3dAnchorPoints.push(pv3dAnchorPoint2);

        //add lines from ball to both anchorpoints, coordinates are done later...
        pv3dLinesArray.push(new Line3D(pv3dLines,new LineMaterial(0x999999,0.1),1,
                            new Vertex3D(0,0,0), new Vertex3D(0,0,0) ));
        pv3dLines.addLine(pv3dLinesArray[i*2]);
        pv3dLinesArray.push(new Line3D(pv3dLines,new LineMaterial(0x999999,0.1),1,
                            new Vertex3D(0,0,0), new Vertex3D(0,0,0) ));
        pv3dLines.addLine(pv3dLinesArray[i*2+1]);
    }
}
</code></pre>
<p>Now get the Loop going:</p>
<pre><code>
private function loop( event : Event ):void
{
    //do the physics stuff
    wow.step();

    //set viewable stuff to physics stuff
    syncRenderingToPhysics();

    light.copyPosition(view.camera);

    //do some camera movement
    Camera3D(view.camera).hover(0, view.viewport.containerSprite.mouseX*0.003,
                                (view.viewport.containerSprite.mouseY-400)*0.002);

    //do the 3d rendering stuff
    view.singleRender();
}
</code></pre>
<p>This part will update the graphics part to show what the physics objects are doing:</p>
<pre><code>
private function syncRenderingToPhysics():void
{
    if(_dragging)
    {
        wowBalls[_actualDragObjID].px = mouse3D.x;
        wowBalls[_actualDragObjID].py = mouse3D.y;
    }	

    //just reposition the moving parts...
    for(var i:uint=0; i &lt; NUM_OF_BALLS; i++)
    {
        pv3dBalls[i].x = wowBalls[i].px;
        pv3dBalls[i].y = wowBalls[i].py;
        pv3dBalls[i].z = wowBalls[i].pz;
        pv3dMirrorBalls[i].copyPosition(pv3dBalls[i]);
        pv3dMirrorBalls[i].y = (pv3dMirrorBalls[i].y*-1)-250;
		....
    }
}
</code></pre>
<p>Hope this is of any use to someone&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2008/03/13/wow-physics-engine-papervision3d-engine-hello-world/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Papervision 3D Ribbons [en]</title>
		<link>http://lab.tojio.com/2007/11/06/ribbons/</link>
		<comments>http://lab.tojio.com/2007/11/06/ribbons/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 18:59:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2007/11/06/ribbons/</guid>
		<description><![CDATA[Just some nice Ribbons using Papervision3D, the Caurina Tweener and the Line3D (slightly modified, to get the Ribbons effect) classes and some ConvolutionFilter and ColorMatrixFilter to pimp the result a little. Click here to have a look at the result. Enjoy!]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/ribbons/"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2007/11/ribbons.thumbnail.png" alt="Ribbons with Papervision and Bitmap Filters" /></a><br />
Just some nice Ribbons using <a href="http://papervision3d.org/">Papervision3D</a>, the <a href="http://code.google.com/p/tweener/">Caurina Tweener</a> and the <a href="http://blog.zupko.info/" target="_blank">Line3D</a> (slightly modified, to get the Ribbons effect) classes and some ConvolutionFilter and ColorMatrixFilter to pimp the result a little.</p>
<p>Click <a title="Ribbons" href="http://lab.tojio.com/projects/ribbons/index.html" target="_blank">here</a> to have a look at the result. Enjoy!<br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2007/11/06/ribbons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision 3D Ribbons (Interactive) [en]</title>
		<link>http://lab.tojio.com/2007/11/06/ribbonsinteractive/</link>
		<comments>http://lab.tojio.com/2007/11/06/ribbonsinteractive/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 18:55:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2007/11/06/ribbonsinteractive/</guid>
		<description><![CDATA[RibbonsInteractive is nearly identical to the experiment &#8216;Sparkler&#8216;. But instead of drawing the ribbons/lines in real time it uses a Tween with randomly generated Beziercurves to define the path and from a to b&#8230; Click here to have a look at the result. Enjoy!]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/ribbonsinteractive/"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2007/11/ribbonsinteractive.thumbnail.png" alt="RibbonsInteractive" /></a><br />
RibbonsInteractive is nearly identical to the experiment &#8216;<a title="Sparkler, Papervision3D" href="http://lab.tojio.com/projects/sparkler/index.html">Sparkler</a>&#8216;. But instead of drawing the ribbons/lines in real time it uses a Tween with randomly generated Beziercurves to define the path and from a to b&#8230;</p>
<p>Click <a title="RibbonsInteractive" href="http://lab.tojio.com/projects/ribbonsinteractive/index.html" target="_blank">here</a> to have a look at the result. Enjoy!<br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2007/11/06/ribbonsinteractive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Papervision Sparkler (Fun with the ConvolutionFilter and ColorMatrixFilter) [en]</title>
		<link>http://lab.tojio.com/2007/11/05/sparkler-having-fun-with-the-convolutionfilter-and-colormatrixfilter/</link>
		<comments>http://lab.tojio.com/2007/11/05/sparkler-having-fun-with-the-convolutionfilter-and-colormatrixfilter/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 13:57:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2007/11/05/sparkler-having-fun-with-the-convolutionfilter-and-colormatrixfilter/</guid>
		<description><![CDATA[Sparkler is yet another experiment in Actionscript 3, focusing on the use of bitmap filters (ConvolutionFilter, ColorMatrixFilter) applied to sprites. Using the 3D engine &#8216;Papervision3D&#8217; and the line classes provided by zupko.info as the source for the bitmap filters, you can draw on the canvas in 2D style. Get a 3D view of your scribble [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/sparkler/"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2007/11/sparkler.thumbnail.png" alt="Sparkler" /></a><br />
Sparkler is yet another experiment in Actionscript 3, focusing on the use of bitmap filters (ConvolutionFilter, ColorMatrixFilter) applied to sprites. Using the 3D engine <a title="Papervision3D Wiki" href="http://wiki.papervision3d.org/index.php?title=Main_Page" target="_blank">&#8216;Papervision3D&#8217; </a>and the line classes provided by <a title="Line 3D" href="http://blog.zupko.info/" target="_blank">zupko.info</a> as the source for the bitmap filters, you can draw on the canvas in 2D style. Get a 3D view of your scribble by holding down the left mouse button and drag.</p>
<p>Click <a title="Sparkler" href="http://lab.tojio.com/projects/sparkler/index.html" target="_blank">here</a> to have a look at the result. Enjoy!<br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2007/11/05/sparkler-having-fun-with-the-convolutionfilter-and-colormatrixfilter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Space: tiling, tweening and texturing basics in Papervision3D [en]</title>
		<link>http://lab.tojio.com/2007/10/29/space-tiling-tweening-and-texturing-basics-in-papervision3d/</link>
		<comments>http://lab.tojio.com/2007/10/29/space-tiling-tweening-and-texturing-basics-in-papervision3d/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 14:50:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Picture Gallery]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://lab.tojio.com/2007/10/29/space-tiling-tweening-and-texturing-basics-in-papervision3d/</guid>
		<description><![CDATA[Space uses the &#8216;tweener&#8216;-classes in combination with the 3D Engine &#8216;Papervision3D&#8217;. The idea is to use one texture for many planes so more complex animation and transition effects can be accomplished. This version still has no preloader, so you might have to wait a little before you see something. Click here to have a look [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.tojio.com/projects/space/"><img style="margin: 0px 20px 10px 0px; float: left" src="http://lab.tojio.com/wp-content/uploads/2007/10/space.thumbnail.png" alt="Space" /></a><br />
Space uses the &#8216;<a title="Tweener" href="http://code.google.com/p/tweener/" target="_blank">tweener</a>&#8216;-classes in combination with the 3D Engine <a title="Papervision3D Wiki" href="http://wiki.papervision3d.org/index.php?title=Main_Page" target="_blank">&#8216;Papervision3D&#8217;</a>. The idea is to use one texture for many planes so more complex animation and transition effects can be accomplished. This version still has no preloader, so you might have to wait a little before you see something.</p>
<p>Click <a title="Space" href="http://lab.tojio.com/projects/space/index.html" target="_blank">here</a> to have a look at the result. Enjoy!<br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.tojio.com/2007/10/29/space-tiling-tweening-and-texturing-basics-in-papervision3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

