<?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>com.zavoo.labs</title>
	<atom:link href="http://labs.zavoo.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://labs.zavoo.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 23 Jan 2010 13:41:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Flex and Flash SVGWeb Components</title>
		<link>http://labs.zavoo.com/?p=238</link>
		<comments>http://labs.zavoo.com/?p=238#comments</comments>
		<pubDate>Sat, 23 Jan 2010 13:41:30 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[SVG Viewer]]></category>
		<category><![CDATA[SVGWeb]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=238</guid>
		<description><![CDATA[A few changes since my last post. All of the activity is now on SVG Web Project I&#8217;ve updated the Flex and Flash components to work similar to the old SVGViewer components. They also include bug work around for cacheAsBitmap. 1 2 3 4 5 6 7 8 9 10 var svgViewerFlash:SVGViewerFlash = new SVGViewerFlash&#40;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>A few changes since my last post.<br />
All of the activity is now on <a href="http://svgweb.org" target="_blank">SVG Web Project</a></p>
<p>I&#8217;ve updated the Flex and Flash components to work similar to the old SVGViewer components.<br />
They also include bug work around for cacheAsBitmap.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> svgViewerFlash:SVGViewerFlash = <span style="color: #000000; font-weight: bold;">new</span> SVGViewerFlash<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
svgViewerFlash.<span style="color: #006600;">source</span> = <span style="color: #ff0000;">'&lt;svg...&lt;/svg&gt;'</span>;
svgViewerFlash.<span style="color: #006600;">source</span> = <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;svg...&lt;/svg&gt;'</span><span style="color: #66cc66;">&#41;</span>;
svgViewerFlash.<span style="color: #006600;">source</span> = <span style="color: #ff0000;">&quot;assets/somefile.svg&quot;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Encodes images as an inline base 64 image node</span>
svgViewerFlash.<span style="color: #006600;">source</span> = <span style="color: #ff0000;">&quot;http://example.com/image.jpg&quot;</span>;
svgViewerFlash.<span style="color: #006600;">source</span> = Bitmap;
svgViewerFlash.<span style="color: #006600;">source</span> = BitmapData;</pre></td></tr></table></div>

<p>Currently they are only available on a branch:<br />
<a href="http://code.google.com/p/svgweb/source/browse/branches/james-branch/src/" target="_blank">http://code.google.com/p/svgweb/source/browse/branches/james-branch/src/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=238</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New ActionScript SVG Library &#8211; Status Update</title>
		<link>http://labs.zavoo.com/?p=209</link>
		<comments>http://labs.zavoo.com/?p=209#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:31:49 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[SVG Viewer]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=209</guid>
		<description><![CDATA[Hello All, I apologize for taking so long to give you an update on the status of the SVG library. I&#8217;ve been busy working on a last minute project 2,500 miles away from home and hearth for the previous three months. The new library provides a major code cleanup and a slew of new features. [...]]]></description>
			<content:encoded><![CDATA[<p>Hello All,</p>
<p>I apologize for taking so long to give you an update on the status of the SVG library.  I&#8217;ve been busy working on a last minute project 2,500 miles away from home and hearth for the previous three months.</p>
<p>The new library provides a major code cleanup and a slew of new features.  Rick Masters and Brad Neuberg have made some huge leaps since I dropped off the face of the earth.  Their work can be found in the <a href="http://code.google.com/p/sgweb/" target="_blank">sgweb Google project</a>.</p>
<p>In a few weeks I will have time to start contributing to the project again.  My main focus will be on providing a clean Flex and Flash interface to the new library.</p>
<p>Future updates will be made to the <a href="http://code.google.com/p/sgweb/" target="_blank">sgweb Google project</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=209</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New ActionScript SVG Library Coming Soon</title>
		<link>http://labs.zavoo.com/?p=200</link>
		<comments>http://labs.zavoo.com/?p=200#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:47:51 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[SVG Viewer]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=200</guid>
		<description><![CDATA[A few people have been asking about the status of the SVG Viewer project so I thought I would write a brief update. I am in the process of merging my project with two sister projects by Richard R. Masters and Brad Neuberg. The new library will supply three component types: Flex, Flash, and Web. [...]]]></description>
			<content:encoded><![CDATA[<p>A few people have been asking about the status of the SVG Viewer project so I thought I would write a brief update.</p>
<p>I am in the process of merging my project with two sister projects by Richard R. Masters and <a href="http://codinginparadise.org/" target="_blank">Brad Neuberg</a>.  The new library will supply three component types: Flex, Flash, and Web.</p>
<p>The Web component will be a Flash and JavaScript application that integrates directly into the browser&#8217;s DOM.  It will allow browsers without SVG support, like IE, to render SVG files.  Eventually, we would like the Web component to support an SVG feature set similar to Firefox.</p>
<p>There have been a huge number of bug fixes, optimizations, and features added to the new library.  Once the merge is complete I will make the new code base available.  It should be no later then the end of February.</p>
<ul>
<lh>Some features on the horizon (possibly far horizon):</h></p>
<li>SMIL Animation Support</li>
<li>SVG Embedded Fonts</li>
<li>JavaScript Scripting</li>
<li>Filter Effects</li>
<li>Text Along A Path</li>
<li>Internal CSS Support
<li>
<li>Cursor Support</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=200</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>3D Enviroment Generated From An SVG</title>
		<link>http://labs.zavoo.com/?p=189</link>
		<comments>http://labs.zavoo.com/?p=189#comments</comments>
		<pubDate>Sat, 24 Jan 2009 15:38:24 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[SVG Viewer]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=189</guid>
		<description><![CDATA[The engine uses an SVG file to generate 3D objects on the fly. I am using Papervision3D and APE for 3D and physics. The environment builder looks for three layers/groups in the root of the SVG. Each of the children of the layers is used to render different types of objects. The &#8216;ground&#8217; layer is [...]]]></description>
			<content:encoded><![CDATA[<p>
<object width="500" height="375">
<param name="movie" value="/content/flex/3DSvg/3DSvg.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="500" height="375" src="/content/flex/3DSvg/3DSvg.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
<br />
The engine uses an SVG file to generate 3D objects on the fly.<br />
I am using Papervision3D and APE for 3D and physics.</p>
<p>The environment builder looks for three layers/groups in the root of the SVG.  Each of the children of the layers is used to render different types of objects.</p>
<ul>
<li>The &#8216;ground&#8217; layer is used to render the ground.</li>
<li>The &#8216;items&#8217; layer is used to render two dimensional objects on a plane.</li>
<li>The &#8216;items3D&#8217; layer is used to render three dimensional objects on two plane rotated 90 degrees from each other.</li>
</ul>
<p>Items are rotated 90 degrees from the ground along their bottom edge.</p>
<p>This is the SVG used in the above example:<br />
<a href="/content/flex/3DSvg/map.svg" target="_blank"><img src="/content/flex/3DSvg/map.png" alt="SVG Map"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=189</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Papervision3D: Happy New Year, Graphics3D Profile Rotation</title>
		<link>http://labs.zavoo.com/?p=170</link>
		<comments>http://labs.zavoo.com/?p=170#comments</comments>
		<pubDate>Thu, 01 Jan 2009 19:15:06 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=170</guid>
		<description><![CDATA[[Subversion Repo] I have created a code repository for the ThreeDee Papervision3D extension. &#160;&#160;&#160;&#160;svn co https://iciifs.com/svn/ThreeDee Graphics3D now supports profile rotation around the z-axis. Simply draw a curve using the normal Graphics commands. Then call endFillSpin(degrees:Number = 360, steps:uint = 20) to create on object based on the rotated curve. 1 2 3 4 5 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/content/flex/ProfileRotation/ProfileRotation.swf" target="_blank"><img src="http://labs.zavoo.com/wp-content/uploads/2009/01/happynewyear.png" alt="Happy New Year" title="Happy New Year" width="467" height="348" class="alignnone size-full wp-image-198" /></a><br />
<del datetime="2010-01-23T04:36:34+00:00"><a href="https://iciifs.com/svn/ThreeDee" target="_blank">[Subversion Repo]</a></p>
<p>I have created a code repository for the ThreeDee Papervision3D extension.<br />
&nbsp;&nbsp;&nbsp;&nbsp;svn co https://iciifs.com/svn/ThreeDee</del></p>
<p>Graphics3D now supports profile rotation around the z-axis.<br />
Simply draw a curve using the normal Graphics commands.<br />
Then call endFillSpin(degrees:Number = 360, steps:uint = 20) to create on object based on the rotated curve.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> light:PointLight3D = <span style="color: #000000; font-weight: bold;">new</span> PointLight3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
light.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">100</span>;
light.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">100</span>;
light.<span style="color: #006600;">z</span> = <span style="color: #cc66cc;">2000</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>light<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> redColor:FlatShadeMaterial = <span style="color: #000000; font-weight: bold;">new</span> FlatShadeMaterial<span style="color: #66cc66;">&#40;</span>light, 0xff0000, 0xfdfdfd<span style="color: #66cc66;">&#41;</span>;
redColor.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;
redColor.<span style="color: #006600;">fillAlpha</span> = <span style="color: #cc66cc;">0.5</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> greyColor:FlatShadeMaterial = <span style="color: #000000; font-weight: bold;">new</span> FlatShadeMaterial<span style="color: #66cc66;">&#40;</span>light, 0xdddddd, 0xfdfdfd<span style="color: #66cc66;">&#41;</span>;
greyColor.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;
greyColor.<span style="color: #006600;">fillAlpha</span> = <span style="color: #cc66cc;">0.5</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> greenColor:FlatShadeMaterial = <span style="color: #000000; font-weight: bold;">new</span> FlatShadeMaterial<span style="color: #66cc66;">&#40;</span>light, 0x28913f, 0xfdfdfd<span style="color: #66cc66;">&#41;</span>;
greenColor.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;
greenColor.<span style="color: #006600;">fillAlpha</span> = <span style="color: #cc66cc;">0.5</span>;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> surface3D:Surface3D = <span style="color: #000000; font-weight: bold;">new</span> Surface3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Draw profile to be rotated around z-axis</span>
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>greyColor<span style="color: #66cc66;">&#41;</span>;
&nbsp;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">moveTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">10</span>, -<span style="color: #cc66cc;">197</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">10</span>, -<span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">20</span>, -<span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">10</span>, -<span style="color: #cc66cc;">150</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">20</span>, -<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0</span>, -<span style="color: #cc66cc;">70</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0</span>, -<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">30</span>, <span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Rotate profile</span>
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">endFillSpin</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
surface3D.<span style="color: #006600;">z</span> = -<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span> + <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>  <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">2</span>;
&nbsp;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">holder</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>surface3D<span style="color: #66cc66;">&#41;</span>;
&nbsp;
surface3D = Surface3D<span style="color: #66cc66;">&#40;</span>surface3D.<span style="color: #006600;">clone</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">material</span> = redColor;
surface3D.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">80</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">holder</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>surface3D<span style="color: #66cc66;">&#41;</span>;
&nbsp;
surface3D = Surface3D<span style="color: #66cc66;">&#40;</span>surface3D.<span style="color: #006600;">clone</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">material</span> = greenColor;
surface3D.<span style="color: #006600;">x</span> = -<span style="color: #cc66cc;">80</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">holder</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>surface3D<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Papervision3D: Surface Extrusion</title>
		<link>http://labs.zavoo.com/?p=152</link>
		<comments>http://labs.zavoo.com/?p=152#comments</comments>
		<pubDate>Wed, 31 Dec 2008 15:58:40 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=152</guid>
		<description><![CDATA[[View Source Code] I have implemented surface extrusion along the z-axis for Graphics3D. Graphics3D.depth defines the size and direction of the extrusion. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 &#160; var yellowColor:FlatShadeMaterial = new FlatShadeMaterial&#40;light, 0xfffc00&#41;; yellowColor.doubleSided = [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/content/flex/SurfaceExtrusion/SurfaceExtrusion.swf" target="_blank"><br />
<img src="http://labs.zavoo.com/wp-content/uploads/2009/01/smileyface.png" alt="" title="smileyface" width="494" height="195" class="alignnone size-full wp-image-182" /></a><br />
<a href="/content/flex/SurfaceExtrusion/srcview/index.html" target="_blank">[View Source Code]</a></p>
<p>I have implemented surface extrusion along the z-axis for Graphics3D.<br />
Graphics3D.depth defines the size and direction of the extrusion.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> yellowColor:FlatShadeMaterial = <span style="color: #000000; font-weight: bold;">new</span> FlatShadeMaterial<span style="color: #66cc66;">&#40;</span>light, 0xfffc00<span style="color: #66cc66;">&#41;</span>;
yellowColor.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">depth</span> = <span style="color: #cc66cc;">10</span>; <span style="color: #808080; font-style: italic;">//Set depth of surface extrusion</span>
surface3D.<span style="color: #006600;">z</span> = -surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">depth</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">2</span>;
&nbsp;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">linesPerCurve</span> = <span style="color: #cc66cc;">6</span>; <span style="color: #808080; font-style: italic;">//Set curve quality</span>
&nbsp;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>yellowColor<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Main body of smiley face</span>
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Now we draw inside the main body to create holes</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//Draw eyes</span>
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">18</span>, <span style="color: #cc66cc;">18</span>, <span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">18</span>, <span style="color: #cc66cc;">18</span>, <span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Draw mouth</span>
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">20</span>, -<span style="color: #cc66cc;">25</span>, -<span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">40</span>, <span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
surface3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=152</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Papervision3D: Graphics3D Using Delaunay Triangulation</title>
		<link>http://labs.zavoo.com/?p=141</link>
		<comments>http://labs.zavoo.com/?p=141#comments</comments>
		<pubDate>Wed, 31 Dec 2008 01:12:49 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=141</guid>
		<description><![CDATA[[View Source Code] Delaunay triangulation breaks a shape consisting of a set of points into triangles. We can then use those triangles to create a mesh in Papervision3D. Hole detection is implemented by creating polygons that define each set of edges. Each triangle&#8217;s mid point is then check to see if it falls inside or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/content/flex/DelaunayDemo/DelaunayDemo.swf" target="_blank"><img src="http://labs.zavoo.com/wp-content/uploads/2008/12/delaunay.png" alt="" title="delaunay" width="496" height="153" class="alignnone size-full wp-image-166" /></a><br />
<a href="/content/flex/DelaunayDemo/srcview/index.html" target="_blank">[View Source Code]</a></p>
<p>Delaunay triangulation breaks a shape consisting of a set of points into triangles.  We can then use those triangles to create a mesh in Papervision3D.</p>
<p>Hole detection is implemented by creating polygons that define each set of edges.  Each triangle&#8217;s mid point is then check to see if it falls inside or outside of a shape.  If it is in a shape, we also check that it is not in a hole represented by a sub polygon.</p>
<ul>
<lh>Graphics3D currently supports:</lh></p>
<li>beginFill</li>
<li>moveTo</li>
<li>lineTo</li>
<li>curveTo</li>
<li>drawRect</li>
<li>endFill</li>
</ul>
<p>The curveTo command breaks up the curve into a number of line segments defined by Graphics3D.linesPerCurve.</p>
<p>Example code for drawing the two blue bars above:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> blueColor:FlatShadeMaterial = <span style="color: #000000; font-weight: bold;">new</span> FlatShadeMaterial<span style="color: #66cc66;">&#40;</span>light, 0x0000ff<span style="color: #66cc66;">&#41;</span>;
blueColor.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> textHolder:Surface3D = <span style="color: #000000; font-weight: bold;">new</span> Surface3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
textHolder.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>blueColor<span style="color: #66cc66;">&#41;</span>;
textHolder.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">35</span>, <span style="color: #cc66cc;">0</span>, len, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
textHolder.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">25</span>, <span style="color: #cc66cc;">0</span>, len, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
textHolder.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>This is most definitely a work in progress.  Hole detection, when it works, is slow. Triangles outside of the draw area are not always caught. Sometimes it just doesn&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=141</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Papervision3D: Dynamic TrueType Font Loading</title>
		<link>http://labs.zavoo.com/?p=105</link>
		<comments>http://labs.zavoo.com/?p=105#comments</comments>
		<pubDate>Sun, 28 Dec 2008 10:25:54 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=105</guid>
		<description><![CDATA[[View Source Code] Papervisoin3D&#8217;s 3D text is nice, but the font choices are limited unless you want to take the time to implement your own Font3D files. I&#8217;ve been working with font parsing for the last month for another project and thought why not create a font parser for Papervision3D? The TrueType font parsing library [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/content/flex/DynamicFont3D/DynamicFont3DTest.swf" target="_blank"><img src="http://labs.zavoo.com/wp-content/uploads/2008/12/fontloader.png" alt="" title="fontloader" width="494" height="189" class="alignnone size-full wp-image-160" /></a><br />
<a href="/content/flex/DynamicFont3D/srcview/index.html" target="_blank">[View Source Code]</a></p>
<p>Papervisoin3D&#8217;s 3D text is nice, but the font choices are limited unless you want to take the time to implement your own Font3D files.  I&#8217;ve been working with font parsing for the last month for another project and thought why not create a font parser for Papervision3D?</p>
<p>The TrueType font parsing library came from <a href="http://www.sephiroth.it/weblog/archives/2007/07/fontreader_convert_truetype_fonts_in.php" target="_blank">Alessandro Crugnola.</a> It is part of an ActionScript port of the Java applications <a href="https://typecast.dev.java.net/" target="_blank">typecast.</a>  I&#8217;m in the process of writing a much leaner font parser that will have support for both TrueType and OpenType fonts.</p>
<p>I did make a small change to the Papervision3D library.  Some of the font files do not have a complete character set.  This can cause VectorLetter3D to choke.</p>
<p>In org.papervision3d.typography.VectorLetter3D, around line 40 I added:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>40
41
42
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_font.<span style="color: #006600;">motifs</span>.<span style="color: #006600;">hasOwnProperty</span><span style="color: #66cc66;">&#40;</span>_char<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	createVertices<span style="color: #66cc66;">&#40;</span>_font.<span style="color: #006600;">motifs</span><span style="color: #66cc66;">&#91;</span>_char<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>To load a TrueType font simply pass the font data as a ByteArray to the static class Font3DLoader and you get a Font3D object back.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> font3D:Font3D = Font3DLoader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>trueTypeByteArray<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>If the font file contains more than one font, the first font is loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=105</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>SvgViewer &#8211; New Home, Misc Updates</title>
		<link>http://labs.zavoo.com/?p=93</link>
		<comments>http://labs.zavoo.com/?p=93#comments</comments>
		<pubDate>Tue, 23 Dec 2008 02:22:41 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[SVG Viewer]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=93</guid>
		<description><![CDATA[There have been a number of requests to post the SvgViewer project on Google code. So, here it is: http://code.google.com/p/svg-viewer/ My goal is to keep the repo at Google as stable as possible. Day to day changes will still be made in the old repository. I have started to merge some of the changes Richard [...]]]></description>
			<content:encoded><![CDATA[<p>There have been a number of requests to post the SvgViewer project on Google code.<br />
So, here it is: <a href="http://code.google.com/p/svg-viewer/" target="_blank">http://code.google.com/p/svg-viewer/</a></p>
<p>My goal is to keep the repo at Google as stable as possible.  Day to day changes will still be made in the old repository.</p>
<p>I have started to merge some of the changes Richard R. Masters has made in his <a href="http://code.google.com/p/sgweb/" target="_blank">sgweb project</a> back into the source tree.  Richard is creating a Flash SVG browser component with JavaScript support.  He has made a slew of commits over the last two months.  It will take me a while to work through all of his changes.  I&#8217;m looking forward to seeing how his project evolves!</p>
<p>Hope everyone is having a good Christmas!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=93</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rendering Existing PDF Files in Flex / Flash</title>
		<link>http://labs.zavoo.com/?p=71</link>
		<comments>http://labs.zavoo.com/?p=71#comments</comments>
		<pubDate>Tue, 16 Dec 2008 00:41:46 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://labs.zavoo.com/?p=71</guid>
		<description><![CDATA[Update: Text in Flash 10 seems to be disappearing. Will need to investigate&#8230; Update #2: Text with individual character placement was not being handled. This was causing it to be pushed off screen. Text should now display properly. I don&#8217;t know why it worked in Flash 9. I was curious how hard it would be [...]]]></description>
			<content:encoded><![CDATA[<p style="color: red;">Update: Text in Flash 10 seems to be disappearing.  Will need to investigate&#8230;</p>
<p style="color: red;">Update #2: Text with individual character placement was not being handled.  This was causing it to be pushed off screen.  Text should now display properly. I don&#8217;t know why it worked in Flash 9.</p>
<p><img src="/wp-content/uploads/2008/12/passport.jpg" alt="passport" /><br />
I was curious how hard it would be to render an existing PDF file inside of Flash.  Turns out it&#8217;s a pain in the ass.</p>
<p>I&#8217;ve been working on this off and on over the last couple of months.  Best results are achieved with older version PDF files.  It is no where near being close to rendering the newest PDF feature set.</p>
<ul>
<lh>Some Features:</lh></p>
<li>The pages load individually. So, the first pages can be displayed while the remaining pages are still loading.</li>
<li>Unless text is rotated, the viewer tries to display text in a TextField.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://labs.zavoo.com/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
