<?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>Layers of information</title>
	<atom:link href="http://illustrata.no/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://illustrata.no/blog</link>
	<description></description>
	<lastBuildDate>Wed, 12 Aug 2009 12:58:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Select by material, Apply material to selected, Unity scripts</title>
		<link>http://illustrata.no/blog/2009/08/unity-scripts/</link>
		<comments>http://illustrata.no/blog/2009/08/unity-scripts/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 11:36:48 +0000</pubDate>
		<dc:creator>Alexander Morland</dc:creator>
				<category><![CDATA[Realtime 3D]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=348</guid>
		<description><![CDATA[So I was setting up this scene, again, in unity3d and having already done it before, I had materials I wished to reuse. However, unity editor is missing some features. Namely "Select Objects by Material" and "Apply Material to all Selected Objects". Well at least it is possible to create a script to do this [...]]]></description>
			<content:encoded><![CDATA[<p>So I was setting up this scene, again, in unity3d and having already done it before, I had materials I wished to reuse. However, unity editor is missing some features. Namely "Select Objects by Material" and "Apply Material to all Selected Objects". Well at least it is possible to create a script to do this and reuse the script. Even share it. So for anyone else out there that needs these features, here they are. I suspect this "package" of editor scripts will grow as new missing features are discovered.</p>
<p><span id="more-348"></span></p>
<p>To use this script, place it as a file called "illustrata.cs" in your "/assets/editor" folder. There should then appear a new menu item in the editor, and two options below it. To use them you select in the hierarchy the objects you wish to select from / apply material to, and one (or more) materials in the Project pane (Apply Material uses only one material). These two scripts work well in cooperation, which is what I did. </p>
<p><a href='http://illustrata.no/blog/wp-content/uploads/2009/08/illustrata.cs'>download file</a> (Right click and choose "Save link as..")</p>
<pre class="csharp">&nbsp;
<span style="color: #0600FF;">using</span> UnityEngine;
<span style="color: #0600FF;">using</span> UnityEditor;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Collections</span>;
<span style="color: #008080; font-style: italic;">/**
 *  Set of editor tools found generally useful by illustrata
 *
 *  Features:
 *    - Select all objects that use one or a set of materials
 *    - Apply a material to all selected objects
 *
 *  @author Alexander Morland (alkemann)
 *  @license MIT
 *  @copyright illustrata.no
 */</span>
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> illustrata : ScriptableObject <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">/**
	 *   Given an editor selection of gameobjects with renderer component and
	 *   at least one material, set editor selection to those gameobjects that
	 *   have one (of these) material(s) applied to it.
	 *
	 */</span>
    <span style="color: #000000;">&#91;</span>MenuItem <span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;illustrata/Select By Material&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> DoSelect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		ArrayList mats = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ArrayList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #FF0000;">int</span> count = <span style="color: #FF0000;">0</span>;
		<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span> <span style="color: #FF0000;">Object</span> obj <span style="color: #0600FF;">in</span> Selection.<span style="color: #0000FF;">objects</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=typeof+msdn.microsoft.com"><span style="color: #008000;">typeof</span></a><span style="color: #000000;">&#40;</span>UnityEngine.<span style="color: #0000FF;">Material</span><span style="color: #000000;">&#41;</span> == obj.<span style="color: #0000FF;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				mats.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>obj<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> <span style="color: #0600FF;">else</span> <span style="color: #000000;">&#123;</span>
				count++;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		UnityEngine.<span style="color: #FF0000;">Object</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> select = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UnityEngine.<span style="color: #FF0000;">Object</span><span style="color: #000000;">&#91;</span>count<span style="color: #000000;">&#93;</span>;
		count = <span style="color: #FF0000;">0</span>;
		<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span> GameObject go <span style="color: #0600FF;">in</span> Selection.<span style="color: #0000FF;">gameObjects</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">foreach</span><span style="color: #000000;">&#40;</span> Material mat <span style="color: #0600FF;">in</span> mats<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>go.<span style="color: #0000FF;">renderer</span>.<span style="color: #0000FF;">sharedMaterial</span>.<span style="color: #0000FF;">name</span> == mat.<span style="color: #0000FF;">name</span> || go.<span style="color: #0000FF;">renderer</span>.<span style="color: #0000FF;">sharedMaterial</span>.<span style="color: #0000FF;">name</span> == mat.<span style="color: #0000FF;">name</span>+<span style="color: #808080;">&quot; (Instance)&quot;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#123;</span>
					select<span style="color: #000000;">&#91;</span>count++<span style="color: #000000;">&#93;</span> = go;
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		Selection.<span style="color: #0000FF;">objects</span> = select;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">/**
	  *  Given any number of gameobjects with renderer and one material as editor selection,
	  *  apply the selected material to all the selected objects.
	  */</span>
    <span style="color: #000000;">&#91;</span>MenuItem <span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;illustrata/Apply Material To Selected&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> DoApply<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		Material mat = <span style="color: #0600FF;">null</span>;
		<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span> <span style="color: #FF0000;">Object</span> obj <span style="color: #0600FF;">in</span> Selection.<span style="color: #0000FF;">objects</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=typeof+msdn.microsoft.com"><span style="color: #008000;">typeof</span></a><span style="color: #000000;">&#40;</span>UnityEngine.<span style="color: #0000FF;">Material</span><span style="color: #000000;">&#41;</span> == obj.<span style="color: #0000FF;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				mat = <span style="color: #000000;">&#40;</span>UnityEngine.<span style="color: #0000FF;">Material</span><span style="color: #000000;">&#41;</span> obj;
				<span style="color: #0600FF;">continue</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span> GameObject go <span style="color: #0600FF;">in</span> Selection.<span style="color: #0000FF;">gameObjects</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			go.<span style="color: #0000FF;">renderer</span>.<span style="color: #0000FF;">sharedMaterial</span> = mat;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/08/unity-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stranded on an island</title>
		<link>http://illustrata.no/blog/2009/08/stranded/</link>
		<comments>http://illustrata.no/blog/2009/08/stranded/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 08:34:16 +0000</pubDate>
		<dc:creator>Petter Sundnes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[lightwave]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=343</guid>
		<description><![CDATA[I came across an issue the other day while doodling on a 3D model of a car wheel. The nuts, or bolts if you will, were too small and I found it strange that there was no tool inside LightWave to scale them individually as separate entities as they were inside the same layer (mesh) [...]]]></description>
			<content:encoded><![CDATA[<p>I came across an issue the other day while doodling on a 3D model of a car wheel. The nuts, or bolts if you will, were too small and I found it strange that there was no tool inside LightWave to scale them individually as separate entities as they were inside the same layer (mesh) in Modeler. This would mean I had to manually select each island and scale them one by one. Not a giant task by any means as it was only a few items, but still annoying.</p>
<p><span id="more-343"></span></p>
<p><object width="600" height="450" data="http://vimeo.com/moogaloop.swf?clip_id=5802071&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=5802071&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" /></object></p>
<p>So I went to the NewTek forums and posted a question on whether or not there is a solution for this, either hidden somewhere in LW or some sort of plugin. I got some suggestions on plugins to use and a script to try. They weren't exactly what I was after, but it gave me a starting point and idea of how to get this functionality working as I wanted it to.</p>
<p>I studied the suggested LScript (LightWave Script), got the grasps of what was going on, analyzing why it wasn't working, and after a couple of iterations came up with a solution that worked. This was in turn taken by someone else, new to the discussion, and improved to yet another level.</p>
<p>At this point the script was doing what I wanted in terms of scaling each "island" of selected polygons, but in a very try-and-see-what-happens kind of way, as there was no interactive feedback of the end result while changing the scale value. So I added an interactive update to it as well as the next step.</p>
<p>From this it was a couple of lines extra and we had "island-rotation" as well. The only problem here is that it happens on world-coordinate axis, so if your island of selected polygons were on differently slanted angles, it could mess them up. If they were aligned flat on the same plane, they were fine.</p>
<p>Now this LScript is in a stage of adding scaling around each polygon-selection's average normal (its local "up" axis) and if this works then... woohoo! Anyone with some 1337 LScript and/or 3D math knowledge is welcome to contribute.</p>
<h3>I would not have found these solutions as fast if it was not for the community and the general attitude of sharing and contributing.</h3>
<p>That's it for now, check out the forum thread and follow the continued development of this:<br />
http://www.newtek.com/forums/showthread.php?t=100587</p>
<p>or click more for to also see the code:</p>
<pre class="javascript">@version <span style="color: #CC0000;">2.7</span>
@warnings
@script modeler
&nbsp;
groups;
groupCnt = <span style="color: #CC0000;">0</span>;
&nbsp;
scaleAmount = <span style="color: #CC0000;">100</span>;
&nbsp;
rotateXAmount = <span style="color: #CC0000;">0</span>;
rotateYAmount = <span style="color: #CC0000;">0</span>;
rotateZAmount = <span style="color: #CC0000;">0</span>;
&nbsp;
polygons <span style="color: #66cc66;">&#123;</span>
	editbegin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	polys = polygons;
	editend<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">return</span> polys;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
main
<span style="color: #66cc66;">&#123;</span>
	init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	interface<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
init
<span style="color: #66cc66;">&#123;</span>
	selmode<span style="color: #66cc66;">&#40;</span>DIRECT<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#40;</span>polyCnt<span style="color: #66cc66;">&#41;</span> = polycount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>polyCnt&amp;lt;<span style="color: #CC0000;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		info<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;No polygons selected&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000066; font-weight: bold;">return</span>;
	<span style="color: #66cc66;">&#125;</span>
	extractPolyGrp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #009900; font-style: italic;">//createMorphMap();</span>
	reselect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
interface
<span style="color: #66cc66;">&#123;</span>
	reqbegin<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Polygon Islands&quot;</span><span style="color: #66cc66;">&#41;</span>;
	reqsize<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">200</span>, <span style="color: #CC0000;">150</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	amount_ctl = ctlminislider<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Scale:&quot;</span>,<span style="color: #CC0000;">100</span>,<span style="color: #CC0000;">0</span>,<span style="color: #CC0000;">1000</span><span style="color: #66cc66;">&#41;</span>;
	ctlrefresh<span style="color: #66cc66;">&#40;</span>amount_ctl, <span style="color: #3366CC;">&quot;updateScale&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	ctlsep<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	rotateXAmount_ctl = ctlminislider<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Rotate X:&quot;</span>,<span style="color: #CC0000;">0</span>,<span style="color: #CC0000;">-360</span>,<span style="color: #CC0000;">360</span><span style="color: #66cc66;">&#41;</span>;
	ctlrefresh<span style="color: #66cc66;">&#40;</span>rotateXAmount_ctl, <span style="color: #3366CC;">&quot;updateXRotate&quot;</span><span style="color: #66cc66;">&#41;</span>;
	rotateYAmount_ctl = ctlminislider<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Rotate Y:&quot;</span>,<span style="color: #CC0000;">0</span>,<span style="color: #CC0000;">-360</span>,<span style="color: #CC0000;">360</span><span style="color: #66cc66;">&#41;</span>;
	ctlrefresh<span style="color: #66cc66;">&#40;</span>rotateYAmount_ctl, <span style="color: #3366CC;">&quot;updateYRotate&quot;</span><span style="color: #66cc66;">&#41;</span>;
	rotateZAmount_ctl = ctlminislider<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Rotate Z:&quot;</span>,<span style="color: #CC0000;">0</span>,<span style="color: #CC0000;">-360</span>,<span style="color: #CC0000;">360</span><span style="color: #66cc66;">&#41;</span>;
	ctlrefresh<span style="color: #66cc66;">&#40;</span>rotateZAmount_ctl, <span style="color: #3366CC;">&quot;updateZRotate&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>reqpost<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		selectBaseVmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		reselect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		confirmChanges<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		selectBaseVmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		reselect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	reqend<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
confirmChanges
<span style="color: #66cc66;">&#123;</span>
	process<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
updateScale: value
<span style="color: #66cc66;">&#123;</span>
	scaleAmount = value;
	process<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
updateXRotate: value
<span style="color: #66cc66;">&#123;</span>
	rotateXAmount = value;
	process<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
updateYRotate: value
<span style="color: #66cc66;">&#123;</span>
	rotateYAmount = value;
	process<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
updateZRotate: value
<span style="color: #66cc66;">&#123;</span>
	rotateZAmount = value;
	process<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
extractPolyGrp
<span style="color: #66cc66;">&#123;</span>
	undogroupbegin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	selmode<span style="color: #66cc66;">&#40;</span>USER<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #009900; font-style: italic;">//hide non-island and disconnect islands for Select Connected to work.</span>
	selhide<span style="color: #66cc66;">&#40;</span>UNSELECTED<span style="color: #66cc66;">&#41;</span>;
	cut<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; paste<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #009900; font-style: italic;">// extract polygon groups</span>
	<span style="color: #66cc66;">&#40;</span>polyCnt<span style="color: #66cc66;">&#41;</span> = polycount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">while</span><span style="color: #66cc66;">&#40;</span>polyCnt<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		selmode<span style="color: #66cc66;">&#40;</span>USER<span style="color: #66cc66;">&#41;</span>;
		selpolygon<span style="color: #66cc66;">&#40;</span>SET,POLYNDX,<span style="color: #CC0000;">1</span><span style="color: #66cc66;">&#41;</span>;
		selpolygon<span style="color: #66cc66;">&#40;</span>SET,CONNECT<span style="color: #66cc66;">&#41;</span>;
		groups<span style="color: #66cc66;">&#91;</span>++groupCnt<span style="color: #66cc66;">&#93;</span> = polygons<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		selhide<span style="color: #66cc66;">&#40;</span>SELECTED<span style="color: #66cc66;">&#41;</span>;
		selmode<span style="color: #66cc66;">&#40;</span>GLOBAL<span style="color: #66cc66;">&#41;</span>;			<span style="color: #009900; font-style: italic;">//Bug workaround! USER selmode counts hidden polys. Hides to slow!?</span>
									<span style="color: #009900; font-style: italic;">//Oddly, USER mode works when debugging.</span>
		<span style="color: #66cc66;">&#40;</span>polyCnt<span style="color: #66cc66;">&#41;</span> = polycount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #009900; font-style: italic;">// reconnect</span>
	selunhide<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	mergepoints<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #009900; font-style: italic;">// show selection again</span>
	reselect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	undogroupend<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
createMorphMap
<span style="color: #66cc66;">&#123;</span>
	selectBaseVmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	editbegin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	morphTarget=VMap<span style="color: #66cc66;">&#40;</span>VMMORPH,<span style="color: #3366CC;">&quot;_TempVMap&quot;</span>,<span style="color: #CC0000;">3</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>!morphTarget<span style="color: #66cc66;">&#41;</span> error<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Could not create the VMap&quot;</span><span style="color: #66cc66;">&#41;</span>;
	foreach<span style="color: #66cc66;">&#40;</span>p,points<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		values<span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #CC0000;">0</span>;
		values<span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #CC0000;">0</span>;
		values<span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #CC0000;">0</span>;
		morphTarget.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span>p,values<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	editend<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
process
<span style="color: #66cc66;">&#123;</span>
	createMorphMap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	undogroupbegin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #009900; font-style: italic;">//process each group</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #CC0000;">1</span>;i&amp;lt;=groupCnt;i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		selmode<span style="color: #66cc66;">&#40;</span>USER<span style="color: #66cc66;">&#41;</span>;
		selpolygon<span style="color: #66cc66;">&#40;</span>CLEAR<span style="color: #66cc66;">&#41;</span>;
		selpolygon<span style="color: #66cc66;">&#40;</span>SET,POLYID,groups<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		center = center<span style="color: #66cc66;">&#40;</span>boundingbox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		scale<span style="color: #66cc66;">&#40;</span>scaleAmount/<span style="color: #CC0000;">100</span>,center<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		rotate<span style="color: #66cc66;">&#40;</span>rotateXAmount,X,center<span style="color: #66cc66;">&#41;</span>;
		rotate<span style="color: #66cc66;">&#40;</span>rotateYAmount,Y,center<span style="color: #66cc66;">&#41;</span>;
		rotate<span style="color: #66cc66;">&#40;</span>rotateZAmount,Z,center<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	reselect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	undogroupend<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
reselect
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #009900; font-style: italic;">//reselect</span>
	selmode<span style="color: #66cc66;">&#40;</span>USER<span style="color: #66cc66;">&#41;</span>;
	selpolygon<span style="color: #66cc66;">&#40;</span>CLEAR<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #CC0000;">1</span>;i&amp;lt;=groupCnt;i++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		selpolygon<span style="color: #66cc66;">&#40;</span>SET,POLYID,groups<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
selectBaseVmap
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">new</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/08/stranded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The value of an idea</title>
		<link>http://illustrata.no/blog/2009/07/ip-valu/</link>
		<comments>http://illustrata.no/blog/2009/07/ip-valu/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 12:03:08 +0000</pubDate>
		<dc:creator>Petter Sundnes</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=337</guid>
		<description><![CDATA[&#60;rant mode="on"&#62;
What is the value of creative efforts, often described as intellectual property? And by value I don't talk about monetary measures alone.
Envision this: You have an idea with a small technical scope and you share it with others. Later on, the exact same idea is presented and implemented as somebody else's new and brilliant [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;rant mode="on"&gt;</p>
<p>What is the value of creative efforts, often described as intellectual property? And by value I don't talk about monetary measures alone.</p>
<p>Envision this: You have an idea with a small technical scope and you share it with others. Later on, the exact same idea is presented and implemented as somebody else's new and brilliant idea, just before your own implementation of it is completed... Would you consider this to be ok, as it's just your own fault you didn't implement it fast enough after revealing it?</p>
<p><span id="more-337"></span></p>
<p>If an idea in itself has no value, and is up for grabs for anyone as soon as it has been verbally or textually expressed, then I don't think I will spend a lot of time sharing ideas in any open fora, or even closed ones for that matter. Game concepts and game mechanics will be under a lid and seal until the game is finished.</p>
<p>If I spend 90% of my time working out the gameplay and 10% of my time goes to producing graphics and code, then the time spent on gameplay is where the value of the game reside. If you spend 90% of your time on the graphics, and someone traces it to create "their own" version of it, would you accept it as decent behavior? What about re-record the in-game sounds and changing the pitch to create their own version of it?</p>
<p>I am not saying people shouldn't make another tower defense game (we at illustrata just made one), or not make another physics stacking game, but there is a difference between making a similar game in a category of several variations, and recreating one specific game with only microscopic changes and reduced polish.</p>
<p>If you are a cloner from Kamino insisting on identically cloning other game concepts, at least have the decency to clone something that has already been released and not something you have come across being in development for the same target platform and audience you are aiming for.</p>
<p>Then again, this might only be me being overly sensitive to injustice and what i consider to be rude behavior.</p>
<p>&lt;/rant&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/07/ip-valu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slicker sitemap with SlickMap CSS</title>
		<link>http://illustrata.no/blog/2009/07/slicker-sitemap-with-slickmap-css/</link>
		<comments>http://illustrata.no/blog/2009/07/slicker-sitemap-with-slickmap-css/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 12:30:46 +0000</pubDate>
		<dc:creator>Ronny Vindenes</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=288</guid>
		<description><![CDATA[We have just upgraded our sitemap from a boring XML only version that was only really useful for search engines to a beautiful new version using SlickMap CSS, that is useful for living, loving people like you and I.


Implementing this new sitemap was a piece of cake since SlickMap required ULs with special DOM Ids [...]]]></description>
			<content:encoded><![CDATA[<p>We have just upgraded <a href="http://illustrata.no/sitemap">our sitemap</a> from a boring XML only version that was only really useful for search engines to a beautiful new version using <a href="http://astuteo.com/slickmap/">SlickMap CSS</a>, that is useful for living, loving people like you and I.</p>
<p><span id="more-288"></span></p>
<p><img class="alignnone size-medium wp-image-294" title="sitemap-screenshot" src="http://illustrata.no/blog/wp-content/uploads/2009/07/sitemap-screenshot.png" alt="sitemap-screenshot" /></p>
<p>Implementing this new sitemap was a piece of cake since SlickMap required ULs with special DOM Ids and our CMS already used <a href="http://bakery.cakephp.org/articles/view/menuhelper">MenuHelper</a> for site navigation.</p>
<p>To enable both XML and the new HTML sitemap we simply changed our '/sitemap.xml' route and added one line:</p>
<pre class="php">&nbsp;
Router::<span style="color: #006600;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/sitemap'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'admin'</span> =&gt; <span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #ff0000;">'controller'</span>=&gt;<span style="color: #ff0000;">'sitemaps'</span>,<span style="color: #ff0000;">'action'</span>=&gt;<span style="color: #ff0000;">'index'</span>,<span style="color: #ff0000;">'plugin'</span>=&gt;null<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
Router::<span style="color: #006600;">parseExtensions</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>To create a SlickMap compatible sitemap we used MenuHelper to create two menus with the DOM Ids "utilityNav" and "primaryNav" inside a DIV with the class "sitemap". The element of the "primaryNav" menu that contains our homepage had to be given the DOM Id "home" which was easily done using MenuHelper:</p>
<pre class="php">&nbsp;
<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'root'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'introducing illustrata'</span>, <span style="color: #ff0000;">'/'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #ff0000;">'Home'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>,<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'li'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span>=&gt;<span style="color: #ff0000;">'home'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>Full views/sitemaps/index.ctp :</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">layout</span> = <span style="color: #ff0000;">'blank'</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;sitemap&quot;</span>&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #0000ff;">$html</span>-&gt;<span style="color: #006600;">css</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'slickmap'</span>, <span style="color: #000000; font-weight: bold;">null</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'utility'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Blog'</span>, <span style="color: #ff0000;">'/blog'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #ff0000;">'Layers of information. illustrata team blog.'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'utility'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Sitemap'</span>, <span style="color: #ff0000;">'/sitemap'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">generate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'utility'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span> =&gt; <span style="color: #ff0000;">'utilityNav'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'root'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'introducing illustrata'</span>, <span style="color: #ff0000;">'/'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #ff0000;">'Home'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>,<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'li'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span>=&gt;<span style="color: #ff0000;">'home'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'SubMenu'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0000ff;">$node</span> = <span style="color: #0000ff;">$html</span>-&gt;<span style="color: #006600;">link</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'page_title'</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">'/'</span>.<span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'path'</span><span style="color: #66cc66;">&#93;</span>,
				<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'meta_description'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'SubPage'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$sub</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'sub'</span>.<span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'id'</span><span style="color: #66cc66;">&#93;</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$sub</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'page_title'</span><span style="color: #66cc66;">&#93;</span>,
					<span style="color: #ff0000;">'/pages/'</span>.<span style="color: #0000ff;">$sub</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'path'</span><span style="color: #66cc66;">&#93;</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #0000ff;">$sub</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'meta_description'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0000ff;">$node</span> .= <span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">generate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'sub'</span>.<span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'id'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">addElement</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'root'</span>,<span style="color: #0000ff;">$node</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'root'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'page_title'</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">'/'</span>.<span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'path'</span><span style="color: #66cc66;">&#93;</span>,
				<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span> =&gt; <span style="color: #0000ff;">$main</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Page'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'meta_description'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">generate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'root'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span> =&gt; <span style="color: #ff0000;">'primaryNav'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&nbsp;</pre>
<p>Thanks to <a href="http://ajaxian.com/">ajaxian</a> for <a href="http://ajaxian.com/archives/sitemaps-20-with-slickmap-css">bringing this excellent CSS sitemap solution</a> to our attention!</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/07/slicker-sitemap-with-slickmap-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakeFest 3 roundup</title>
		<link>http://illustrata.no/blog/2009/07/cakefest-3-roundup/</link>
		<comments>http://illustrata.no/blog/2009/07/cakefest-3-roundup/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 08:48:03 +0000</pubDate>
		<dc:creator>Alexander Morland</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[CakeFest]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=275</guid>
		<description><![CDATA[So the world is back to normal, sleep has been had, and now we are all (those present as well as those not), wondering what happened at #CakeFest 3.

First and foremost, there was played a lot of ForkMaster!
We also found a great place called Zaim Lounge Default
It had tubes, juice, beer and food. It also [...]]]></description>
			<content:encoded><![CDATA[<p>So the world is back to normal, sleep has been had, and now we are all (those present as well as those not), wondering what happened at #CakeFest 3.</p>
<p><span id="more-275"></span></p>
<h2>First and foremost, there was played a lot of <a href="http://forkmaster.com/">ForkMaster</a>!</h2>
<div id="attachment_276" class="wp-caption alignnone" style="width: 208px"><a href="http://illustrata.no/blog/wp-content/uploads/2009/07/forkmaster.jpg"><img class="size-full wp-image-276 " title="ForkMaster" src="http://illustrata.no/blog/wp-content/uploads/2009/07/forkmaster.jpg" alt="Gwoo and Felix playing ForkMaster" width="198" height="256" /></a><p class="wp-caption-text">Gwoo and Felix playing ForkMaster</p></div>
<h2>We also found a great place called <span style="text-decoration: line-through;">Zaim Lounge</span> Default</h2>
<p>It had tubes, juice, beer and food. It also did have a bad case of extremely rude waitresses, but four of five isnt bad.</p>
<div id="attachment_281" class="wp-caption alignnone" style="width: 522px"><a href="http://illustrata.no/blog/wp-content/uploads/2009/07/default.jpg"><img class="size-full wp-image-281 " title="default" src="http://illustrata.no/blog/wp-content/uploads/2009/07/default.jpg" alt="Default, the place to be" width="512" height="305" /></a><p class="wp-caption-text">Default, the place to be</p></div>
<div id="attachment_282" class="wp-caption alignnone" style="width: 522px"><a href="http://illustrata.no/blog/wp-content/uploads/2009/07/zaimlounge.jpg"><img class="size-full wp-image-282  " title="zaimlounge" src="http://illustrata.no/blog/wp-content/uploads/2009/07/zaimlounge.jpg" alt="Inside the default" width="512" height="298" /></a><p class="wp-caption-text">Andreas, Eskil, Dirk, Yando, Graham, Daniel, Garrett, Felix, Gary, Neil, Mariano, Cindy, Marius, Nate (and several others) inside Default</p></div>
<p>Thanks goes from both us at CakeFest and to the lucky restaurant to the kind person that supplied the unsecured wifi called "default".</p>
<p>We went to an awesome bar/club/restaurant called either Diamond Lounge, White Trash or Both. Images from this place has been cencored, but if you know where to look, they are on a tube somewhere <img src='http://illustrata.no/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>It wasnt all giggles though, some serious talks where held</h2>
<div id="attachment_284" class="wp-caption alignnone" style="width: 522px"><a href="http://illustrata.no/blog/wp-content/uploads/2009/07/talks.jpg"><img class="size-full wp-image-284" title="CakeFest presentations" src="http://illustrata.no/blog/wp-content/uploads/2009/07/talks.jpg" alt="Gwoo, Neil, Felix and Joël" width="512" height="159" /></a><p class="wp-caption-text">Gwoo, Neil, Felix and Joël</p></div>
<p>If you are wondering what they talked about, the videos are promised to be published soon, but appearently there has been some technical difficulties. Until then, Graham Weldon was better at taking notes than me:</p>
<ul>
<li><a title="Cakedc blog by Graham Weldon" href="http://cakedc.com/developer/graham_weldon/2009/07/13/garret-woodworth-cakephp-then-now-and-tomorrow-opening-keynote">Gwoo's opening keynote</a></li>
<li><a title="Cakedc blog by Graham Weldon" href="http://cakedc.com/developer/graham_weldon/2009/07/13/joel-perras-demystifying-webservices-in-cakephp">Jperras demystifying webservices</a></li>
<li><a title="CakeDC blog by Graham Weldon" href="http://cakedc.com/developer/graham_weldon/2009/07/13/felix-geisendorfer-recipies-for-successful-cakephp-projects">Felix gives you a recipty for success </a></li>
<li><a title="CakeDC blog by Graham Weldon" href="http://cakedc.com/developer/graham_weldon/2009/07/14/neil-crookes-bake-master-class">Neil Crookes gave a master class on Baking</a></li>
</ul>
<p>Other wrap ups:</p>
<ul>
<li><a href="http://kevin.vanzonneveld.net/techblog/article/notes_on_cakefest_3/">kevin.vanzonneveld.net</a></li>
<li><a title="Mindmap" href="http://www.mindmeister.com/24339080">A mind map of CakeFest by @timk</a>_</li>
</ul>
<p>And you can already download slides and code snippets from</p>
<ul>
<li><a title="CakeFest Downloads" href="http://cakephp.org/downloads/CakeFest/CakeFest%203%20-%20Berlin%202009">cakephp.org/downloads</a></li>
</ul>
<p>Another way of getting a little insight into our crazy week, is taking a look at</p>
<ul>
<li><a title="Twitter talk" href="http://twitter.com/#search?q=%23cakefest">the twitter hashtag #CakeFest</a></li>
</ul>
<h2>About my own presentation..</h2>
<p>I will do a writeup on it on this blog in the next few days.</p>
<p>I hope to see you at the next CakeFest, I know I won't miss it for all the Club-Mate in Germany</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/07/cakefest-3-roundup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The tools are here!</title>
		<link>http://illustrata.no/blog/2009/06/the-tools-are-here/</link>
		<comments>http://illustrata.no/blog/2009/06/the-tools-are-here/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 12:56:45 +0000</pubDate>
		<dc:creator>Ronny Vindenes</dc:creator>
				<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[visualisations]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=245</guid>
		<description><![CDATA[Earlier this year, Robert Kosara over at Eager Eyes, asked "where are the Visualization Tools?" Increasingly the answer is becoming; right here on the web!

Robert mentions two of the really great hosted social visualization tools: Many Eyes and Swivel, but here's a few he left out:

Verifiable
Track-n-Graph
iCharts
Widgenie
Timetric
Trendrr

Of more interest to me personally are the great toolkits [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year, Robert Kosara over at <a href="http://eagereyes.org/">Eager Eyes</a>, asked "<a href="http://eagereyes.org/blog/2009/where-are-the-visualization-tools.html">where are the Visualization Tools</a>?" Increasingly the answer is becoming; right here on the web!<br />
<span id="more-245"></span><br />
Robert mentions two of the really great hosted social visualization tools: <a href="http://services.alphaworks.ibm.com/manyeyes/">Many Eyes</a> and <a href="http://www.swivel.com/">Swivel</a>, but here's a few he left out:</p>
<ul>
<li><a href="http://verifiable.com/">Verifiable</a></li>
<li><a href="http://www.trackngraph.com/">Track-n-Graph</a></li>
<li><a href="http://ichartsbusiness.com/">iCharts</a></li>
<li><a href="http://widgenie.com/">Widgenie</a></li>
<li><a href="http://timetric.com/">Timetric</a></li>
<li><a href="http://www.trendrr.com/">Trendrr</a></li>
</ul>
<p>Of more interest to me personally are the great toolkits emerging for interactive visualization on the web. Robert again mentions <a href="http://flare.prefuse.org/">flare (and prefuse)</a>, but I'd like to mention a couple of others:</p>
<ul>
<li><a href="http://vis.stanford.edu/protovis/">Protovis</a> is a visualization toolkit for JavaScript using SVG.</li>
<li><a href="http://thejit.org/">The JavaScript InfoVis Toolkit</a> provides tools for creating Interactive Data Visualizations for the Web.</li>
<li><a href="http://processingjs.org/">Processing.js</a> is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java applets.</li>
</ul>
<p>These are all great toolkits that showcase what is possible in the browser, and it is up to us, the developers, to make great tools from them that delivers added value for the business user, as argued by <a href="http://diuf.unifr.ch/people/bertinie/visuale/2009/06/action_the_missing_word_of_the.html">Enrico Bertini</a> and <a href="http://chrisnf.blogspot.com/2009/06/response-to-sensemaking-ok-but-action.html">Christopher Collins</a> recently.</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/06/the-tools-are-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unity embed helper for CakePHP</title>
		<link>http://illustrata.no/blog/2009/06/unity-embed-helper-for-cakephp/</link>
		<comments>http://illustrata.no/blog/2009/06/unity-embed-helper-for-cakephp/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 10:42:57 +0000</pubDate>
		<dc:creator>Alexander Morland</dc:creator>
				<category><![CDATA[Realtime 3D]]></category>
		<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=200</guid>
		<description><![CDATA[Helpers. They are really helpful. After Behaviors, they are probably my favourite CakePHP asset to make. As we work with both CakePHP and Unity3d, we expect them to meet a lot. Embedding rich media in an HTML page is not always as easy as it sounds, therefore it's great that people take the time to [...]]]></description>
			<content:encoded><![CDATA[<p>Helpers. They are really helpful. After Behaviors, they are probably my favourite <a href="http://cakephp.org">CakePHP</a> asset to make. As we work with both CakePHP and <a href="http://unity3d.com">Unity3d</a>, we expect them to meet a lot. Embedding <a href="http://en.wikipedia.org/wiki/Interactive_media">rich media</a> in an HTML page is not always as easy as it sounds, therefore it's great that people take the time to build such assets as <a href="http://code.google.com/p/swfobject/">SWFObject</a> and <a href="http://www.unifycommunity.com/wiki/index.php?title=UnityObject">UnityObject</a>. Included below is a Helper that takes advantage of the UnityObject javascript class and easily allows you to embed Unity files in your CakePHP views.<span id="more-200"></span></p>
<p>This Helper is largely modelled on <a href="http://bakery.cakephp.org/articles/view/flashhelper-a-wrapper-for-the-swfobject-js-class">FlashHelper</a>, that in a similar fashion takes advantage of the swfobject mentioned above. </p>
<p>To use this helper, you need the code below and the unityobject.js that you can grab at <a href="http://www.unifycommunity.com/wiki/index.php?title=UnityObject">unifycommunity.com</a> or as part of the <em>post process build package</em> from <a href="http://unity3d.com/support/resources/assets/postprocessbuildplayer">unity3d.com</a>. Then simply put your .unity3d files in /app/webroot/unity and use it like this:</p>
<pre class="php"><span style="color: #0000ff;">$unity</span>-&gt;<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$unity</span>-&gt;<span style="color: #006600;">render</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'game'</span>,<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'width'</span>=&gt;<span style="color: #ff0000;">'100%'</span>,<span style="color: #ff0000;">'height'</span>=&gt;<span style="color: #ff0000;">'100%'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>  or</p>
<pre class="php"><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$unity</span>-&gt;<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'width'</span>=&gt;<span style="color: #ff0000;">'1000px'</span>,<span style="color: #ff0000;">'height'</span>=&gt;<span style="color: #ff0000;">'600px'</span>,<span style="color: #ff0000;">'domId'</span>=&gt;<span style="color: #ff0000;">'unityDiv'</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$html</span>-&gt;<span style="color: #006600;">div</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>,<span style="color: #000000; font-weight: bold;">null</span>,<a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id'</span>=&gt;<span style="color: #ff0000;">'unityDiv'</span>, <span style="color: #ff0000;">'style'</span>=<span style="color: #ff0000;">'border: 2px solid black;'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$unity</span>-&gt;<span style="color: #006600;">render</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'game.unity3d'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p><a href='http://illustrata.no/blog/wp-content/uploads/2009/08/unityphp131.txt'>Download plain text</a> (Updated 12th august 2009)</p>
<pre class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* A helper for embedding unity into your site using javascript.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* This helper is a wrapper for the javascript UnityObject vendor</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* Install</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* - Save this file to /app/views/helpers/unity.php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* - Download the unityobject.js file and</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* - place the js file in /app/webroot/js/unityobject.js</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* - Add 'Unity' to helpers array either in AppController or just relevant controller</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* Usage example 1:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   $unity-&gt;init();</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;render('game',array('width'=&gt;'100%','height'=&gt;'100%'));</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* Usage example 2:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $javascript-&gt;link('unityobject');</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;render('game',array('width'=&gt;'400px','height'=&gt;'400px'));</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* Usage example 3:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;init(array('width'=&gt;'1000px','height'=&gt;'600px','domId'=&gt;'unityDiv'),true);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $html-&gt;div(null,null,array('id'=&gt;'unityDiv', 'style'='border: 2px solid black;'));</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;render('game.unity3d');</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* Usage example 4:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   $unity-&gt;init(array('width'=&gt;'100%','height'=&gt;'100%'));</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;render('game');</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*   echo $unity-&gt;render('control', array('domId'=&gt;'controllerDiv'));</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @link http://www.unifycommunity.com/wiki/index.php?title=UnityObject</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @copyright illustrata.no</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @license MIT</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @author Ronny Vindenes</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @author Alexander Morland aka alkemann</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @version 1.3.1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @modified 12 aug. 2009 by alkemann</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*/</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span> UnityHelper <span style="color: #000000; font-weight: bold;">extends</span> AppHelper <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">// other helpers used within this helper</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #0000ff;">$helpers</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Html'</span>,<span style="color: #ff0000;">'Javascript'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * Location of unity3d files relative to webroot.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * Default 'unity3d' gives /app/webroot/unity/;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @var string</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #0000ff;">$unity_folder</span> = <span style="color: #ff0000;">'unity'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * Default options for the render method</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @var array</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @access private</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #0000ff;">$options</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'width'</span>=&gt;<span style="color: #cc66cc;">640</span>,<span style="color: #ff0000;">'height'</span>=&gt;<span style="color: #cc66cc;">480</span>,<span style="color: #ff0000;">'param'</span>=&gt;array<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * Optional initializing for setting default parameters, includes theunity library.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  *</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @example echo $unity-&gt;init(array(),true);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @example $unity-&gt;init(array('width'=&gt;200,'height'=&gt;100);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @example $unity-&gt;init();</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @return mixed String if $inline = true, true/false depending on success of addint to view</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$options</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #0000ff;">$inline</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">options</span> = am<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">options</span>, <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$inline</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Javascript</span>-&gt;<span style="color: #006600;">link</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'unityobject'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$view</span> = ClassRegistry::<span style="color: #006600;">getObject</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'view'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/is_object"><span style="color: #000066;">is_object</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$view</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #0000ff;">$view</span>-&gt;<span style="color: #006600;">addScript</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Javascript</span>-&gt;<span style="color: #006600;">link</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'unityobject'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * Returns the scripts and noscripts html for embedding a unity file</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  *</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @param string $unityFile Name of unity file to render (optional extension)</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @param array $options</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  * @return string HTML to be echoed</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;  */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> render<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$unityFile</span>, <span style="color: #0000ff;">$options</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$options</span> = am <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">options</span>, <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'domId'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'domId'</span><span style="color: #66cc66;">&#93;</span> = <a href="http://www.php.net/uniqid"><span style="color: #000066;">uniqid</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'unity'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$objectDomId</span> = <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'domId'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'Object'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$embedDomId</span> = <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'domId'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'Embed'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$unityFile</span>,<span style="color: #cc66cc;">-8</span><span style="color: #66cc66;">&#41;</span> !== <span style="color: #ff0000;">'.unity3d'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$unityFile</span> .= <span style="color: #ff0000;">'.unity3d'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$html</span> = <span style="color: #ff0000;">''</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$unityLocation</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">webroot</span>.<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">unity_folder</span>.<span style="color: #ff0000;">'/'</span>.<span style="color: #0000ff;">$unityFile</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$unityParams</span> = <span style="color: #ff0000;">''</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$noscriptParams</span> = <span style="color: #ff0000;">''</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'param'</span><span style="color: #66cc66;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$key</span> =&gt; <span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$unityParams</span> .= <span style="color: #ff0000;">'tUnityObject.addParam(&quot;'</span>.<span style="color: #0000ff;">$key</span>.<span style="color: #ff0000;">'&quot;,&quot;'</span>.<span style="color: #0000ff;">$value</span>.<span style="color: #ff0000;">'&quot;);'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$noscriptParams</span> .= <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'param'</span>, <span style="color: #000000; font-weight: bold;">null</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'name'</span>=&gt;<span style="color: #0000ff;">$key</span>, <span style="color: #ff0000;">'value'</span>=&gt;<span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$html</span> .= <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Javascript</span>-&gt;<span style="color: #006600;">codeBlock</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'var tUnityObject = new UnityObject(&quot;'</span>.<span style="color: #0000ff;">$unityLocation</span>.<span style="color: #ff0000;">'&quot;,&quot;'</span>.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'domId'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'&quot;,&quot;'</span>.<span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'width'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'&quot;,&quot;'</span>.<span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'height'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'&quot;);'</span>.<span style="color: #0000ff;">$unityParams</span>.<span style="color: #ff0000;">'tUnityObject.write();'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #0000ff;">$html</span> .= <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'noscript'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'object'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'param'</span>,<span style="color: #000000; font-weight: bold;">null</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'name'</span> =&gt; <span style="color: #ff0000;">'src'</span>,<span style="color: #ff0000;">'value'</span> =&gt; <span style="color: #0000ff;">$unityLocation</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        .<span style="color: #0000ff;">$noscriptParams</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        .<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'embed'</span>,<span style="color: #000000; font-weight: bold;">null</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'id'</span> =&gt; <span style="color: #0000ff;">$embedDomId</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'src'</span> =&gt; <span style="color: #0000ff;">$unityLocation</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'width'</span> =&gt; <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'width'</span><span style="color: #66cc66;">&#93;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'height'</span> =&gt; <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'height'</span><span style="color: #66cc66;">&#93;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'type'</span> =&gt; <span style="color: #ff0000;">'application/vnd.unity'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #ff0000;">'pluginspage'</span> =&gt; <span style="color: #ff0000;">'http://www.unity3d.com/unity-web-player-2.x'</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        .<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'noembed'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'This content requires the Unity Web Player, please click the button</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">            below to visit the Unity Web Player download page.'</span>.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'br'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">tag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'br'</span><span style="color: #66cc66;">&#41;</span>.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">link</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">Html</span>-&gt;<span style="color: #006600;">image</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'http://webplayer.unity3d.com/installation/getunity.png'</span><span style="color: #66cc66;">&#41;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'http://www.unity3d.com/unity-web-player-1.x'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'id'</span> =&gt; <span style="color: #0000ff;">$objectDomId</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'classid'</span> =&gt; <span style="color: #ff0000;">'clsid:444785F1-DE89-4295-863A-D46C3A781394'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'width'</span> =&gt; <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'width'</span><span style="color: #66cc66;">&#93;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'height'</span> =&gt; <span style="color: #0000ff;">$options</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'height'</span><span style="color: #66cc66;">&#93;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">            <span style="color: #ff0000;">'codebase'</span> =&gt; <span style="color: #ff0000;">'http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.cab#version=2,0,0,0'</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">          <span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$html</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li></ol></pre>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/06/unity-embed-helper-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Talking about CakeFest, and talking there</title>
		<link>http://illustrata.no/blog/2009/05/cakefest-talk-announcement/</link>
		<comments>http://illustrata.no/blog/2009/05/cakefest-talk-announcement/#comments</comments>
		<pubDate>Fri, 22 May 2009 09:53:33 +0000</pubDate>
		<dc:creator>Alexander Morland</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=106</guid>
		<description><![CDATA[Alexander is holding a talk at the 2009 CakeFest in Berlin. Read his announcement here.]]></description>
			<content:encoded><![CDATA[<p>CakeFest 2009 will be held in Berlin, and this year I am attending. In fact I also got accepted to hold a talk, which of course makes me a little nervous, but I am looking forward to it.<span id="more-106"></span></p>
<p>My talk will be late on Sunday. Hopefully three and a half day has not worn people completely down. My talk will not be especially technical in any case. The talk's title is "Test & API-driven Behavior Development" and I will evangelize unit testing and proper api design. Look at the <a href="http://cakefest.org/talks" title="CakeFest 2009 Schedule">schedule</a> for a longer description.</p>
<p>I hope to see you there.<br />
<a href="http://cakefest.org"><img src="http://illustrata.no/blog/wp-content/uploads/2009/05/cakefest_berlin_gray_large.png" alt="CakeFest Berlin" title="CakeFest Berlin" width="222" height="91" class="aligncenter size-full wp-image-157" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/05/cakefest-talk-announcement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classic programming papers</title>
		<link>http://illustrata.no/blog/2009/05/classic-programming-papers/</link>
		<comments>http://illustrata.no/blog/2009/05/classic-programming-papers/#comments</comments>
		<pubDate>Mon, 18 May 2009 11:27:41 +0000</pubDate>
		<dc:creator>Ronny Vindenes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://illustrata.no/blog/?p=176</guid>
		<description><![CDATA[One of the unfortunate  aspects of how young and focused on the cutting edge the field of programming is, is that we all too easily forget about the classics and spend all our time on the latest and greatest. Michael Feathers has put together a list of 10 Papers Every Programmer Should Read (At Least [...]]]></description>
			<content:encoded><![CDATA[<p>One of the unfortunate  aspects of how young and focused on the cutting edge the field of programming is, is that we all too easily forget about the classics and spend all our time on the latest and greatest. Michael Feathers has put together a list of <a title="10 Papers Every Programmer Should Read (At Least Twice)" href="http://blog.objectmentor.com/articles/2009/02/26/10-papers-every-programmer-should-read-at-least-twice">10 Papers Every Programmer Should Read (At Least Twice)</a>, withsome real classic gems on programming.</p>
<p>I'd like to add the paper <a href="http://keithp.com/~keithp/porterduff/">Compositing Digital Images</a> by T.Porter &amp; T.Duff, that completely revitalized <a title="X.Org" href="http://www.x.org/wiki/">X.Org</a> and graphics on *NIX through <a title="XRender Extension" href="http://cgit.freedesktop.org/xorg/proto/renderproto/plain/renderproto.txt">XRender</a> (indirectly via <a title="Plan 9" href="http://plan9.bell-labs.com/plan9/">Plan 9</a>) and <a title="Cairo" href="http://cairographics.org/">Cairo</a> some 20+ years after it was published, to the list of essential reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/05/classic-programming-papers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choosing a PHP framework</title>
		<link>http://illustrata.no/blog/2009/05/choosing-a-php-framework/</link>
		<comments>http://illustrata.no/blog/2009/05/choosing-a-php-framework/#comments</comments>
		<pubDate>Sat, 16 May 2009 07:00:11 +0000</pubDate>
		<dc:creator>Ronny Vindenes</dc:creator>
				<category><![CDATA[Web technologies]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://illustrata.no/web/blog/?p=45</guid>
		<description><![CDATA[Back in 2007 I was tasked with evaluating php frameworks and making a recommendation for which framework to become the new standard for building web apps at a previous employer.
The major contenders at the time were: CakePHP, CodeIgniter, Symfony, Zend, and (re-)writing our own in house framework.
Before looking closer at any of the possible solutions, [...]]]></description>
			<content:encoded><![CDATA[<p>Back in 2007 I was tasked with evaluating php frameworks and making a recommendation for which framework to become the new standard for building web apps at a previous employer.</p>
<p>The major contenders at the time were: <a title="CakePHP" href="http://cakephp.org/">CakePHP</a>, <a title="CodeIgniter" href="http://codeigniter.com/">CodeIgniter</a>, <a title="symfony" href="http://www.symfony-project.org/">Symfony</a>, <a title="Zend Framwork" href="http://framework.zend.com/">Zend</a>, and (re-)writing our own in house framework.</p>
<p>Before looking closer at any of the possible solutions, I wrote a set of requirements based on what I thought was most important for a growing company with programmers of very different skill levels and experience.<br />
<span id="more-45"></span></p>
<h2>Requirements:</h2>
<h3>Goals:</h3>
<ul>
<li> Reduce chore of writing boilerplate code</li>
<li> Enable us to spend more time on architecture, user workflow/interaction design and business logic</li>
<li> Real prototyping - as in prototypes you throw away when you are ready to build the real product</li>
<li> Let every developer regardless of skill level do interesting work</li>
<li> Make it easy to create reusable code</li>
<li>Reduce developer burn out by having a common standard so developers could switch between different projects easily</li>
</ul>
<h3>Users:</h3>
<p>The developers at the company had very diverse backgrounds, from software engineering to bedroom web hacking. Up until this point most of the projects had been done either by a single developer or as a team of two, and management had expressed interest in increasing team sizes for projects and implement a "revolving" team in order to reduce burn out.</p>
<h3>Application:</h3>
<p>The main application of the framework was for developing a large integrated web app based on smaller modular apps. It would also be used for developing small one-off custom apps and sites.</p>
<h3>Environment:</h3>
<p>The production environment was a Debian based LAMP setup, partially maintained by the hosting company.<br />
The development environment used was based on XAMPP with ZendStudio as the IDE and Subversion for SCM.</p>
<h2>Our own custom framework</h2>
<p>We had a simple PHP5 based framework, written by a single developer with little time for testing and "designed" with little regard for actual use by others. It mixed and matched business logic with presentation and was as far  from DRY as you could get.</p>
<p>Pros:</p>
<ul>
<li>Can be tailored exactly to our needs</li>
</ul>
<p>Cons:</p>
<ul>
<li> No existing documentation</li>
<li> Full burden of maintenance</li>
<li> Must spend significant amount of time on developing the framework before we can really focus on the apps</li>
<li> No real in-house expertise in developing scalable php frameworks</li>
</ul>
<h2>CakePHP</h2>
<p>CakePHP is a wholly Ruby on Rails inspired framework, designed around agile principles like DRY and Convention Over Configuration.</p>
<p>Pros:</p>
<ul>
<li>Solid MVC architecture</li>
<li>Sound app foundation</li>
<li>Bake (Automatic code generation)</li>
</ul>
<p>Cons:</p>
<ul>
<li>Poor documentation at the time.<br />
(The documentation after the 1.2 release has improved so much it is now among the very best out there)</li>
<li>Most example code was in the CakePHP 1.1 style at the time.<br />
(The release of the CookBook and publishing of 1.2 based articles on The Bakery has changed that completely)</li>
<li>Rigid structure</li>
<li>Limited utility code at the time<br />
(The current CakePHP 1.2 core behaviors and utility libraries cover most of the things we were missing)</li>
</ul>
<h2>CodeIgniter</h2>
<p>CodeIgniter is small and lightweight, bordering more on the side of library then framework. It aims to provide fast functions with as little configuration and overhead as possible and to generally stay as much out of your way as possible.</p>
<p>Pros:</p>
<ul>
<li>Light weight and fast</li>
<li>Easy to learn for php spagetti coders</li>
<li>Very flexible</li>
<li>Optional MVC</li>
</ul>
<p>Cons:</p>
<ul>
<li>Very little utility code (at the time)</li>
</ul>
<h2>Symfony</h2>
<p>Originating as a fork of Mojavi3, Symfony has taken inspiration form Ruby on Rails for many features and integrated other existing PHP open source projects for some of it's features. It has a clean design and follows agile principles like DRY and KISS.</p>
<p>Pros:</p>
<ul>
<li>Solid MVC</li>
<li>Decent documentation</li>
<li>Good range of built-in utility code</li>
</ul>
<p>Cons:</p>
<ul>
<li>Unsual coding style in views (&lt;?php ?&gt; for every line or php statement)</li>
<li>Very rigid app stucture (at the time)</li>
</ul>
<h2>Zend Framework</h2>
<p>Zend framework is an enterprise oriented framework designed "with simplicity in mind.  To provide     a lightweight, loosely-coupled component library simplified to provide 4/5s of     the functionality everyone needs and that lets you customize the other 20% to     meet your specific business needs."</p>
<p>Pros:</p>
<ul>
<li>Documentation (sometimes a little too good - e.g. documented features had not yet been implemented)</li>
<li>Lots of esoteric/enterprisey utility code</li>
<li>Very flexible</li>
<li>Highly visible and well known commercially</li>
<li>Optional MVC</li>
</ul>
<p>Cons:</p>
<ul>
<li>Feels and acts more like a library of functions than an integrated framework</li>
<li>No real app foundation - you get to decide what constitutes an app</li>
<li>No help with boilerplate code</li>
</ul>
<h2>Conclusion:</h2>
<p>As soon as I had written a small test app in CakePHP and read the code for some of the larger open source apps based on it, it became clear to me that CakePHP would best meet the most critical of our needs. In particular its "convention over configuration" philosophy and console baking functionality would help us make our programs conform to a common standard regardless of individual developer preferences and habits.</p>
<p>Before adopting CakePHP as our framework, the management wanted input from the rest of the developers on which framework they thought was best: CakePHP or Zend Framework.</p>
<p>The result was 5 votes for Zend vs 2 votes for CakePHP. After some discussion, taking into account the arguments for and against the two options, the decision was made - CakePHP would become our standard.</p>
<p>After a fairly long in house training period, including feedback and assistance from the core CakePHP team, we managed to develop some nice apps and publish these articles on the Bakery:</p>
<ul>
<li><a href="http://bakery.cakephp.org/articles/view/flashcharthelper-version-3">FlashChartHelper - version 3</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/revision-behavior-revision-control-made-easy">Revision Behavior - Revision control made easy</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/menuhelper">MenuHelper</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/timeline-helper">Timeline helper</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/dummy-data-plugin-fill-your-app-with-random-data-that-makes-sense">Dummy Data plugin - fill your app with random data that makes sense</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/multirecord-helper-behavior">Multirecord helper/behavior</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/chartable-behavior">Chartable Behavior</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/orderedbehavior-2-1">OrderedBehavior (2.1)</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/logablebehavior">LogableBehavior</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/flashhelper-a-wrapper-for-the-swfobject-js-class">FlashHelper  -  a wrapper for the SwfObject js class</a></li>
</ul>
<p>Since then most of the frameworks have matured and improved and some new have arrived on the scene, but I still feel CakePHP was the right choice in our situation. For those who are looking to try CakePHP, I would like to give this advice: Leave your preconceptions and old ways behind and approach CakePHP with an open mind. The initial learning curve can be steep, but once you internalize the conventions of CakePHP, you may find yourself wondering how you ever got anything done before!</p>
]]></content:encoded>
			<wfw:commentRss>http://illustrata.no/blog/2009/05/choosing-a-php-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
