<?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>Canvas 3d JS Library &#187; c3dl development</title>
	<atom:link href="http://www.c3dl.org/index.php/category/c3dl-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.c3dl.org</link>
	<description>WebGL made easy!</description>
	<lastBuildDate>Fri, 09 Jul 2010 17:11:39 +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>SceneCreator0.3</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/scenecreator0-3/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/scenecreator0-3/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 16:24:37 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2651</guid>
		<description><![CDATA[SceneCaster is an online application that allows people to create “spaces” which are 3d scenes on the browsers and share them which other.  It is free to sign up and relatively  easy easy to use. The main problems with SceneCaster are the requirements: The operating systems used are Windows XP or Vista and the browser [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.scenecaster.com/web/home.php">SceneCaster</a> is an online application that allows people to create “spaces” which are 3d scenes on the browsers and share them which other.  It is free to sign up and relatively  easy easy to use. The main problems with SceneCaster are the requirements: The operating systems used are Windows XP or Vista and the browser must be FireFox or Internet Explorer. Also SceneCaster needs to install an application onto the users computer. These requirements limit the amount of people able to uses SceneCaster. I have created a demo using the <a href="http://www.c3dl.org/">c3dl </a>library, which uses <a href="http://www.khronos.org/webgl/">WebGL</a>, to create a demo of SceneCaster called SceneCreator. This will allow many people to use SceneCaster without installing any software or pug-ins and will support many different browsers.
<br />
<br />
SceneCreator  has its own <a href="http://github.com/asalga/SceneCreator">GitHub </a>, <a href="http://c3dl.lighthouseapp.com/projects/52892-scenecreator">LightHouse</a>, <a href="http://zenit.senecac.on.ca/wiki/index.php/SceneCreator">Website</a> and is worked on daily by Matthew Postill (me). If you would like to see the progression of SceneCreator you can check out my blog at <a href="http://sonnilion.wordpress.com/">http://sonnilion.wordpress.com/</a>. <span style="line-height: 25px">The demo is located <a href="http://matrix.senecac.on.ca/~mapostil/SceneCreator0.3/">here</a> (requires a <a href="http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL enabled browser</a>). The demo is on version  0.3 and has 3 views 2D, 3D, and Google 3D Warehouse. </span>
<h4 style="color: black;background-color: initial;font-weight: bold;margin-top: 0px;margin-right: 0px;margin-bottom: 0.3em;margin-left: 0px;padding-top: 0.5em;padding-bottom: 0.17em;border-bottom-width: initial;border-bottom-style: none;border-bottom-color: initial;font-size: 15px"><span>2D:</span></h4>
<ul>
	<li>display 3d object using bounding boxes, walls, lights, and enclosures in a 2d scene</li>
	<li>create wall</li>
	<li>insert lights</li>
	<li>new scene(delete all)</li>
	<li>walls, wall corner, and lights can be selected</li>
	<li>delete selected</li>
	<li>move selected</li>
</ul>
<h4 style="color: black;background-color: initial;font-weight: bold;margin-top: 0px;margin-right: 0px;margin-bottom: 0.3em;margin-left: 0px;padding-top: 0.5em;padding-bottom: 0.17em;border-bottom-width: initial;border-bottom-style: none;border-bottom-color: initial;font-size: 15px"><span>3D:</span></h4>
<ul>
	<li>add item to scene from the side bar</li>
	<li>item selection (clicking an item highs it blue and is set as the selected item) *wall are not selectable</li>
	<li>once an item is selected a user can (using the button above the scene):
<ul>
	<li>delete</li>
	<li>rotate</li>
	<li>move up/down</li>
	<li>scale</li>
	<li>copy</li>
	<li>move to position of the mouse</li>
</ul>
</li>
	<li>camera widget</li>
	<li>5 independent cameras</li>
        <li>save/load using local storage</li>
</ul>
<h4 style="color: black;background-color: initial;font-weight: bold;margin-top: 0px;margin-right: 0px;margin-bottom: 0.3em;margin-left: 0px;padding-top: 0.5em;padding-bottom: 0.17em;border-bottom-width: initial;border-bottom-style: none;border-bottom-color: initial;font-size: 15px"><span>Google Warehouse:</span></h4>
<ul>
	<li>view the Google 3D Warehouse website inside the browser</li>
	<li>back and forward functionality</li>
</ul>
Here is a demo of me creating a PacMan scene in only 3 minutes.
<a href='http://www.youtube.com/watch?v=YbXLaAsorLc'>SceneCreator Pacman</a>
<img src="http://www.c3dl.org/wp-content/uploads/2010/07/pacman2-300x181.jpg" alt="Pacman Scene" width="300" height="181" class="alignnone size-medium wp-image-2664" />]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/scenecreator0-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WWW2010 in Raleigh</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/www2010-in-raleigh/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/www2010-in-raleigh/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:43:04 +0000</pubDate>
		<dc:creator>Cathy Leung</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2645</guid>
		<description><![CDATA[Yesterday Andor and I gave a talk at www 2010.  It was about how mid level API&#8217;s can help web developers who may not wish to do extremely low level programming at the WebGL level achieve the 3D effects they want.   The &#8220;slides&#8221; from our talk can be found here.  The [...]]]></description>
			<content:encoded><![CDATA[Yesterday Andor and I gave a talk at www 2010.  It was about how mid level API&#8217;s can help web developers who may not wish to do extremely low level programming at the WebGL level achieve the 3D effects they want.   The &#8220;slides&#8221; from our talk can be found <a href="http://www.c3dl.org/wp-content/www2010/intro.html">here</a>.  The slides are not very content heavy.  However, we did update <a href="http://www.c3dl.org/index.php/webgl-demos/rts-prototype/">one demo</a> for our talk that sort of puts much of c3DL&#8217;s features in play.  Here is a <a href="http://www.youtube.com/watch?v=QzE2QUW2R1w">video</a> of that demo.<br /><br />
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/QzE2QUW2R1w&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QzE2QUW2R1w&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
<br /><br />
Al MacDonald and my colleague David Humphrey also gave a talk about the <a href="http://vocamus.net/dave/?cat=25">Audio API </a>which was absolutely fantastic.  They had some really neat music visualization demos going.  Here is a l<a href="http://vocamus.net/dave/?p=1074">ink to their talk</a>.  In particular, check out the videos for these two demos (<a href="http://vimeo.com/11345262">demo1</a>, <a href="http://vimeo.com/11345685">demo2</a>)  that which are webGL based music visualizers. There are links from Dave&#8217;s blog if you want an audio build of minefield to check them out live.
]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/www2010-in-raleigh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Motionview</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/motionview-2/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/motionview-2/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 16:22:37 +0000</pubDate>
		<dc:creator>Cathy Leung</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2640</guid>
		<description><![CDATA[A long while ago I blogged about a web project that came out of c3dl called motionview and even made a video of it.  I&#8217;m happy to announce that we have now put up a motionview server with some test data that we can let people try out. The server has been updated to [...]]]></description>
			<content:encoded><![CDATA[A long while ago I blogged about a web project that came out of c3dl called motionview and even made a video of it.  I&#8217;m happy to announce that we have now put up a motionview server with some test data that we can let people try out. The server has been updated to use WebGL. However, it does require setting up of id and password so I can&#8217;t just provide a link.   If you have interest in trying motionview please <a href="http://www.c3dl.org/index.php/contact/">contact us</a> for id and password.
<br /><br />
For those that have not seen it, here is the old video again (this video was made when it was still canvas3D but the server we are running now uses WebGL):

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/I2QHRj_gWvI&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/I2QHRj_gWvI&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/motionview-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On the train to Mountainview</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/on-the-train-to-mountainview/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/on-the-train-to-mountainview/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 18:45:04 +0000</pubDate>
		<dc:creator>Cathy Leung</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2551</guid>
		<description><![CDATA[This is now my 3rd year attending GDC in San Francisco.  As with other years I usually take this opportunity to visit with my professor who resides in Mountainview, California and use the time on the train to write a post about C3DL, a summary of the year and things to come.  In [...]]]></description>
			<content:encoded><![CDATA[This is now my 3rd year attending <a href="http://www.gdconf.com/index.html">GDC</a> in San Francisco.  As with other years I usually take this opportunity to visit with my professor who resides in Mountainview, California and use the time on the train to write a post about C3DL, a summary of the year and things to come.  In the first year, C3DL had just barely begun.  All we had were a <a href="http://cleung.wordpress.com/2008/02/19/4-spinning-cubes/">couple of spinny cubes</a>.  Nothing to write home about really but it was a start.  With the extraordinary work put into the project by Andor Salga, and many others, the project showed vast improvements by the <a href="http://www.c3dl.org/index.php/c3dl-dev/has-it-been-a-year-already/">second year</a>.  We were loading Collada models, we had the foundations of a pretty cool project.  Khronos had just announced its <a href="http://www.khronos.org/news/press/releases/khronos-launches-initiative-for-free-standard-for-accelerated-3d-on-web/">specification for what would become WebGL</a> which means applications made with our library would eventually become usable by any browser that supported WebGL.   When we first started, we had to use the Canvas 3D addon and it was only available for Firefox.  Today, with WebGL, applications made with C3DL work in pre-release versions of Chrome, Firefox and Safari.
<br />
<br />
We continued working on the library and added several more features.  We were also very fortunate to begin work on a different project which gave us the opportunity to actually use the technology that we had built.  That project resulted in a web application named <a href="http://www.youtube.com/watch?v=I2QHRj_gWvI">Motionview</a>. 
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/I2QHRj_gWvI&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/I2QHRj_gWvI&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
<br />
Motionview allows an artist to remotely preview and select portions of motion capture shots made at a studio.  Initially we were involved with the project to work only on a data converter for the web application.  The viewer for the web app was originally going to be done using flash.  However, we saw how this project was closely tied with C3DL.  After all this application allowed the viewing of an actor&#8217;s movement in 3D space.  We introduced this idea to our partners on the project and they agreed to use it.  I would like to thank both <a href="http://www.bedlamgames.com/">Bedlam Games </a>and the <a href="http://navarra.ca/">Navarra group</a> for applying our library in a real web application.  If you are interested in trying out Motionview, please contact me.
<br />
<br />

In the fall Andor,  went back to school full time and did some amazing work for the <a href="http://processingjs.org/">processing.js</a> project as part of his open source class.  He continued to work on C3DL part time during his studies and we made the port over to WebGL.  In early February I had been invited to speak as part of a K<a href="https://www.cmpevents.com/GD10/a.asp?option=C&#038;V=11&#038;SessID=10554">hronos sponsored session at GDC</a> and thus I am here for my third year. 
<br />
<br />

This coming summer promises to be very interesting.  We will be working with some industry partners to develop our library and to add some really interesting WebGL based applications.  Like the development of the motion capture application, these applications will help us add new features to C3DL.]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/on-the-train-to-mountainview/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C3DL 2.0-WebGL and beyond</title>
		<link>http://www.c3dl.org/index.php/c3dl-news/c3dl-2-0-webgl-and-beyond/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-news/c3dl-2-0-webgl-and-beyond/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 05:59:12 +0000</pubDate>
		<dc:creator>Cathy Leung</dc:creator>
				<category><![CDATA[C3DL News]]></category>
		<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2480</guid>
		<description><![CDATA[It has been a long time coming but we have now updated all the core features of C3DL to use WebGL.  You can dowload our 2.0 release here.  We have also updated all our demos to use WebGL.  Our tutorials have all been updated (tutorial 5 and 6 needs a better example [...]]]></description>
			<content:encoded><![CDATA[It has been a long time coming but we have now updated all the core features of C3DL to use<a href="http://en.wikipedia.org/wiki/WebGL"> WebGL.</a>  You can dowload our 2.0 release <a href="http://www.c3dl.org/index.php/download/">here.</a>  We have also updated all our <a href="http://www.c3dl.org/index.php/webgl-demos/">demos</a> to use WebGL.  Our <a href="http://www.c3dl.org/index.php/tutorials/">tutorials</a> have all been updated (tutorial 5 and 6 needs a better example but we&#8217;re getting to it).  Our <a href="http://www.c3dl.org/index.php/documentation/">documentation</a> has also been updated for release 2.0
<br /><br />

C3DL 2.0 includes the following features:
 
<ul>
	<li>uses WebGL (as opposed to Canvas 3D) &#8211; you will need a WebGL enabled browser to see demos (see <a href="http://www.c3dl.org/index.php/tutorials/tutorial-1-browsers/">tutorial #1</a> on how to do this)</li>

	<li>ports all c3dl features including:</li>

 <ul>
	<li> Collada model loading</li>
<li>Picking</li>
<li>Lighting System</li>
<li>camera system</li>
<li>Particle system</li>
<li>Effects system that allows a swappable shader to be applied to alter its look.  Currently we have the following effects implements:
<ul>
<li>cartoon (with or without outlines)</li>
<li>greyscale</li>
<li>solid colour</li>
<li>sepia</li>
<li>gooch</li>
</ul>
</ul>
<li>lines and dots</li>
</ul>

Many of these features can be observed in our <a href="http://www.c3dl.org/index.php/webgl-demos/asteroids-3d/">Asteroids-3D</a> demo.  (click on rocks to fire at them).

We have also moved our <a href="http://github.com/cathyatseneca/c3dl">repository onto github</a> and a <a href="http://c3dl.lighthouseapp.com/projects/42081-c3dl/overview">bug tracker at lighthouse</a>.

Try it out and give us some feedback! <img src='http://www.c3dl.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> 

If you are looking for our Canvas 3D related demos please check our Archive link.]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-news/c3dl-2-0-webgl-and-beyond/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Preliminary WebGL RTS Game</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/preliminary-webgl-rts-game/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/preliminary-webgl-rts-game/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:08:08 +0000</pubDate>
		<dc:creator>Andor Salga</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2329</guid>
		<description><![CDATA[Cathy asked me to make a cool demo using our library. After thinking about, I started getting many ideas, but creating a preliminary real-time strategy game made the most sense. It not only demonstrates a lot of C3DL features such as model loading, transformations, lighting, shaders, picking, cameras, textures, etc, but since animation is kept [...]]]></description>
			<content:encoded><![CDATA[<a href="http://cleung.wordpress.com/">Cathy</a> asked me to make a <a href="http://www.c3dl.org/wp-content/blog_demos/rts/rts/">cool demo</a> using our library. After thinking about, I started getting many ideas, but creating a preliminary real-time strategy game made the most sense. It not only demonstrates a lot of C3DL features such as model loading, transformations, lighting, shaders, picking, cameras, textures, etc, but since animation is kept to a minimum, the frame rate on slower machines shouldn&#8217;t be a big deal.<br />
<br />
You&#8217;ll need a <a href="http://www.khronos.org/webgl/">WebGL</a>-compatible browser to run it. You can either download <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">Minefield</a>, <a href="http://nightly.webkit.org/">WebKit</a> or <a href="http://build.chromium.org/buildbot/snapshots/">Chromium</a>. Please let us know if it fails to load. Keep in mind I hacked this thing together in a day so the code isn&#8217;t pretty, but <a href="http://www.c3dl.org/wp-content/blog_demos/rts/rts/">here it is anyway</a>!

<a href="http://www.c3dl.org/wp-content/blog_demos/rts/rts/"><img src="http://asalga.files.wordpress.com/2010/02/snapshot-2010-02-15-15-15-391.jpg" alt="" title="Snapshot 2010-02-15 15-15-39" width="460" height="410" class="alignnone size-full wp-image-1182" /></a>]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/preliminary-webgl-rts-game/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asteroids in 3D&#8230; and a bit of 2D</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/asteroids-in-3d-and-a-bit-of-2d/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/asteroids-in-3d-and-a-bit-of-2d/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 11:12:55 +0000</pubDate>
		<dc:creator>Cathy Leung</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2271</guid>
		<description><![CDATA[So I&#8217;ve been working on this little demo in preparation for the upcoming (very very soon&#8230;docs left only) release of C3DL&#8217;s webGL release.  I adapted it from Peter Callaghan&#8217;s Asteroids game and the models were from an old demo made as part of our user testing last year.

This demo is kind of cool because [...]]]></description>
			<content:encoded><![CDATA[So I&#8217;ve been working on this little demo in preparation for the upcoming (very very soon&#8230;docs left only) release of C3DL&#8217;s webGL release.  I adapted it from Peter Callaghan&#8217;s Asteroids game and the models were from an old demo made as part of our user testing last year.

This demo is kind of cool because it demonstrates many of the features of C3DL and puts it all together in one.  Namely it uses:
<ul>
	<li>collada model loading &#8211; you can export to collada from a good number of modeling programs including blender, 3ds max and google sketchup</li>
	<li>particle systems &#8211; watch the rocks when they explode!</li>
	<li>lighting &#8211; ok&#8230; this is not featured well&#8230; I&#8217;ll try to see if I can do better with it</li>
	<li>picking &#8211; click on rock to identify which one</li>
</ul>
I will probably add something to that uses the effects system as that is one key component not highlighted.

Its not quite done yet but I figured I&#8217;d link it anyways since I won&#8217;t have time to finish it till probably Wednesday&#8230;. I still have to add scoring and end game functionalities, the keys should be changed to a and d instead of using arrows,  and I think my health bar is messed up when it drops below 25 but&#8230; its a start.  I also have not tested well on webkit (there was a bug of constantly rotating ship at one point but have not been able to reproduce it) and I can&#8217;t seem to run chrome on my desktop atm so no testing there.

This demo uses webGL in the main display and I painted the hud with 2D canvas.

Click on the asteroids to shoot them.  Use arrow keys to rotate the ship.

<a href="https://cs.senecac.on.ca/~catherine.leung/c3dl/Asteroids3/asteroids.html">https://cs.senecac.on.ca/~catherine.leung/c3dl/Asteroids3/asteroids.html
</a>
NOTE:  To see this demo you need a web browser that supports webGL and it must be enabled.]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/asteroids-in-3d-and-a-bit-of-2d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Another demo updated</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/another-demo-updated/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/another-demo-updated/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 21:25:35 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2259</guid>
		<description><![CDATA[I&#8217;ve just finished updating the particle systems demo.  There wasn&#8217;t anything wrong with the demo itself, but there was an array in the particle system class that wasn&#8217;t being initialized properly that suddenly started causing Minefield to crash.  The strange thing is that until recently Minefield wasn&#8217;t complaining about it.  But as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished updating the <a href="http://www.c3dl.org/index.php/webgl-demos/particle-systems-demo">particle systems demo</a>.  There wasn&#8217;t anything wrong with the demo itself, but there was an array in the particle system class that wasn&#8217;t being initialized properly that suddenly started causing Minefield to crash.  The strange thing is that until recently Minefield wasn&#8217;t complaining about it.  But as of the nightly build on the 23rd it didn&#8217;t just complain, it outright crashed.  By populating the array with 0s when it is initialized, I&#8217;ve got particles working again.  The misleading problem was that this happened at the same time I was fixing an issue with colours for Chromium was preventing it from displaying.  It started crashing one browser at the same time I fixed a problem for another.  It turns out that was caused because colour values were being read out of a file and split into an array, but they were never explicitly made into floating point values.  Minefield and Webkit understood them as such anyway, but Chromium didn&#8217;t like that.  A temporary solution was to multiply the values by 1 before using them, but that isn&#8217;t a very good solution.  Once I actually traced the problem to its source, a quick parseFloat took care of it.  Slightly slower, but more correct.<p>]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/another-demo-updated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simplifying the Interface</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/simplifying-the-interface/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/simplifying-the-interface/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 22:37:24 +0000</pubDate>
		<dc:creator>Andor Salga</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2156</guid>
		<description><![CDATA[Something we need to do is simplify the C3DL library interface. When approaching such tasks, one method I found extremely useful was to analyze the code in terms of the interface, or that is from the user&#8217;s perspective. To do this I first created a basic demo of a spinning cube by writing the necessary [...]]]></description>
			<content:encoded><![CDATA[Something we need to do is simplify the C3DL library interface. When approaching such tasks, one method I found extremely useful was to analyze the code in terms of the interface, or that is from the user&#8217;s perspective. To do this I first created a basic demo of a spinning cube by writing the necessary HTML and JavaScript files. As for the HTML, it will need to be something like this:<br />
(I emphasized the code which potentially could be changed)

<pre>&lt;html&gt;

  &lt;head&gt;
    &lt;title&gt;Cavas3D Demo&lt;/title&gt;
    <b>&lt;script&gt;var SCRIPT_PATH = '../../canvas3dapi/'&lt;/script&gt;</b>
    &lt;script src="../../canvas3dapi/c3dapi.js"&gt;&lt;/script&gt;
    <b>&lt;script src="basic_demo.js"&gt;&lt;/script&gt;</b>
  &lt;/head&gt;

  &lt;body&gt;
    <b>&lt;canvas id="demo" width="500" height="500"&gt;&lt;/canvas&gt;</b>
  &lt;/body&gt;

&lt;/html&gt;</pre>

It would be great if this could be simplified to something like this:

<pre>&lt;html&gt;

  &lt;head&gt;
    &lt;title&gt;Cavas3D Demo&lt;/title&gt;
    &lt;script src="../../canvas3dapi/c3dapi.js"&gt;&lt;/script&gt;
  &lt;/head&gt;

  &lt;body&gt;
    <b>&lt;canvas datasrc="basic_demo.js" id="demo" width="500" height="500"&gt;
    &lt;/canvas&gt;</b>
  &lt;/body&gt;

&lt;/html&gt;</pre>

I removed the somewhat unintuitive SCRIPT_PATH variable and moved the basic_demo.js resource into the canvas tag making it more obvious which .js file is associated to which canvas. These changes haven&#8217;t actually been made, I&#8217;m just playing with possible changes, brainstorming which parts <i>might</i> be able to be modified.<br />
<br />
Now, very few changes were made here and it will probably require a significant amount of effort to make it work. But this work is justified by the fact that the user&#8217;s experience and first impression will be more positive. If the user has to spend more than a few minutes trying to get a simple example to render, they&#8217;ll probably look for alternatives.<br />
<br />
Let&#8217;s see how the JavaScript could be changed. Right now, you need to write something like this:<br />
(Again, I emphasized the code which potentially could be changed)

<pre><b>c3dl.addModel('cube.dae');
c3dl.addMainCallBack(mainDemo, 'demo');</b>

function mainDemo(canvasName)
{
  var scn = new c3dl.Scene();		
  <b>scn.setCanvasTag(canvasName);
  var renderer = new c3dl.OpenGLES20();
  scn.setRenderer(renderer);
  scn.init();</b>
  
  var cam = new c3dl.FreeCamera();
  cam.setPosition([0,0,50]);
  cam.setLookAtPoint([0,0,-1]);

  var cube = new c3dl.Collada();
  cube.init('cube.dae');
  cube.setAngularVel([0.001,0.001,0.0]);

  scn.addObjectToScene(cube);
  scn.setCamera(cam);
  scn.startScene();
}</pre>

Some changes I had in mind involved getting rid of the global c3dl.addModel() and c3dl.addMainCallback() calls and changing OpenGLES20 to just Renderer. The Renderer is an interesting problem. When <a href="http://www.khronos.org/webgl/">WebGL</a> started out as <a href="https://wiki.mozilla.org/Canvas:3D">Canvas3D</a>, we called the renderer OpenGLES11, then later it became OpenGLES20 and now it <i>could probably</i> be WebGL. Considering how much it has changed and will change, we&#8217;ll have to invest some time to make this stop. One simple solution is to abstract the renderer.<br />
<br />
For example, if we change OpenGLES20 class to Renderer, the user will no longer need to be concerned what underlying rendering method is used. If a visitor loads the user&#8217;s demo, but visitor&#8217;s browser doesn&#8217;t support WebGL (i.e. it&#8217;s I.E.), the demo still loads. This of course only works if we accommodate for this case. So if the browser is IE, we use DirectX. If the browser supports WebGL, we use that. The end result is the user&#8217;s page will create the appropriate renderer without them needing to worry about the user&#8217;s browser. So let&#8217;s look at what lines changed:

<pre>function mainDemo(canvasName)
{
  var scn = new c3dl.Scene();
  <b>var renderer = new c3dl.Renderer();
  scn.init(renderer);</b>
  
  var cam = new c3dl.FreeCamera();
  cam.setPosition([0,0,50]);
  cam.setLookAtPoint([0,0,-1]);

  var cube = new c3dl.Collada();
  cube.init('cube.dae');
  cube.setAngularVel([0.001,0.001,0.001]);

  scn.addObjectToScene(cube);  
  scn.setCamera(cam);
  scn.startScene();
}</pre>

In terms of the lines trimmed, I&#8217;m not certain how much of it is viable. The reason some of the seemingly redundant code is required was because I couldn&#8217;t devise any alternative at the time. Looking at it from a different perspective, I should be able to come up with something. In the end we&#8217;ll have an interface which is more flexible, easier to understand and of course simple.]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/simplifying-the-interface/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Updating Demos</title>
		<link>http://www.c3dl.org/index.php/c3dl-dev/updating-demos/</link>
		<comments>http://www.c3dl.org/index.php/c3dl-dev/updating-demos/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:40:09 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[c3dl development]]></category>

		<guid isPermaLink="false">http://www.c3dl.org/?p=2146</guid>
		<description><![CDATA[I&#8217;m continuing to update the demos with the copy of the library that works cross-browser (and will continue to do so).  There was a slight delay in the motion capture demo due to the difference in how the browsers read xml files.  We had been using:

xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.async = false;
xmlDoc.load(xmlFile);

but Safari and Chrome [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m continuing to update the demos with the copy of the library that works cross-browser (and will continue to do so).  There was a slight delay in the motion capture demo due to the difference in how the browsers read xml files.  We had been using:</p>
<pre>
xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.async = false;
xmlDoc.load(xmlFile);
</pre>
<p>but Safari and Chrome don&#8217;t accept that.  After a quick search (ignoring the pages that make it sound more complicated than it is and want to sell you code to take care of it) I found the answer to be quite simple.</p>
<pre>
xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.async = false;
var xmlReq = new XMLHttpRequest();
xmlReq.open("GET", xmlFile, false);
xmlReq.send(null);
xmlDoc=xmlReq.responseXML;
</pre>
<p>It ends up as a few extra lines, but it works for all three.  This was a problem with the code for that individual page, but it seems to be the kind of thing we can expect when trying to write complex code for multiple browsers.</p>

<p>I&#8217;ll be working on the particle systems demo next, as it also has a bit of code that is firefox only.</p>]]></content:encoded>
			<wfw:commentRss>http://www.c3dl.org/index.php/c3dl-dev/updating-demos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
