<?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>The Sea of Ideas &#187; transformation</title>
	<atom:link href="http://paulbakaus.com/tag/transformation/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulbakaus.com</link>
	<description>Capturing the thoughts of Paul Bakaus</description>
	<lastBuildDate>Sat, 19 May 2012 08:36:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>3D CSS Transforms on the iPhone</title>
		<link>http://paulbakaus.com/2008/08/27/3d-css-transforms-on-the-iphone/</link>
		<comments>http://paulbakaus.com/2008/08/27/3d-css-transforms-on-the-iphone/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 15:56:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css transforms]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[transformation]]></category>

		<guid isPermaLink="false">http://paulbakaus.com/?p=15</guid>
		<description><![CDATA[So I wasn&#8217;t content with the things I&#8217;ve tried doing in Safari, and recently began digging through the documentation of the iPhone SDK and the actual CSS Transforms spec. I was a bit skeptical when I first read about all the cool functions that work in Webkit iPhone, but nowhere else, because there was little [...]]]></description>
			<content:encoded><![CDATA[<p>So I wasn&#8217;t content with the things I&#8217;ve tried doing in Safari, and recently began digging through the documentation of the iPhone SDK and the actual <a href="http://webkit.org/specs/CSSVisualEffects/CSSTransforms.html">CSS Transforms spec</a>.</p>
<p>I was a bit skeptical when I first read about all the cool functions that work in Webkit iPhone, but nowhere else, because there was<a href="http://developer.apple.com/webapps/docs_iphone/documentation/iPhone/Conceptual/SafariCSSTransformGuide/Introduction/chapter_2_section_1.html"> little documentation</a>, and literally nothing done by other developers, no demos, no tests. I thought, surely, some students with too much free time must have jumped on that immediately?</p>
<p>Well, I decided to give it a go, and started Dashcode, created a new web application and hacked in some CSS Transforms into my elements. One very important discovery I&#8217;ve made is that <strong>only 2D CSS Transforms are directly visible on the WYSIWYG canvas in Dashcode</strong>. So when you think the actual 3D functions won&#8217;t work, run the iPhone simulator.</p>
<p><strong>The iPhone simulator is actually capable of using the exact same API than the iPhone. This is awesome and a bit funny, since I always thought the 3D functions don&#8217;t work in the browser version of Safari yet, because they need to be bundled tightly to the hardware, but apparently, there must be a different reason.</p>
<p>The function that sounded the most awesome, I thought, was the -webkit-perspective function (&#8220;This matrix maps a <em>viewing cube</em> onto a pyramid whose base is infinitely far away from the viewer and whose peak represents the viewer&#8217;s position&#8221;, that just HAS to be awesome). The frustration came directly afterwards: The function did nothing.</p>
<p>At least, that is what I thought at first &#8211; the function does indeed nothing visually, if you don&#8217;t use any other transform functions. I believe this fact is nowhere written in the SDK docs, and it was hard to find out.</p>
<p>Here comes the cool stuff: <strong>The perspective function seems to define how the other primitive functions behave.</strong></p>
<p>Let&#8217;s have a look at a practical example: Take a look at the following three functions:</p>
<ul>
<li><em>rotateX</em> &#8211; Rotates the element on the X axis.</li>
<li><em>rotateY</em> &#8211; Rotates the element on the Y axis.</li>
<li><em>rotateZ</em> &#8211; Rotates the element on the Z axis (By default, same as &#8220;rotate&#8221;)</li>
</ul>
<p>Try these out &#8211; all three will give you flat, 2d animations, although they are, in fact, functions that use a 3D matrix. However, now <strong>change the -webkit-perspective property to 200, and try again</strong>. Now, you established virtual depth, and all three functions will give you incredible results.</p>
<p>To demonstrate it, here&#8217;s a demo that you have to either look at on your iPhone or in the iPhone Simulator:</p>
<p><a href="http://paulbakaus.com/lab/css/flip">  <img class="alignnone size-full wp-image-16" title="bild-2" src="http://paulbakaus.com/wp-content/uploads/2008/08/bild-2.png" alt="" width="414" height="770" /></a></p>
<p>As an extra flavor, this demo also uses the <a href="http://developer.apple.com/webapps/docs_iphone/documentation/iPhone/Conceptual/SafariCSSTransformGuide/TransformProperties/chapter_5_section_6.html#//apple_ref/doc/uid/TP40007134-CH6-SW7">-webkit-backface-visibility</a> property set to &#8216;<em>hidden</em>&#8216;, to hide the actual back side of the first element when the second element comes in (otherwise, you&#8217;d see the front flipped). Also, it&#8217;s lightning fast, even on the iPhone, since it uses Webkit&#8217;s native CSS Transitions, and triggers them via setting the webkitTransform css property.</p>
<p>Expect more to come soon!</p>
<p>Cheers,<br />
Paul</p>
]]></content:encoded>
			<wfw:commentRss>http://paulbakaus.com/2008/08/27/3d-css-transforms-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Bringing CSS Transforms to Internet Explorer</title>
		<link>http://paulbakaus.com/2008/08/16/bringing-css-transform-to-internet-explorer/</link>
		<comments>http://paulbakaus.com/2008/08/16/bringing-css-transform-to-internet-explorer/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 11:49:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[css transforms]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[transformation]]></category>

		<guid isPermaLink="false">http://paulbakaus.com/?p=11</guid>
		<description><![CDATA[Extending the teaser So I hope I got you a bit excited with my little teaser, and yes, the second tab was opened on purpose to give you a hint. Indeed, I was talking about CSS transforms, and yes, I was talking about somehow successfully porting them to Firefox. I won&#8217;t go into details of [...]]]></description>
			<content:encoded><![CDATA[<h2>Extending the teaser</h2>
<p>So I hope I got you a bit excited with my little teaser, and yes, the second tab was opened on purpose to give you a hint. Indeed, I was talking about <a href="http://webkit.org/specs/CSSVisualEffects/CSSTransforms.html">CSS transforms</a>, and yes, I was talking about somehow successfully porting them to Firefox.</p>
<p>I won&#8217;t go into details of my implemention of it yet, but I can assure you it isn&#8217;t using any additional plugins. Anyway, during my CSS transformation research for possible other browser implementations, I came up with something entirely different, and it was completely unexpected to me. As it turns out, Internet Explorer already <a href="http://msdn.microsoft.com/en-us/library/ms533014(VS.85).aspx">supports CSS transformations</a> in some way for years!</p>
<p>I was telling myself that surely, this wouldn&#8217;t actually work, since the Matrix Filter would allow you to actually rotate, scale and do whatever you want with elements, in IE, natively. And then, someone must have figured before me, years ago. But it turns out that the Matrix filter isn&#8217;t that popular at all (yes, these are filters that we hated so much back in time, and I feel totally stupid doing so now), so I decided to give it a go and played around with it.</p>
<h2>Transformie!</h2>
<p>What I came up with, is my new jQuery plugin (though fairly easy to convert to other libs) &#8220;<strong>Transformie</strong>&#8220;, a javascript plugin that comes in less than 5k that you embed into web pages and that maps the native IE Filter API to CSS transitions as proposed by Webkit.</p>
<p><a href="http://paulbakaus.com/lab/js/transformie"><img class="alignnone size-full wp-image-12" title="bild-5" src="http://paulbakaus.com/wp-content/uploads/2008/08/bild-5.png" alt="" width="456" height="372" /></a></p>
<p>Transformie supports the following functions from Webkit&#8217;s syntax (in degrees, radians or grads):</p>
<ul>
<li>rotate</li>
<li>scale, scaleX, scaleY</li>
<li>skew, skewX, skewY</li>
<li>matrix (with the exception of the last two modifiers, tx and ty)</li>
</ul>
<p>The reason the translate functions are not yet supported is the fact that IE&#8217;s Matrix function is not as flexible as Webkit&#8217;s, since you&#8217;re not able to specify tx and ty, the third columns&#8217; first row value and second row value in the actual matrix (there is a way, but then the auto scaling doesn&#8217;t work anymore &#8211; does&#8217;t help much).</p>
<p>However, it&#8217;s fairly easy to also add the translate functions and the last two missing values of the matrix function by simply modifying the position top/left values. The only problem is that the actual behaviour then is a bit different than Webkit&#8217;s &#8211; Webkit&#8217;s translate doesn&#8217;t modify layout.</p>
<p>Also good to understand is the <strong>-webkit-transform-origin</strong> css function, that defaults to the center of the element in Webkit. However, in IE, and therefore also in my implemention (at this moment), the top left corner is the origin for calculations. Again, this should be easy to fix using position values.</p>
<p>Anyway, let&#8217;s get to the point. To show you how simple it really is to get started with Transformie, I simply included Transformie, and its dependancies Sylvester (great javascript utility, very useful for matrix multiplication!) and jQuery (was already included there, obviously) into my last <a href="http://paulbakaus.com/?p=6">blog post&#8217;s entry Coverflow</a>, and from then it&#8217;s prety straight forward &#8211; reload Internet Explorer, and you should have CSS transforms!</p>
<p><a href="http://paulbakaus.com/lab/js/coverflow"><img class="alignnone size-full wp-image-13" title="bild-6" src="http://paulbakaus.com/wp-content/uploads/2008/08/bild-6.png" alt="" width="500" height="329" /></a></p>
<p>One implementation detail that stands out is the usage of the terribly handy event &#8220;<a href="http://msdn.microsoft.com/en-us/library/ms536956(VS.85).aspx">onpropertychange</a>&#8220;, which almost behaves like DOMAttrChanged, but is much finer grained. It is capable of telling you whenever a DOM property changes on an element, <strong>and when you track the style attribute, it actually passes the actual style that changed along with the event</strong>. Neat, huh?</p>
<h2>Documentation</h2>
<p>Anyway, enough said, give it a try. It&#8217;s tested in Internet Explorer 6 and 7 and simply does nothing in other browsers. The following can be optionally configured directly after script inclusion:</p>
<ul>
<li><strong>Transformie.inlineCSS = jQuerySelector</strong> (default: &#8220;*&#8221;, defines if inline styles should be parsed for selected elements on page load [disable or narrow down for better performance])</li>
<li><strong>Transformie.stylesheets = Boolean</strong> (default: true, defines if stylesheets are parsed on page load)</li>
<li><strong>Transformie.trackChangesFor = jQuerySelector</strong> (default: &#8220;*&#8221;, defines for what elements changes should be tracked [disable or narrow down for better performance])</li>
</ul>
<p>And when you&#8217;re done, simply use <strong>-webkit-transform</strong> or <strong>transform</strong> (thanks for the hint, John Resig!) in your Stylesheets or inline in the style tag.</p>
<h2>Download</h2>
<p>Here&#8217;s the download:</p>
<ul>
<li><a href="http://paulbakaus.com/lab/js/transformie/pb.transformie.bundle.zip">Transformie 0.2</a> <strong>(bundle, also contains jQuery and Sylvester, recommended)</strong></li>
<li><a href="http://paulbakaus.com/lab/js/transformie/pb.transformie.js">Transformie 0.2</a> (5k, single file, uncompressed)</li>
<li><a href="http://paulbakaus.com/lab/js/transformie/pb.transformie.min.js">Transformie 0.2</a> (3k, single file, minified)</li>
</ul>
<p>Transformie is, like jQuery, MIT/GPL double licensed.</p>
<p>Enjoy and leave me comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://paulbakaus.com/2008/08/16/bringing-css-transform-to-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

