<?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>matt.west.co.tt &#187; Canvastastic</title>
	<atom:link href="http://matt.west.co.tt/category/javascript/canvastastic/feed/" rel="self" type="application/rss+xml" />
	<link>http://matt.west.co.tt</link>
	<description>adventures of a retro electro media hacker type person</description>
	<lastBuildDate>Mon, 25 Jul 2011 21:37:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Fake Plastic Cubes</title>
		<link>http://matt.west.co.tt/demoscene/fake-plastic-cubes/</link>
		<comments>http://matt.west.co.tt/demoscene/fake-plastic-cubes/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 00:10:00 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=179</guid>
		<description><![CDATA[It was internally nagging me all summer that I ought to release something at Sundown, but apart from some brief excitement around a brainwave I had involving three iPhones, Javascript and some cardboard (which sadly didn&#8217;t work out in practice), it didn&#8217;t really amount to much. Then Evoke happened, and inspired me to decide that, [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center; margin-top: 1em;"><img src="http://matt.west.co.tt/images/fpc.png" width="400" height="300" alt="" /></div>
<p>It was internally nagging me all summer that I ought to release something at <a href="http://sundowndemoparty.org/">Sundown</a>, but apart from some brief excitement around a brainwave I had involving three iPhones, Javascript and some cardboard (which sadly didn&#8217;t work out in practice), it didn&#8217;t really amount to much. Then <a href="http://www.evoke.eu/2010/">Evoke</a> happened, and inspired me to decide that, in the words of Haujobb&#8217;s invitation, <a href="http://pouet.net/prod.php?which=54920">I should</a> make a demo.</p>
<p>Or, to be precise, a Javascript 64K intro. Unfortunately, there was only one week to Sundown by that point, and in a classic case of demoscene project management fail, I spent most of that week building an audio framework, leaving about 24 hours to write the actual demo. The end result is 9K of rather-flaky-performing code, hastily improvised plinky ambient music, and dreadful coder art (except to the extent that I&#8217;ve ripped it off from Fairlight demos).</p>
<ul>
<li><a href="http://fakeplasticcubes.demozoo.org/">Fake Plastic Cubes &#8211; online version</a></li>
<li><a href="http://fakeplasticcubes.demozoo.org/fake_plastic_cubes.zip">Fake Plastic Cubes &#8211; download (10Kb)</a></li>
<li><a href="http://pouet.net/prod.php?which=55778">Fake Plastic Cubes on Pouet</a></li>
</ul>
<p>Still, even if the execution this time didn&#8217;t work out, I think it&#8217;s been a worthwhile exercise in bringing pieces together. <a href="http://blog.nihilogic.dk/2008/05/compression-using-canvas-and-png.html">Jacob Seidelin&#8217;s PNG compression hack</a> (where JS code is stored in a PNG image to take advantage of the compression, then unpacked on a canvas using getImageData) has created a bit of a buzz in the JS development world, but this is the first time it&#8217;s been used in an actual demoscene production (which is surprising, given how the demoscene is the spiritual home of size-coding hacks). Ben Firshman&#8217;s <a href="http://benfirshman.com/projects/jsnes/">JSNES</a> has been dynamically generating audio for some time now, ardently chasing the moving target that is Mozilla&#8217;s <a href="https://wiki.mozilla.org/Audio_Data_API">Audio Data API</a> (with a trusty Flash snippet as a fallback), and <a href="http://www.p01.org/">Mathieu &#8216;p01&#8242; Henri</a> was experimenting with softsynths long before then. Not even my own code is safe from this cherry-picking exercise of doom &#8211; the 3D routines are a mishmash of <a href="http://matt.west.co.tt/demoscene/gallions-reach/">Gallions Reach / Canvastastic</a> (for the lighting model) and <a href="http://matt.west.co.tt/demoscene/antisocial/">Antisocial</a> (for the full scene / movable camera handling). Finally, <a href="http://nodejs.org/">node.js</a> makes a cameo appearance, because having an actual web server on hand makes development go a lot smoother.</p>
<p>Put them all together and you have the ingredients for a delicious 64K Intro cake. This time it came out a bit half-baked, but I&#8217;m passing on the recipe in the hope that someone else can make it work:</p>
<ul>
<li><b><a href="http://github.com/gasman/fakeplasticcubes/">Fake Plastic Cubes source code / framework, on Github</a></b></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/demoscene/fake-plastic-cubes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Antisocial</title>
		<link>http://matt.west.co.tt/demoscene/antisocial/</link>
		<comments>http://matt.west.co.tt/demoscene/antisocial/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 00:08:02 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=108</guid>
		<description><![CDATA[This is it then&#8230; my big comeback to the Javascript demo scene after a two year absence, and also the moment when my demo coding muse returned from a long holiday, I guess. Ladies and gentlemen, I give you&#8230; Antisocial, a biting satire on social networking phenomena. Visit the Antisocial microsite&#8230; With my characteristic lack [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/antisocial.png" width="177" height="200" alt="" style="float:right; border:8px solid silver;margin-left: 16px;" /> This is it then&#8230; my big comeback to the Javascript demo scene after a two year absence, and also the moment when my demo coding muse returned from a long holiday, I guess. Ladies and gentlemen, I give you&#8230; <strong>Antisocial</strong>, a biting satire on social networking phenomena.</p>
<p><strong><a href="http://antisocial.demozoo.org/">Visit the <em>Antisocial</em> microsite&#8230;</a></strong></p>
<p>With my characteristic lack of organisation, I found myself with two weeks to go to the <a href="http://sundowndemoparty.org/">Sundown</a> party, having promised a demo release, and with nothing specific in the pipeline. So, I decided to take a chance and run with an idea that had been sitting on top of my &#8220;demos to write when I have more free time than I do right now&#8221; pile for the best part of a year. I had it all planned out in my head, right down to the soundtrack: a mysterious track from an unlabelled CD I picked up at a <a href="http://myspace.com/zxspectrumorchestra">ZX Spectrum Orchestra</a> gig in 2005 (which turned out to be <i>Round</i>, from their Clive Live^3 EP). A quick bit of permission-getting later, and I was at the point of no return.</p>
<p>I knew it would be an ambitious job, and a bit of a leap artistically and technically from my usual stuff. I pencilled in a rough project plan in my diary. I drew up storyboards. I read up on the maths that was too nasty to contemplate on previous projects. And shockingly enough, I actually <em>enjoyed</em> all of the above.</p>
<p><span id="more-108"></span><br />
As it happens, browser technology (as far as the <tt>&lt;canvas&gt;</tt> element goes at least) has not moved on one jot in the last two years, so I was able to dust off the <a href="http://matt.west.co.tt/javascript/canvastastic-beta-1/">Canvastastic</a> codebase and found it still pleasantly usable and not too affected by code rot. I gave it a slightly more OpenGL-ish API (within the limitations of my &#8220;someone at the pub described it to me once&#8221; knowledge of OpenGL) and patched up the more glaring omissions (like Z-plane clipping, so that you can have polygons going behind the camera. Proper <a href="http://www.cubic.org/docs/3dclip.htm">frustum clipping</a> would have been a better idea, so that I didn&#8217;t end up with it trying to plot 20000&#215;40000 pixel triangles and sending Windows into a stroboscopic flashing fit and having to hack up a fix after the party. Macs are fine with it&#8230;).</p>
<p>The demo code was only half the job though; to handle the camera paths and synchronisation and the million other details where hard-coding wouldn&#8217;t cut it this time, I joined the big league of the demoscene by building a demo tool (still all in Javascript) that probably only I can understand. (It&#8217;s included in the final release, so have a play. I dare you.) As I didn&#8217;t have any meaningful experience in 3dMAX, or Flash, or Werkkzeug, or Quartz Composer, or any of the other things I really ought to have been using as reference points, it was a grand exercise in Making It Up As I Went Along. I&#8217;d almost forgotten how much fun it is to code that way, but naturally a fair few bad decisions came out of that as well. Firstly, it turns out that organising things around a timeline interface doesn&#8217;t really fit all that well; it means that every object and event is treated as independent of everything else, so things get a bit clunky when they have to share resources (such as lots of camera shots of the same scene). Looks like you can&#8217;t beat the good old boxes-and-arrows-all-over-the-place approach.</p>
<p>Secondly, and what probably comes as no surprise to anyone but me &#8211; Javascript is a bit horrible for building demo tools in. The demo itself, no problem &#8211; but for the user interface widgets I found myself constantly wishing for nice, sensible class-based inheritance. Yep, I know the language boffins will say that prototype-based OOP is more powerful, but I guess I&#8217;ve just had my mind addled by programming in the real world. I know of a few attempts to graft class-like behaviour onto Javascript, and that should probably be at the heart of any attempted rewrite of this. Alternatively, there&#8217;s a growing-but-not-quite-there-yet buzz around alternative scripting languages in the browser (just like there&#8217;s a buzz in the opposite direction for server-side Javascript), so perhaps it wouldn&#8217;t be out of the question to have a browser demo tool written in Ruby or Python. Or have the browser environment embedded in a ruby/python desktop app &#8211; at which point, why stop at browser demos? Could it be designed as a more general tool, where the browser is just one of many platforms that can be swapped in? It&#8217;s tempting. Onward and upward!</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/demoscene/antisocial/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Canvastastic beta_1 released</title>
		<link>http://matt.west.co.tt/javascript/canvastastic-beta-1/</link>
		<comments>http://matt.west.co.tt/javascript/canvastastic-beta-1/#comments</comments>
		<pubDate>Mon, 11 Sep 2006 22:52:41 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/javascript/canvastastic-beta-1/</guid>
		<description><![CDATA[The loose ends are now tied up and Canvastastic is ready for a not-chronically-rushed release. It&#8217;s now placed under a proper licence (the LGPL) and, more importantly, it has actual API documentation! Download: Canvastastic beta_1 (20K, .tar.gz) If you&#8217;re anything like me, you&#8217;ll probably be turning your nose up at having to download the thing [...]]]></description>
			<content:encoded><![CDATA[<p>The loose ends are now tied up and Canvastastic is ready for a not-chronically-rushed release. It&#8217;s now placed under a proper licence (the <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a>) and, more importantly, it has <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/doc/canvastastic.html">actual API documentation!</a></p>
<p>Download: <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1.tar.gz">Canvastastic beta_1</a> (20K, .tar.gz)</p>
<p>If you&#8217;re anything like me, you&#8217;ll probably be turning your nose up at having to <em>download</em> the thing just to see what the fuss is about, so I&#8217;m happy to oblige with some online demos&#8230;</p>
<ul>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/eg/boxes.html">Boxes</a> (demonstrates lighting and camera movement)</li>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/eg/robot.html">Robot</a> (demonstrates transforms and animation)</li>
<li>and finally, the <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/lib/canvastastic.js">library source</a> itself, for those wanting a spot of light bedtime reading.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/javascript/canvastastic-beta-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Canvastastic</title>
		<link>http://matt.west.co.tt/talks/canvastastic/</link>
		<comments>http://matt.west.co.tt/talks/canvastastic/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 23:55:02 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/talks/canvastastic/</guid>
		<description><![CDATA[At this weekend&#8217;s BarCamp London, I announced a new Javascript library which takes the 3D engine from my Gallions Reach demo and promises to place it in the hands of industrious web developers, hackers and masher-uppers everywhere. The presentation seemed to go down well, so it&#8217;s only right that I should get this first release [...]]]></description>
			<content:encoded><![CDATA[<p>At this weekend&#8217;s <a href="http://barcamp.org/BarCampLondon">BarCamp London</a>, I announced a new Javascript library which takes the 3D engine from my <a href="http://matt.west.co.tt/demoscene/gallions-reach/">Gallions Reach</a> demo and promises to place it in the hands of industrious web developers, hackers and masher-uppers everywhere. The presentation seemed to go down well, so it&#8217;s only right that I should get this first release out, as promised. Strictly raw materials right now (and still no real documentation), so be prepared to fill in the gaps&#8230;</p>
<ul>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_0.tar.gz">Canvastastic beta 0</a></li>
<li><a href="http://matt.west.co.tt/files/canvastastic/javascript_3d.pdf">Tales From The Third Dimension</a> &#8211; slides from the talk (PDF, 220K)</li>
<li>Additional (pre-&lt;canvas&gt;) examples were taken from my 2004 demo <a href="http://www.pouet.net/prod.php?which=13121">Mooncheese</a></li>
</ul>
<p>You shouldn&#8217;t have to wait too long for proper documentation, especially in view of the valiant effort <a href="http://simon.incutio.com/">Simon</a> has already made. That Willison is a crafty one, as anyone who witnessed him <a href="http://adactio.com/journal/1171/">pretending not to be a werewolf</a> will testify. I borrowed his laptop for my talk, and within half an hour of getting it back he&#8217;d trawled through the code I&#8217;d left on it and more or less written up the complete API documentation &#8211; and promptly set about drawing diagrams to explain 3D coordinate transformations. Zero-day w4r3z, anyone?</p>
<p>(technorati fodder: <a href="http://technorati.com/tag/Barcamp" rel="tag">barcamp</a>, <a href="http://technorati.com/tag/Barcamplondon" rel="tag">barcamplondon</a>, <a href="http://technorati.com/tag/Barcamplondon06" rel="tag">barcamplondon06</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/talks/canvastastic/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

