<?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>soledad penadés &#187; Projects</title>
	<atom:link href="http://soledadpenades.com/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://soledadpenades.com</link>
	<description>repeat 4[fd 100 rt 90]</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Mesh subdivision (2012 extended edition)</title>
		<link>http://soledadpenades.com/2012/04/16/mesh-subdivision-2012-extended-edition/</link>
		<comments>http://soledadpenades.com/2012/04/16/mesh-subdivision-2012-extended-edition/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 21:54:15 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3947</guid>
		<description><![CDATA[Back in 2004, when I was starting to experiment with OpenGL, I had the idea of creating meshes from scratch. This will come in handy for intros, since this way I won&#8217;t be needing to include the meshes&#8217; data with the executable!, I thought. I would create a simple base pyramidal mesh, and subdivide it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.soledadpenades.com/js/mesh_subdivision/#eyJudW1iZXJfcGFzc2VzIjo4LCJiYWNrZ3JvdW5kX2NvbG9yIjoxMjMwMzI5MSwid2lyZWZyYW1lIjp0cnVlLCJ3aXJld2lkdGgiOjEsIndpcmVjb2xvciI6MCwiY29sb3JfMSI6MTY3MTE2ODAsImNvbG9yXzIiOjY1MjgwLCJjb2xvcl8zIjoyNTUsIndvYmJseSI6ZmFsc2UsIndvYmJseV9zcGVlZCI6MSwicm90YXRpb25fc3BlZWRfeCI6MSwicm90YXRpb25fc3BlZWRfeiI6MSwiY2FtZXJhX3giOjAsImNhbWVyYV95IjowLCJjYW1lcmFfeiI6MTAsImRyYXdfYXhpcyI6dHJ1ZX0="><img src="/imgs/2012/ms01.jpg" alt="mesh subdivision 2012" /></a></p>
<p>Back in 2004, when I was starting to experiment with OpenGL, I had the idea of creating meshes <em>from scratch</em>. <q>This will come in handy for intros, since this way I won&#8217;t be needing to include the meshes&#8217; data with the executable!</q>, I thought.</p>
<p>I would create a simple base pyramidal mesh, and subdivide it until I got something with more vertices and faces, but properly connected (not just a bunch of random points). So I when I had a couple of free days, I came up with <a href="http://soledadpenades.com/2004/04/19/improving-mesh-subdivision/">a very rough way</a> of creating and subdividing meshes. It was very raw, but I loved that I had done it myself!<br />
<span id="more-3947"></span><br />
<a href="http://soledadpenades.com/2004/04/19/improving-mesh-subdivision/"><img src="http://www.soledadpenades.com/imgs/mesh_sdv_3passes_fixed_lw.png" /></a></p>
<p>At the end, I didn&#8217;t use it for any intro at all, but I used the <em>trick</em> in a demo instead, called <a href="http://soledadpenades.com/projects/demoscene/codecolors-by-ppg/">codecolors</a> (<a href="https://github.com/sole/demoscene/tree/master/releases/ppg/ppg_05_cc/src">source code</a>, if you&#8217;re feeling adventurous). Although it&#8217;s hard to notice, since everything was generously blurred (I had recently learned how to get a cheap motion blur effect and was really eager to use it in every single frame!).</p>
<p>Fast forward to 2012. I am learning (tinkering with?) <a href="https://github.com/mrdoob/three.js">three.js</a> and I wanted to find out how to manipulate vertex data dynamically. I somehow remembered this experiment and where I left it (<q>Next step is playing with the vertices!</q>), and I decided to continue it.</p>
<p>Once I got the basics working, I thought it would be neat to have some way of interacting with the scene&#8211;so I added <a href="https://code.google.com/p/dat-gui/">dat.gui</a>, which are the controls on top right. Then I also wanted to save the images, as I once I added controls for altering the look I started getting great imagery! So I added <a href="https://github.com/eligrey/FileSaver.js">FileSaver.js</a> and <a href="https://github.com/eligrey/canvas-toBlob.js">canvas-toBlob.js</a>, since browser support for downloading images is still a bit incomplete (so to speak).</p>
<p>And finally I thought: <q>hey, storing images is ok, but what if I want to modify an existing configuration?</q>. So I added support for storing the current configuration via some simple location hash serialising. I am not sure if it&#8217;s the best way but it seems to work well enough for now!</p>
<p><a href="http://lab.soledadpenades.com/js/mesh_subdivision/#eyJudW1iZXJfcGFzc2VzIjo0LCJiYWNrZ3JvdW5kX2NvbG9yIjoxMjMwMzI5MSwid2lyZWZyYW1lIjpmYWxzZSwid2lyZXdpZHRoIjoxLCJ3aXJlY29sb3IiOjE2NzExNjgwLCJjb2xvcl8xIjoxNjcxMTY4MCwiY29sb3JfMiI6NjUyODAsImNvbG9yXzMiOjI1NSwid29iYmx5IjpmYWxzZSwid29iYmx5X3NwZWVkIjoxLCJyb3RhdGlvbl9zcGVlZF94IjoxLCJyb3RhdGlvbl9zcGVlZF96IjoxLCJjYW1lcmFfeCI6MCwiY2FtZXJhX3kiOjAsImNhbWVyYV96IjoxMCwiZHJhd19heGlzIjp0cnVlfQ=="><img src="/imgs/2012/ms02.jpg" alt="mesh subdivision 2012" /></a></p>
<p>Oh, and since I just <em>love</em> text effects, I added a silly text-manipulation thingie to dynamically alter the innerText of the page contents. Just because!</p>
<p>It&#8217;s fun to play with all the settings and seeing what happens. I have found myself mesmerised just by looking at the end result. Some images seem really organic; others look very fractal/spaceish to me. (Don&#8217;t forget to make it <a href="http://lab.soledadpenades.com/js/mesh_subdivision/#eyJudW1iZXJfcGFzc2VzIjo1LCJiYWNrZ3JvdW5kX2NvbG9yIjoxMjMwMzI5MSwid2lyZWZyYW1lIjp0cnVlLCJ3aXJld2lkdGgiOjEsIndpcmVjb2xvciI6MTY3MTE2ODAsImNvbG9yXzEiOjE2NzExNjgwLCJjb2xvcl8yIjo2NTI4MCwiY29sb3JfMyI6MjU1LCJ3b2JibHkiOnRydWUsIndvYmJseV9zcGVlZCI6OS43MDMyOTY3MDMyOTY3MDMsInJvdGF0aW9uX3NwZWVkX3giOjEsInJvdGF0aW9uX3NwZWVkX3oiOjEsImNhbWVyYV94IjoyMDAsImNhbWVyYV95IjoyMDAsImNhbWVyYV96IjoyMDAsImRyYXdfYXhpcyI6dHJ1ZX0=">wobbly</a>! &#8211;looks like someone is having a discussion inside the pyramid!).</p>
<p>I&#8217;m <em>very</em> happy with the end result, and even more about the development process. I can vividly recall the many hours I spent in 2004 dealing with arrays and memory allocation for such a simple task as this one. Quite unproductive, to be honest! But Javascript + WebGL totally ROCK! Also, after so many years of trying to explain what the demoscene and realtime is about, it&#8217;s great to be able to demonstrate it <em>in realtime</em>. Yay!</p>
<p>I&#8217;ll write about the new &#8220;Simple yet Frequently Asked Questions&#8221; about three.js that I encountered while doing this experiment&#8230; but that will be tomorrow, if you don&#8217;t mind!</p>
<p>Have fun! :)</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3947&amp;md5=71ce55931be4ec0f0a529035f5efa2d9" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/04/16/mesh-subdivision-2012-extended-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2012%2F04%2F16%2Fmesh-subdivision-2012-extended-edition%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Mesh+subdivision+%282012+extended+edition%29&amp;amp;description=%0D%0A%0D%0ABack+in+2004%2C+when+I+was+starting+to+experiment+with+OpenGL%2C+I+had+the+idea+of+creating+meshes+from+scratch.+This+will+come+in+handy+for+intros%2C+since+this+way+I+won%27t+be+needing+to+include+the+meshes%27+data+with+the+executable%21%2C+I+thought.%0D%0A%0D%0AI+would+create+a+simple+base+pyramidal+mesh%2C+and+subdivide+it+until+I+got+something+with+more+vertices+and+faces%2C+but+properly+connected+%28not+just+a+bunch+of+random+points%29.+So+I+when+I+had+a+couple+of+free+days%2C+I+came+up+with+a+very+rough+way+of+creating+and+subdividing+meshes.+It+was+very+raw%2C+but+I+loved+that+I+had+done+it+myself%21%0D%0A%0D%0A%0D%0A%0D%0AAt+the+end%2C+I+didn%27t+use+it+for+any+intro+at+all%2C+but+I+used+the+trick+in+a+demo+instead%2C+called+codecolors+%28source+code%2C+if+you%27re+feeling+adventurous%29.+Although+it%27s+hard+to+notice%2C+since+everything+was+generously+blurred+%28I+had+recently+learned+how+to+get+a+cheap+motion+blur+effect+and+was+really+eager+to+use+it+in+every+single+frame%21%29.%0D%0A%0D%0AFast+forward+to+2012.+I+am+learning+%28tinkering+with%3F%29+three.js+and+I+wanted+to+find+out+how+to+manipulate+vertex+data+dynamically.+I+somehow+remembered+this+experiment+and+where+I+left+it+%28Next+step+is+playing+with+the+vertices%21%29%2C+and+I+decided+to+continue+it.%0D%0A%0D%0AOnce+I+got+the+basics+working%2C+I+thought+it+would+be+neat+to+have+some+way+of+interacting+with+the+scene--so+I+added+dat.gui%2C+which+are+the+controls+on+top+right.+Then+I+also+wanted+to+save+the+images%2C+as+I+once+I+added+controls+for+altering+the+look+I+started+getting+great+imagery%21+So+I+added+FileSaver.js+and+canvas-toBlob.js%2C+since+browser+support+for+downloading+images+is+still+a+bit+incomplete+%28so+to+speak%29.%0D%0A%0D%0AAnd+finally+I+thought%3A+hey%2C+storing+images+is+ok%2C+but+what+if+I+want+to+modify+an+existing+configuration%3F.+So+I+added+support+for+storing+the+current+configuration+via+some+simple+location+hash+serialising.+I+am+not+sure+if+it%27s+the+best+way+but+it+seems+to+work+well+enough+for+now%21%0D%0A%0D%0A%0D%0A%0D%0AOh%2C+and+since+I+just+love+text+effects%2C+I+added+a+silly+text-manipulation+thingie+to+dynamically+alter+the+innerText+of+the+page+contents.+Just+because%21%0D%0A%0D%0AIt%27s+fun+to+play+with+all+the+settings+and+seeing+what+happens.+I+have+found+myself+mesmerised+just+by+looking+at+the+end+result.+Some+images+seem+really+organic%3B+others+look+very+fractal%2Fspaceish+to+me.+%28Don%27t+forget+to+make+it+wobbly%21+--looks+like+someone+is+having+a+discussion+inside+the+pyramid%21%29.%0D%0A%0D%0AI%27m+very+happy+with+the+end+result%2C+and+even+more+about+the+development+process.+I+can+vividly+recall+the+many+hours+I+spent+in+2004+dealing+with+arrays+and+memory+allocation+for+such+a+simple+task+as+this+one.+Quite+unproductive%2C+to+be+honest%21+But+Javascript+%2B+WebGL+totally+ROCK%21+Also%2C+after+so+many+years+of+trying+to+explain+what+the+demoscene+and+realtime+is+about%2C+it%27s+great+to+be+able+to+demonstrate+it+in+realtime.+Yay%21%0D%0A%0D%0AI%27ll+write+about+the+new+%22Simple+yet+Frequently+Asked+Questions%22+about+three.js+that+I+encountered+while+doing+this+experiment...+but+that+will+be+tomorrow%2C+if+you+don%27t+mind%21%0D%0A%0D%0AHave+fun%21+%3A%29&amp;amp;tags=demoscene%2Chtml5%2Cjavascript%2Copengl%2Cthree.js%2Cwebgl%2Cblog" type="text/html" />
	</item>
		<item>
		<title>WebGL VGA</title>
		<link>http://soledadpenades.com/2012/04/09/webgl-vga/</link>
		<comments>http://soledadpenades.com/2012/04/09/webgl-vga/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 00:17:53 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[retro]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[vga]]></category>
		<category><![CDATA[webgl]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3937</guid>
		<description><![CDATA[For some odd reason, I happened to remember a little demo that came with the first 16 bit computer I ever used&#8211;an Amstrad PC 2286. It was meant for showing off the capabilities of the new and shiny Paradise VGA graphics adapter that the 2000 line of computers incorporated. 256 simultaneous colours! 640&#215;350 graphics! So [...]]]></description>
			<content:encoded><![CDATA[<p>For some odd reason, I happened to remember a little demo that came with the first 16 bit computer I ever used&#8211;an Amstrad PC 2286. It was meant for showing off the capabilities of the new and shiny Paradise VGA graphics adapter that the 2000 line of computers incorporated. 256 simultaneous colours! 640&#215;350 graphics! So stunning back then! I ran this demo from time to time, admiring all those colours at the same time on the screen. Then I learnt how to make the computer output them with GW-Basic, but that is another story.</p>
<p>I wanted to watch that demo again, but it seems that the Amstrad PC line of computers doesn&#8217;t get as much love as the CPCs do. So there is hardly any software repository (or dump) for those computers, and thus I couldn&#8217;t locate that demo. It doesn&#8217;t help that I didn&#8217;t remember its filename either&#8230;</p>
<p>But I found several images depicting the demo, and somehow I decided that <em>rebuilding</em> the demo was an excellent idea &#8211;and a great excuse to learn <a href="https://github.com/mrdoob/three.js">three.js</a>!</p>
<p>This is how the original looked:</p>
<p><img src="/imgs/2012/amstrad_pc2086.jpg" alt="VGA demo" /></p>
<p>And <a href="http://lab.soledadpenades.com/js/webgl_vga/">this</a> is what I ended up with:</p>
<p><a href="http://lab.soledadpenades.com/js/webgl_vga/"><img src="/imgs/2012/amstrad_pc2086_revisited.png" alt="VGA demo + webgl 2012" /></a><br />
<span id="more-3937"></span><br />
In the process I thought I would spice things up a little. Since rotations are &#8220;cheap&#8221; with WebGL, I made things move around, mostly by rotating them. I also added some scaling here and there, and liberally used Math.sin and Math.cos (as Javascript is <em>so</em> fast nowadays too). Still, I didn&#8217;t go too far, for the sake of keeping some resemblance to the original!</p>
<h2>SFAQ</h2>
<p>Although three.js is designed to be simple and intuitive, I had several <q>how do I do this apparently simple thing with three.js?</q> moments, so I thought it would be interesting to write these down as a sort of &#8220;SFAQ&#8221; (Silly Frequently Asked Questions). There we go:</p>
<h3>How do I make a line?</h3>
<p>You first create a geometry, then add vertices to its <em>vertices</em> property. Then create a material to set the line color, and use both the geometry and the material to create a line.</p>
<div class="syhi_block"><code><span style="color: #003366; font-weight: bold;">var</span> geometry <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Geometry</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> material <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">LineBasicMaterial</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> color<span style="color: #339933;">:</span> 0xFF0000 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> line <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Line</span><span style="color: #009900;">&#40;</span>geometry<span style="color: #339933;">,</span> material<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></code></div>
<p>Actually, you can create the line skipping the material creation. It will get a randomly assigned colour then.</p>
<h3>How do I make a line strip? (i.e. a series of connected segments)</h3>
<p>You start with a geometry, like in the line example above, but add as many points as you require. Then when creating the line you specify that the line type is THREE.LineStrip:</p>
<div class="syhi_block"><code><span style="color: #003366; font-weight: bold;">var</span> geometry <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Geometry</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">// ... add as many vertices as you need</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> material <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">LineBasicMaterial</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> color<span style="color: #339933;">:</span> 0xFF0000 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> line <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Line</span><span style="color: #009900;">&#40;</span>geometry<span style="color: #339933;">,</span> material<span style="color: #339933;">,</span> THREE.<span style="color: #660066;">LineStrip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></code></div>
<h3>How do I make a line in which each segment has a different colour?</h3>
<p>The answer to this is <strong>vertex colours</strong>, which works in the same way as the homonym concept in OpenGL: you need to specify a colour per vertex, instead of just a colour for the entire line. The way to specify the colours is to add instances of THREE.Color with the desired colour to the <strong>colors</strong> property, and then tell the line material to use them, as follows:</p>
<div class="syhi_block"><code><span style="color: #003366; font-weight: bold;">var</span> geometry <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Geometry</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">colors</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Color</span><span style="color: #009900;">&#40;</span> 0xFF0000 <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">colors</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Color</span><span style="color: #009900;">&#40;</span> 0x00FF00 <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> material <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">LineBasicMaterial</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> vertexColors<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> line <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Line</span><span style="color: #009900;">&#40;</span>geometry<span style="color: #339933;">,</span> material<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></code></div>
<p>I&#8217;m using this for the odd colourful figure on top left.</p>
<h3>How do I build hierarchies of objects?</h3>
<p>You can use the generic THREE.Object3D class as container for other objects. When you add children to that object, and move it, the children will move along with the parent:</p>
<div class="syhi_block"><code><span style="color: #003366; font-weight: bold;">var</span> container <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Object3D</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> geometry <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">CubeGeometry</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> cube <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Mesh</span><span style="color: #009900;">&#40;</span>geometry<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
container.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>cube<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<br />
cube.<span style="color: #660066;">position</span>.<span style="color: #660066;">x</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Local x = 0</span><br />
container.<span style="color: #660066;">position</span>.<span style="color: #660066;">x</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// The cube's 'world' X coordinate at this point is 10</span></code></div>
<p>I used this for the &#8220;moire blocks&#8221; in the middle of the screen.</p>
<h3>How do I change the colour of an object after having instantiated it?</h3>
<p>Simply access its material.color property and change it as required:</p>
<div class="syhi_block"><code><span style="color: #003366; font-weight: bold;">var</span> geometry <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Geometry</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
geometry.<span style="color: #660066;">vertices</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vertex</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Vector3</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> material <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">LineBasicMaterial</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> color<span style="color: #339933;">:</span> 0xFF0000 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> line <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> THREE.<span style="color: #660066;">Line</span><span style="color: #009900;">&#40;</span>geometry<span style="color: #339933;">,</span> material<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// the line is red</span><br />
<br />
<span style="color: #006600; font-style: italic;">// But if we change its green attribute to 1...</span><br />
line.<span style="color: #660066;">material</span>.<span style="color: #660066;">color</span>.<span style="color: #660066;">g</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// ...the line is yellow now!</span></code></div>
<p>This technique is used for animating the colour of the rectangles on top right.</p>
<h2>A call for help!</h2>
<p>If you know the file name, or have a copy of the original demo, please let me know! I would love to watch it again after so many years! Hopefully it will work with DOSBox. Please! :-)</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3937&amp;md5=21d51722868ccc951ca3f6167f765e69" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/04/09/webgl-vga/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2012%2F04%2F09%2Fwebgl-vga%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=WebGL+VGA&amp;amp;description=For+some+odd+reason%2C+I+happened+to+remember+a+little+demo+that+came+with+the+first+16+bit+computer+I+ever+used--an+Amstrad+PC+2286.+It+was+meant+for+showing+off+the+capabilities+of+the+new+and+shiny+Paradise+VGA+graphics+adapter+that+the+2000+line+of+computers+incorporated.+256+simultaneous+colours%21+640x350+graphics%21+So+stunning+back+then%21+I+ran+this+demo+from+time+to+time%2C+admiring+all+those+colours+at+the+same+time+on+the+screen.+Then+I+learnt+how+to+make+the+computer+output+them+with+GW-Basic%2C+but+that+is+another+story.%0D%0A%0D%0AI+wanted+to+watch+that+demo+again%2C+but+it+seems+that+the+Amstrad+PC+line+of+computers+doesn%27t+get+as+much+love+as+the+CPCs+do.+So+there+is+hardly+any+software+repository+%28or+dump%29+for+those+computers%2C+and+thus+I+couldn%27t+locate+that+demo.+It+doesn%27t+help+that+I+didn%27t+remember+its+filename+either...%0D%0A%0D%0ABut+I+found+several+images+depicting+the+demo%2C+and+somehow+I+decided+that+rebuilding+the+demo+was+an+excellent+idea+--and+a+great+excuse+to+learn+three.js%21%0D%0A%0D%0AThis+is+how+the+original+looked%3A%0D%0A%0D%0A%0D%0A%0D%0AAnd+this+is+what+I+ended+up+with%3A%0D%0A%0D%0A%0D%0A%0D%0AIn+the+process+I+thought+I+would+spice+things+up+a+little.+Since+rotations+are+%22cheap%22+with+WebGL%2C+I+made+things+move+around%2C+mostly+by+rotating+them.+I+also+added+some+scaling+here+and+there%2C+and+liberally+used+Math.sin+and+Math.cos+%28as+Javascript+is+so+fast+nowadays+too%29.+Still%2C+I+didn%27t+go+too+far%2C+for+the+sake+of+keeping+some+resemblance+to+the+original%21%0D%0A%0D%0ASFAQ%0D%0A%0D%0AAlthough+three.js+is+designed+to+be+simple+and+intuitive%2C+I+had+several+how+do+I+do+this+apparently+simple+thing+with+three.js%3F+moments%2C+so+I+thought+it+would+be+interesting+to+write+these+down+as+a+sort+of+%22SFAQ%22+%28Silly+Frequently+Asked+Questions%29.+There+we+go%3A%0D%0A%0D%0AHow+do+I+make+a+line%3F%0D%0A%0D%0AYou+first+create+a+geometry%2C+then+add+vertices+to+its+vertices+property.+Then+create+a+material+to+set+the+line+color%2C+and+use+both+the+geometry+and+the+material+to+create+a+line.%0D%0A%0D%0A%0D%0Avar+geometry+%3D+new+THREE.Geometry%28%29%3B%0D%0A%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%280%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%28100%2C+0%2C+0%29+%29+%29%3B%0D%0A%0D%0Avar+material+%3D+new+THREE.LineBasicMaterial%28%7B+color%3A+0xFF0000+%7D%29%3B%0D%0Avar+line+%3D+new+THREE.Line%28geometry%2C+material%29%3B%0D%0A%0D%0A%0D%0AActually%2C+you+can+create+the+line+skipping+the+material+creation.+It+will+get+a+randomly+assigned+colour+then.%0D%0A%0D%0AHow+do+I+make+a+line+strip%3F+%28i.e.+a+series+of+connected+segments%29%0D%0A%0D%0AYou+start+with+a+geometry%2C+like+in+the+line+example+above%2C+but+add+as+many+points+as+you+require.+Then+when+creating+the+line+you+specify+that+the+line+type+is+THREE.LineStrip%3A%0D%0A%0D%0A%0D%0Avar+geometry+%3D+new+THREE.Geometry%28%29%3B%0D%0A%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%280%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%28100%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%28100%2C+100%2C+0%29+%29+%29%3B%0D%0A%2F%2F+...+add+as+many+vertices+as+you+need%0D%0A%0D%0Avar+material+%3D+new+THREE.LineBasicMaterial%28%7B+color%3A+0xFF0000+%7D%29%3B%0D%0Avar+line+%3D+new+THREE.Line%28geometry%2C+material%2C+THREE.LineStrip%29%3B%0D%0A%0D%0A%0D%0AHow+do+I+make+a+line+in+which+each+segment+has+a+different+colour%3F%0D%0A%0D%0AThe+answer+to+this+is+vertex+colours%2C+which+works+in+the+same+way+as+the+homonym+concept+in+OpenGL%3A+you+need+to+specify+a+colour+per+vertex%2C+instead+of+just+a+colour+for+the+entire+line.+The+way+to+specify+the+colours+is+to+add+instances+of+THREE.Color+with+the+desired+colour+to+the+colors+property%2C+and+then+tell+the+line+material+to+use+them%2C+as+follows%3A%0D%0A%0D%0A%0D%0Avar+geometry+%3D+new+THREE.Geometry%28%29%3B%0D%0A%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%280%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.colors.push%28new+THREE.Color%28+0xFF0000+%29+%29%3B%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%28100%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.colors.push%28new+THREE.Color%28+0x00FF00+%29+%29%3B%0D%0A%0D%0Avar+material+%3D+new+THREE.LineBasicMaterial%28%7B+vertexColors%3A+true+%7D%29%3B%0D%0Avar+line+%3D+new+THREE.Line%28geometry%2C+material%29%3B%0D%0A%0D%0A%0D%0AI%27m+using+this+for+the+odd+colourful+figure+on+top+left.%0D%0A%0D%0AHow+do+I+build+hierarchies+of+objects%3F%0D%0A%0D%0AYou+can+use+the+generic+THREE.Object3D+class+as+container+for+other+objects.+When+you+add+children+to+that+object%2C+and+move+it%2C+the+children+will+move+along+with+the+parent%3A%0D%0A%0D%0A%0D%0Avar+container+%3D+new+THREE.Object3D%28%29%3B%0D%0Avar+geometry+%3D+new+THREE.CubeGeometry%2810%2C+10%2C+10%29%3B%0D%0Avar+cube+%3D+new+THREE.Mesh%28geometry%29%3B%0D%0A%0D%0Acontainer.add%28cube%29%3B%0D%0A%0D%0A%0D%0Acube.position.x+%3D+0%3B+%2F%2F+Local+x+%3D+0%0D%0Acontainer.position.x+%3D+10%3B+%2F%2F+The+cube%27s+%27world%27+X+coordinate+at+this+point+is+10%0D%0A%0D%0A%0D%0AI+used+this+for+the+%22moire+blocks%22+in+the+middle+of+the+screen.%0D%0A%0D%0AHow+do+I+change+the+colour+of+an+object+after+having+instantiated+it%3F%0D%0A%0D%0ASimply+access+its+material.color+property+and+change+it+as+required%3A%0D%0A%0D%0A%0D%0Avar+geometry+%3D+new+THREE.Geometry%28%29%3B%0D%0A%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%280%2C+0%2C+0%29+%29+%29%3B%0D%0Ageometry.vertices.push%28new+THREE.Vertex%28+new+THREE.Vector3%28100%2C+0%2C+0%29+%29+%29%3B%0D%0A%0D%0Avar+material+%3D+new+THREE.LineBasicMaterial%28%7B+color%3A+0xFF0000+%7D%29%3B%0D%0Avar+line+%3D+new+THREE.Line%28geometry%2C+material%29%3B%0D%0A%0D%0A%2F%2F+the+line+is+red%0D%0A%0D%0A%2F%2F+But+if+we+change+its+green+attribute+to+1...%0D%0Aline.material.color.g+%3D+1%3B%0D%0A%0D%0A%2F%2F+...the+line+is+yellow+now%21%0D%0A%0D%0A%0D%0AThis+technique+is+used+for+animating+the+colour+of+the+rectangles+on+top+right.%0D%0A%0D%0AA+call+for+help%21%0D%0A%0D%0AIf+you+know+the+file+name%2C+or+have+a+copy+of+the+original+demo%2C+please+let+me+know%21+I+would+love+to+watch+it+again+after+so+many+years%21+Hopefully+it+will+work+with+DOSBox.+Please%21+%3A-%29&amp;amp;tags=javascript%2Cretro%2Cthree.js%2Cvga%2Cwebgl%2Cblog" type="text/html" />
	</item>
		<item>
		<title>animated_gif.js</title>
		<link>http://soledadpenades.com/2012/04/02/animated_gif-js/</link>
		<comments>http://soledadpenades.com/2012/04/02/animated_gif-js/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 07:18:13 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Silly stuff]]></category>
		<category><![CDATA[animated gif]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3934</guid>
		<description><![CDATA[Past week I wanted to make an animated GIF &#8211; but didn&#8217;t want to use GIMP or ffmpeg for that. I wondered: can an animated GIF be made in the browser? Of course it can! There was a library (JSGIF) which was a port of the original ActionScript library, AS3GIF. I built a bit of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.soledadpenades.com/js/animated_gif/"><img src="/imgs/2012/animated_gif.png" alt="Animated GIF" /></a></p>
<p>Past week I wanted to make an animated GIF &#8211; but didn&#8217;t want to use GIMP or ffmpeg for that. I wondered: can an animated GIF be made in the browser? <strong>Of course it can!</strong> There was a library (<a href="https://github.com/antimatter15/jsgif">JSGIF</a>) which was a port of the original ActionScript library, <a href="http://code.google.com/p/as3gif/">AS3GIF</a>.</p>
<p>I built a bit of wrapping code around the library, and did some tests to see if the port worked, first by creating a canvas and painting random squares on it, and then using them as input frames and building the GIF with that. Secondly, I tried using images. It worked acceptably enough (the color quantizer could be better, but we&#8217;re not after photo-realistic animations, after all).</p>
<p>So I added the drag and drop + file api stuff, but there was still something missing&#8230; <strong>the look wasn&#8217;t 90s enough</strong>! It was all begging for a bit of outdated aesthetics, but done with CSS3 and HTML5. Hence, there are multicolour logos via CSS animations, eye-cancer phosphorescent pink that turns into X-Files green glow (via CSS animations too), an HTML5 &lt;footer&gt; element used just because, and even a modern, 21st century blink-kind effect thanks to more CSS animations. You can&#8217;t but love it. And those huge frames! They are done with an ingenious abuse of CSS borders, but that could be done with CSS five years ago already. Nothing new here, but all very funny in any case.</p>
<p>Note that even if I finished this yesterday &#8211;April&#8217;s Fools&#8211; it wasn&#8217;t originally intended to be an April&#8217;s Fools joke. Hopefully you can take it seriously, right?</p>
<p>Right!</p>
<p><small>PS I actually looked into making animated WebP&#8217;s but the library I found wasn&#8217;t fast enough so all the fun factor was lost :-(</p>
<p>Maybe in a couple of years, when WebP is retro already&#8230;</small></p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3934&amp;md5=cfeffadb082760226e262c878a6b9457" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/04/02/animated_gif-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2012%2F04%2F02%2Fanimated_gif-js%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=animated_gif.js&amp;amp;description=%0D%0A%0D%0APast+week+I+wanted+to+make+an+animated+GIF+-+but+didn%27t+want+to+use+GIMP+or+ffmpeg+for+that.+I+wondered%3A+can+an+animated+GIF+be+made+in+the+browser%3F+Of+course+it+can%21+There+was+a+library+%28JSGIF%29+which+was+a+port+of+the+original+ActionScript+library%2C+AS3GIF.%0D%0A%0D%0AI+built+a+bit+of+wrapping+code+around+the+library%2C+and+did+some+tests+to+see+if+the+port+worked%2C+first+by+creating+a+canvas+and+painting+random+squares+on+it%2C+and+then+using+them+as+input+frames+and+building+the+GIF+with+that.+Secondly%2C+I+tried+using+images.+It+worked+acceptably+enough+%28the+color+quantizer+could+be+better%2C+but+we%27re+not+after+photo-realistic+animations%2C+after+all%29.%0D%0A%0D%0ASo+I+added+the+drag+and+drop+%2B+file+api+stuff%2C+but+there+was+still+something+missing...+the+look+wasn%27t+90s+enough%21+It+was+all+begging+for+a+bit+of+outdated+aesthetics%2C+but+done+with+CSS3+and+HTML5.+Hence%2C+there+are+multicolour+logos+via+CSS+animations%2C+eye-cancer+phosphorescent+pink+that+turns+into+X-Files+green+glow+%28via+CSS+animations+too%29%2C+an+HTML5+%26lt%3Bfooter%26gt%3B+element+used+just+because%2C+and+even+a+modern%2C+21st+century+blink-kind+effect+thanks+to+more+CSS+animations.+You+can%27t+but+love+it.+And+those+huge+frames%21+They+are+done+with+an+ingenious+abuse+of+CSS+borders%2C+but+that+could+be+done+with+CSS+five+years+ago+already.+Nothing+new+here%2C+but+all+very+funny+in+any+case.%0D%0A%0D%0ANote+that+even+if+I+finished+this+yesterday+--April%27s+Fools--+it+wasn%27t+originally+intended+to+be+an+April%27s+Fools+joke.+Hopefully+you+can+take+it+seriously%2C+right%3F%0D%0A%0D%0ARight%21%0D%0A%0D%0APS+I+actually+looked+into+making+animated+WebP%27s+but+the+library+I+found+wasn%27t+fast+enough+so+all+the+fun+factor+was+lost+%3A-%28%0D%0A%0D%0AMaybe+in+a+couple+of+years%2C+when+WebP+is+retro+already...&amp;amp;tags=animated+gif%2Ccanvas%2Ccss3%2Chtml5%2Cjavascript%2Cblog" type="text/html" />
	</item>
		<item>
		<title>aafm revision 4</title>
		<link>http://soledadpenades.com/2012/03/14/aafm-revision-4/</link>
		<comments>http://soledadpenades.com/2012/03/14/aafm-revision-4/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 23:13:49 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[aafm]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[pygtk]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3921</guid>
		<description><![CDATA[It&#8217;s been too long since the last update to aafm, &#8220;the Android ADB File Manager&#8221;, which is a shame! I guess I should apologise, but I&#8217;ve been horribly busy these last months. I didn&#8217;t even have time to write a post apologising about not having time! Hah! Anyway, let&#8217;s fix it right now! The latest [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been too long since <a href="http://soledadpenades.com/2011/11/06/aafm-revision-3/">the last update</a> to <a href="https://github.com/sole/aafm">aafm</a>, <em>&#8220;the Android ADB File Manager&#8221;</em>, which is a shame! I guess I should apologise, but I&#8217;ve been horribly busy these last months. I didn&#8217;t even have time to write a post apologising about not having time! Hah! Anyway, let&#8217;s fix it right now!</p>
<p>The latest revision incorporates some <em>rad</em> fixes by <a href="http://norman.rasmussen.co.za/">Norman Rasmussen</a> and <a href="http://kowalczuk.eu/">Michał Kowalczuk</a>, namely:</p>
<ul>
<li><strong>Adds BusyBox support</strong> (by <a href="http://github.com/sammael">sammael</a>). In other words, it means that people using Cyanogen Mod devices can now use aafm to browse their files! Hooray!</li>
<li><strong>Handle device drops when there&#8217;s no row present</strong> (by <a href="http://github.com/normanr">normanr</a>). An apparently silly issue that can be very confusing when it happens to you.</li>
<li><strong>Handle symlinks on the device correctly</strong> (by <a href="http://github.com/normanr">normanr</a>). Excellent!</li>
<li><strong>Quote/Unquote special characters in drag&amp;drop messages</strong> (by <a href="http://github.com/normanr">normanr</a>). Superb!</li>
</ul>
<p>On my side, and apart from merging and testing the changes, I&#8217;ve worked on&#8230;</p>
<ul>
<li><strong>Slightly improving the README.</strong> Clarify how to find out the device Id, and add link to PyGTK binary for Mac users. I recently found that there is a readily available PyGTK binary build for Mac OS, which means that <strong>you can now use aafm with Mac</strong> as well. It is slightly buggy but even then it&#8217;s way better than transferring files from within Eclipse or using the Android file transfer Mac &#8220;utility&#8221;*</li>
<li><strong>Moving the TO DO list items</strong> that were on the README file over to the issue tracker in the project&#8217;s page. That is more trackable/visible (or that I hope!).</li>
</ul>
<p>I love the fact that there&#8217;s random people using the software and also submitting great patches. I&#8217;d like to think that&#8217;s because the code is simple enough and the app is useful enough too! (OK, GitHub making things easy might be part of the reasons as well, I reckon).</p>
<p>There is now quite a long list of <a href="https://github.com/sole/aafm/issues">issues</a> at the GitHub project page. Feel free to dig in and send a patch (or <em>pull request</em> in GitHub parlance) and help make Android users&#8217; lives a little bit better!</p>
<p><small>* Because, to my enormous surprise, MTP devices such as &#8230; Honeycomb or Ice Cream Sandwich and co do <em>not</em> work in Mac OS either&#8230;!</small></p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3921&amp;md5=1b712dced9ba774cd851412a04d74add" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/03/14/aafm-revision-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2012%2F03%2F14%2Faafm-revision-4%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=aafm+revision+4&amp;amp;description=It%27s+been+too+long+since+the+last+update+to+aafm%2C+%22the+Android+ADB+File+Manager%22%2C+which+is+a+shame%21+I+guess+I+should+apologise%2C+but+I%27ve+been+horribly+busy+these+last+months.+I+didn%27t+even+have+time+to+write+a+post+apologising+about+not+having+time%21+Hah%21+Anyway%2C+let%27s+fix+it+right+now%21%0D%0A%0D%0AThe+latest+revision+incorporates+some+rad+fixes+by+Norman+Rasmussen+and+Micha%C5%82+Kowalczuk%2C+namely%3A%0D%0A%0D%0A%0D%0AAdds+BusyBox+support+%28by+sammael%29.+In+other+words%2C+it+means+that+people+using+Cyanogen+Mod+devices+can+now+use+aafm+to+browse+their+files%21+Hooray%21%0D%0AHandle+device+drops+when+there%27s+no+row+present+%28by+normanr%29.+An+apparently+silly+issue+that+can+be+very+confusing+when+it+happens+to+you.%0D%0AHandle+symlinks+on+the+device+correctly+%28by+normanr%29.+Excellent%21%0D%0AQuote%2FUnquote+special+characters+in+drag%26amp%3Bdrop+messages+%28by+normanr%29.+Superb%21%0D%0A%0D%0A%0D%0AOn+my+side%2C+and+apart+from+merging+and+testing+the+changes%2C+I%27ve+worked+on...%0D%0A%0D%0ASlightly+improving+the+README.+Clarify+how+to+find+out+the+device+Id%2C+and+add+link+to+PyGTK+binary+for+Mac+users.+I+recently+found+that+there+is+a+readily+available+PyGTK+binary+build+for+Mac+OS%2C+which+means+that+you+can+now+use+aafm+with+Mac+as+well.+It+is+slightly+buggy+but+even+then+it%27s+way+better+than+transferring+files+from+within+Eclipse+or+using+the+Android+file+transfer+Mac+%22utility%22%2A%0D%0AMoving+the+TO+DO+list+items+that+were+on+the+README+file+over+to+the+issue+tracker+in+the+project%27s+page.+That+is+more+trackable%2Fvisible+%28or+that+I+hope%21%29.%0D%0A%0D%0A%0D%0AI+love+the+fact+that+there%27s+random+people+using+the+software+and+also+submitting+great+patches.+I%27d+like+to+think+that%27s+because+the+code+is+simple+enough+and+the+app+is+useful+enough+too%21+%28OK%2C+GitHub+making+things+easy+might+be+part+of+the+reasons+as+well%2C+I+reckon%29.%0D%0A%0D%0AThere+is+now+quite+a+long+list+of+issues+at+the+GitHub+project+page.+Feel+free+to+dig+in+and+send+a+patch+%28or+pull+request+in+GitHub+parlance%29+and+help+make+Android+users%27+lives+a+little+bit+better%21%0D%0A%0D%0A%2A+Because%2C+to+my+enormous+surprise%2C+MTP+devices+such+as+...+Honeycomb+or+Ice+Cream+Sandwich+and+co+do+not+work+in+Mac+OS+either...%21&amp;amp;tags=aafm%2Candroid%2Cmac+os+x%2Cpygtk%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Berlin, July 2011</title>
		<link>http://soledadpenades.com/2012/02/18/berlin-july-2011/</link>
		<comments>http://soledadpenades.com/2012/02/18/berlin-july-2011/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 22:38:09 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[berlin]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3911</guid>
		<description><![CDATA[The pictures from my first trip to Berlin are online now. This time, I decided to experiment with post-processing instead of simply uploading the pictures as they came from the camera. Nothing too fancy, just playing with a couple of GIMP plug-ins, essential actions such as adjusting brightness and contrast, and of course realigning pictures [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://p.soledadpenades.com/album/48/"><img src="http://p.soledadpenades.com/data/clyk/2012/02/1736_small.jpg" /></a></p>
<p>The pictures from my first trip to Berlin are <a href="http://p.soledadpenades.com/album/48/">online now</a>.</p>
<p>This time, I decided to experiment with post-processing instead of simply uploading the pictures as they came from the camera. Nothing too fancy, just playing with <a href="http://soledadpenades.com/2012/02/12/my-favourite-gimp-plug-ins/">a couple of GIMP plug-ins</a>, essential actions such as adjusting brightness and contrast, and of course realigning pictures (as I take <em>slightly</em> tilted pictures all the time, but not on purpose, as you can imagine). I also used <a href="http://www.rawtherapee.com/">RawTherapee</a> to process the RAW files. It&#8217;s absolutely my favourite RAW editor.</p>
<p>I chose this black and white finish because that&#8217;s what Berlin inspired me. There&#8217;s this strong sense of the past still being present, even in a violent manner, and still it&#8217;s somehow very much like a spirit trying to free itself from old considerations. There&#8217;s a tension all over the place between legacy and modernity, even if apparently Berliners carefully tiptoe over the dividing line and seem to ignore said tension, or perhaps they are simply internalising the conflict and transforming it into something else; maybe that&#8217;s why there are so many sprawls of graffiti and artsy inspiring stuff all over the city, often in the most unexpected corners. Some places were just immensely sad while others were so lively and energising&#8230;!</p>
<p>And before you ask: no, I didn&#8217;t attempt to sketch anything serious on this trip, as it was quite short and I still had to finish the <a href="http://5013.es/sketches/london-newyork/">London-NY sketchbook</a>.</p>
<p>Now that I finished this (I&#8217;ve had to postpone it for months), I am finally free to fix <a href="https://market.android.com/details?id=es.s013.projects.ns">Nerdstalgia</a>. I <em>think</em> I found the source of all the troubles I&#8217;m having with certain phones (namely that the app doesn&#8217;t work at all, grrr). If that doesn&#8217;t work I don&#8217;t know what else I&#8217;ll do! Double grrr!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3911&amp;md5=79bac58185f62cd783cc0ec706c51347" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/02/18/berlin-july-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2012%2F02%2F18%2Fberlin-july-2011%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Berlin%2C+July+2011&amp;amp;description=%0D%0A%0D%0AThe+pictures+from+my+first+trip+to+Berlin+are+online+now.%0D%0A%0D%0AThis+time%2C+I+decided+to+experiment+with+post-processing+instead+of+simply+uploading+the+pictures+as+they+came+from+the+camera.+Nothing+too+fancy%2C+just+playing+with+a+couple+of+GIMP+plug-ins%2C+essential+actions+such+as+adjusting+brightness+and+contrast%2C+and+of+course+realigning+pictures+%28as+I+take+slightly+tilted+pictures+all+the+time%2C+but+not+on+purpose%2C+as+you+can+imagine%29.+I+also+used+RawTherapee+to+process+the+RAW+files.+It%27s+absolutely+my+favourite+RAW+editor.%0D%0A%0D%0AI+chose+this+black+and+white+finish+because+that%27s+what+Berlin+inspired+me.+There%27s+this+strong+sense+of+the+past+still+being+present%2C+even+in+a+violent+manner%2C+and+still+it%27s+somehow+very+much+like+a+spirit+trying+to+free+itself+from+old+considerations.+There%27s+a+tension+all+over+the+place+between+legacy+and+modernity%2C+even+if+apparently+Berliners+carefully+tiptoe+over+the+dividing+line+and+seem+to+ignore+said+tension%2C+or+perhaps+they+are+simply+internalising+the+conflict+and+transforming+it+into+something+else%3B+maybe+that%27s+why+there+are+so+many+sprawls+of+graffiti+and+artsy+inspiring+stuff+all+over+the+city%2C+often+in+the+most+unexpected+corners.+Some+places+were+just+immensely+sad+while+others+were+so+lively+and+energising...%21%0D%0A%0D%0AAnd+before+you+ask%3A+no%2C+I+didn%27t+attempt+to+sketch+anything+serious+on+this+trip%2C+as+it+was+quite+short+and+I+still+had+to+finish+the+London-NY+sketchbook.%0D%0A%0D%0ANow+that+I+finished+this+%28I%27ve+had+to+postpone+it+for+months%29%2C+I+am+finally+free+to+fix+Nerdstalgia.+I+think+I+found+the+source+of+all+the+troubles+I%27m+having+with+certain+phones+%28namely+that+the+app+doesn%27t+work+at+all%2C+grrr%29.+If+that+doesn%27t+work+I+don%27t+know+what+else+I%27ll+do%21+Double+grrr%21&amp;amp;tags=berlin%2Cgimp%2Cphotography%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

