<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>sheetengine Wiki Rss Feed</title><link>https://sheetengine.codeplex.com/</link><description>sheetengine Wiki Rss Description</description><item><title>New Comment on "Rendering large scenes"</title><link>https://sheetengine.codeplex.com/wikipage?title=Rendering large scenes&amp;ANCHOR#C32127</link><description>Hi,&amp;#10;&amp;#10;I&amp;#39;m having some problems moving the camera view around a large scene map I have created. &amp;#10;&amp;#10;I am creating and destroying tiles using the loadAndRemoveSheets&amp;#40;&amp;#41; as demonstrated in the demo files. &amp;#10;&amp;#10;When I use the around keys to move around the map the correct tiles are being destroyed and create but they no not get set to the center of the canvas. Thus I can see other tiles on the map but only for as far as the canvas&amp;#39;s height and width. Is it possible to position the newly selected center tile at the center of the canvas&amp;#63; &amp;#10;&amp;#10;Thanks</description><author>Freid001</author><pubDate>Sun, 03 Jan 2016 00:50:16 GMT</pubDate><guid isPermaLink="false">New Comment on "Rendering large scenes" 20160103125016A</guid></item><item><title>New Comment on "Collision detection"</title><link>https://sheetengine.codeplex.com/wikipage?title=Collision detection&amp;ANCHOR#C27388</link><description>&amp;#34;densityMap.sheetengine.addSheets&amp;#40;sheetengine.sheets&amp;#41;&amp;#59;&amp;#34; &amp;#10;You wanted to say densityMap.addSheets&amp;#40;sheetengine.sheets&amp;#41;&amp;#59; isn&amp;#39;t it &amp;#63;</description><author>damdirt</author><pubDate>Sun, 05 May 2013 10:01:02 GMT</pubDate><guid isPermaLink="false">New Comment on "Collision detection" 20130505100102A</guid></item><item><title>Updated Wiki: Home</title><link>http://sheetengine.codeplex.com/wikipage?version=26</link><description>&lt;div class="wikidoc"&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=421585" alt="features.png" title="features.png" /&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;Sheetengine is an HTML5 canvas based JavaScript display engine for rendering isometric scenes built up of sheets. Features include:
&lt;ul&gt;&lt;li&gt;z-ordering,&lt;/li&gt;
&lt;li&gt;shadows with adjustable light source,&lt;/li&gt;
&lt;li&gt;sheet intersections,&lt;/li&gt;
&lt;li&gt;custom textures with transparent regions,&lt;/li&gt;
&lt;li&gt;custom view transformations,&lt;/li&gt;
&lt;li&gt;density map for collision detection,&lt;/li&gt;
&lt;li&gt;server side support for &lt;a href="http://nodejs.org"&gt;node.js&lt;/a&gt; and &lt;a href="https://github.com/learnboost/node-canvas"&gt;node-canvas&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
Sheetengine is the display engine of &lt;a href="https://www.crossyards.com"&gt;https://www.crossyards.com&lt;/a&gt;, the online building and gaming platform. Watch the Crossyards intro video to get a picture of what sheetengine is capable of:&lt;br /&gt;&lt;br /&gt;&lt;div class="video" style="text-align:Center"&gt;&lt;span class="player"&gt;&lt;object height="375px" width="500px"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_zDYS8N6rtI"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed height="375px" width="500px" type="application/x-shockwave-flash" wmode="transparent" src="http://www.youtube.com/v/_zDYS8N6rtI" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="external"&gt;&lt;a href="http://www.youtube.com/watch?v=_zDYS8N6rtI" target="_blank"&gt;Launch in another window&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;h1&gt;Examples&lt;/h1&gt;You can find offline examples in &lt;a href="http://sheetengine.codeplex.com/downloads/get/571466"&gt;sheetengine-examples.zip&lt;/a&gt; on the Downloads page.&lt;br /&gt;
&lt;hr /&gt;
&lt;h1&gt;Documentation&lt;/h1&gt;Full documentation is available on the &lt;a href="http://sheetengine.codeplex.com/documentation?referringTitle=Home"&gt;Documentation&lt;/a&gt; page.&lt;br /&gt;
&lt;hr /&gt;
&lt;h1&gt;A quick example: a moving/rotating object&lt;/h1&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=421586" alt="demo.png" title="demo.png" /&gt;&lt;br /&gt;The html markup will be very simple. We use an HTML5 canvas, and reference two javascripts: the sheetengine and our custom script in example.js:&lt;br /&gt;&lt;pre&gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;canvas id=&amp;quot;mainCanvas&amp;quot; width=&amp;quot;500&amp;quot; height=&amp;quot;300&amp;quot;&amp;gt;
    &amp;lt;/canvas&amp;gt;
    &amp;lt;script src=&amp;quot;sheetengine.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;example.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The following is the contents of the example.js - the implementation of our custom logic. After initializing the sheetengine we create a basesheet and a custom object made up of two sheets. We define a function to be called periodically in which we move/rotate the object and render the scene:&lt;br /&gt;&lt;pre&gt;
function init() {
  // initialize the sheetengine
  var canvasElement = document.getElementById(&amp;#39;mainCanvas&amp;#39;);
  sheetengine.scene.init(canvasElement, {w:600,h:400});
  
  // define a basesheet
  sheetengine.scene.tilewidth = 200;
  var basesheet = new sheetengine.BaseSheet({x:0,y:0,z:0}, {alphaD:90,betaD:0,gammaD:0}, {w:200,h:200});
  basesheet.color = &amp;#39;#70a050&amp;#39;;

  // define a custom object
  var sheet1 = new sheetengine.Sheet({x:0,y:-14,z:14}, {alphaD:45,betaD:0,gammaD:0}, {w:40,h:40});
  sheet1.context.fillStyle=&amp;#39;#F00&amp;#39;;
  sheet1.context.fillRect(0,0,40,40);
  sheet1.context.clearRect(10,10,20,20);

  var sheet2 = new sheetengine.Sheet({x:0,y:14,z:14}, {alphaD:-45,betaD:0,gammaD:0}, {w:40,h:40});
  sheet2.context.fillStyle=&amp;#39;#FFF&amp;#39;;
  sheet2.context.fillRect(0,0,40,40);
  sheet2.context.clearRect(10,10,20,20);

  var obj = new sheetengine.SheetObject({x:-50,y:-50,z:0}, {alphaD:0,betaD:0,gammaD:0}, [sheet1, sheet2], {w:80,h:80,relu:40,relv:50});
  
  sheetengine.calc.calculateChangedSheets();
  sheetengine.drawing.drawScene(true);
  
  // move object around
  var maxsteps = 20;
  var steps = 0;
  var direction = {x:5, y:0, z:0};
  var rotate = false;
  setInterval(function() {
    if (rotate) {
      obj.rotate({x:0, y:0, z: 1}, Math.PI/2/maxsteps);
      if (++steps &amp;gt;= maxsteps) {
        steps = 0;
        rotate = false;
      }
    } else {
      obj.move(direction);
      if (++steps &amp;gt;= maxsteps) {
        if (direction.x == 5) { direction.x = 0; direction.y = 5; }
        else if (direction.y == 5) { direction.x = -5; direction.y = 0; }
        else if (direction.x == -5) { direction.x = 0; direction.y = -5; }
        else if (direction.y == -5) { direction.x = 5; direction.y = 0; }
        steps = 0;
        rotate = true;
      }
    }
	
    // calculate sheets and draw scene
    sheetengine.calc.calculateChangedSheets();
    sheetengine.drawing.drawScene();
  }, 30);
};

init();
&lt;/pre&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Fri, 22 Feb 2013 16:20:39 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130222042039P</guid></item><item><title>New Comment on "Creating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Creating objects&amp;ANCHOR#C26537</link><description>Have you think in create some script to convert obj in sheet object&amp;#63; Or take the Three.js format to render objects in sheetengine&amp;#63;&amp;#10;&amp;#10;Have a look this links&amp;#58;&amp;#10;&amp;#10;http&amp;#58;&amp;#47;&amp;#47;mrdoob.github.com&amp;#47;three.js&amp;#47;examples&amp;#47;canvas_materials_normal.html&amp;#10;http&amp;#58;&amp;#47;&amp;#47;mrdoob.github.com&amp;#47;three.js&amp;#47;examples&amp;#47;obj&amp;#47;WaltHeadLo.js&amp;#10;https&amp;#58;&amp;#47;&amp;#47;github.com&amp;#47;mrdoob&amp;#47;three.js&amp;#47;blob&amp;#47;master&amp;#47;utils&amp;#47;converters&amp;#47;obj&amp;#47;convert_obj_three.py&amp;#10;&amp;#10;Very nice library&amp;#33; &amp;#58;&amp;#41;</description><author>Josenzo</author><pubDate>Wed, 13 Feb 2013 22:16:10 GMT</pubDate><guid isPermaLink="false">New Comment on "Creating objects" 20130213101610P</guid></item><item><title>New Comment on "Moving / rotating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;ANCHOR#C26320</link><description>I meant obj.centerp, sry.</description><author>dobsonl</author><pubDate>Sun, 27 Jan 2013 01:32:39 GMT</pubDate><guid isPermaLink="false">New Comment on "Moving / rotating objects" 20130127013239A</guid></item><item><title>New Comment on "Creating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Creating objects&amp;ANCHOR#C26319</link><description>No, it is designed to always be positioned relative to the object center as reflected by obj.centerp. You should set canvasSize initially to a value that is big enough to enclose the object after sheet rotations. Also make sure that sheets are always positioned so that obj.centerp always stays at the center of the object &amp;#40;you could move all sheets relative to centerp to a distant location, but I would not consider it as a correct object model, centerp should always fall near to the geometrical centrum of sheets&amp;#41;.</description><author>dobsonl</author><pubDate>Sun, 27 Jan 2013 01:31:57 GMT</pubDate><guid isPermaLink="false">New Comment on "Creating objects" 20130127013157A</guid></item><item><title>New Comment on "Moving / rotating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;ANCHOR#C26318</link><description>Ok, I took note of the polygonorder and shadow issue. Thanks for the comments. About rotation with a distance&amp;#58; you could use the geometry.rotateAroundArbitraryAxis function on the obj.center object as first parameter, the axispoint as the second, axisdirection as third and angle as fourth. And also set the orientation of the object using obj.setOrientation.</description><author>dobsonl</author><pubDate>Sun, 27 Jan 2013 01:27:03 GMT</pubDate><guid isPermaLink="false">New Comment on "Moving / rotating objects" 20130127012703A</guid></item><item><title>Updated Wiki: Moving / rotating objects</title><link>http://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Moving / rotating objects&lt;/h1&gt;To move an object to a specific position you can use the following function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;obj.setPosition(targetp);
&lt;/pre&gt;where targetp is a JSON with x,y,z keys. To move an object with a displacement vector use the following syntax:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;obj.move(displacement);
&lt;/pre&gt;where displacement is a JSON with x,y,z keys. To set the absolute orientation of an object use the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
obj.setOrientation(orientation);
&lt;/pre&gt;where orientation is a JSON with alpha, beta, gamma keys with radian values or alphaD, betaD, gammaD keys with degree values. To rotate an object relative to its current orientation, use the following function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;obj.rotate(axis, angle);
&lt;/pre&gt;where axis is a JSON with x,y,z keys and angle is given in radians. Please note, that the axis must be normalized before passing it to the rotate function (meaning length of axis must be equal to 1).&lt;br /&gt;		&lt;br /&gt;Examples:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
obj.setPosition({x:100,y:150,z:10});
obj.move({x:10,y:0,z:0});
obj.rotate({x:0,y:0,z:1}, Math.PI / 2);
obj.setOrientation({alphaD: 0, betaD: 0, gammaD: 60});
&lt;/pre&gt;To render the scene after changing the states of objects use the following function calls:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sheetengine.calc.calculateChangedSheets();
sheetengine.drawing.drawScene();
&lt;/pre&gt;Be sure to only call these functions once in every frame iteration - after you have moved / rotated all your objects.&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Sun, 27 Jan 2013 01:00:23 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Moving / rotating objects 20130127010023A</guid></item><item><title>New Comment on "Moving / rotating objects"</title><link>https://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;ANCHOR#C26200</link><description>Hi there,&amp;#10;&amp;#10;I discovered &amp;#40;with trial and error&amp;#41; that the method &amp;#39;calculatePolygonOrder&amp;#40;polygon&amp;#41; is a very expensive method. Even when shadows are off, it still calculates polygon order for shadows. &amp;#10;So maybe, make sure he doesn&amp;#39;t calculate unnecessary shadow calculations, when shadows are off&amp;#63;&amp;#10;&amp;#10;Great library by the way&amp;#33;</description><author>Obi2Kenoby</author><pubDate>Tue, 15 Jan 2013 11:21:11 GMT</pubDate><guid isPermaLink="false">New Comment on "Moving / rotating objects" 20130115112111A</guid></item><item><title>New Comment on "Moving / rotating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;ANCHOR#C26086</link><description>Hi,&amp;#10;&amp;#10;Is there an easy way to rotate an object the same way as the object.rotateSheet method&amp;#63;&amp;#10;So you can add a distance from the rotation vector to it&amp;#63;&amp;#10;&amp;#10;obj.rotateSheet&amp;#40;sheet, AXISPOINT, axisDirection, angle&amp;#41;&amp;#59;&amp;#10;&amp;#10;I&amp;#39;ve tried it manualy with a combination of rotation &amp;#40;around its own axis&amp;#41; and translation, &amp;#10;but I get to many rounding errors, and it is not a very efficient way to do it.&amp;#10;&amp;#10;grtz.</description><author>Obi2Kenoby</author><pubDate>Fri, 04 Jan 2013 16:22:01 GMT</pubDate><guid isPermaLink="false">New Comment on "Moving / rotating objects" 20130104042201P</guid></item><item><title>New Comment on "Moving / rotating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Moving / rotating objects&amp;ANCHOR#C26085</link><description>Hi,&amp;#10;&amp;#10;Is there an easy way to rotate an object the same way as the object.rotateSheet method&amp;#63;&amp;#10;So you can add a distance from the rotation vector to it&amp;#63;&amp;#10;obj.rotateSheet&amp;#40;sheet, &amp;#60;b&amp;#62;axisPoint&amp;#60;&amp;#92;b&amp;#62;, axisDirection, angle&amp;#41;&amp;#59;&amp;#10;&amp;#10;I&amp;#39;ve tried it manualy with a combination of rotation &amp;#40;around its own axis&amp;#41; and translation, &amp;#10;but I get to many rounding errors, and it is not a very efficient way to do it.&amp;#10;&amp;#10;grtz.</description><author>Obi2Kenoby</author><pubDate>Fri, 04 Jan 2013 16:21:26 GMT</pubDate><guid isPermaLink="false">New Comment on "Moving / rotating objects" 20130104042126P</guid></item><item><title>New Comment on "Creating objects"</title><link>http://sheetengine.codeplex.com/wikipage?title=Creating objects&amp;ANCHOR#C26071</link><description>I have a problem when I rotate all the sheets of an object. &amp;#40;obj.rotateSheet&amp;#40;&amp;#39;allsheets..&amp;#39;&amp;#41;&amp;#41;&amp;#10;The bounding box of the &amp;#39;canvasSize&amp;#39; is never changes and always stays in the same place.&amp;#10;Is there an easy way to &amp;#39;refresh&amp;#39; the &amp;#39;canvasSize&amp;#39; parameter of an object&amp;#63;&amp;#10;&amp;#40;So that the &amp;#39;relu&amp;#39; and &amp;#39;relv&amp;#39; parameters are calculated from the new center of the object after rotation.&amp;#41;</description><author>Obi2Kenoby</author><pubDate>Thu, 03 Jan 2013 11:56:06 GMT</pubDate><guid isPermaLink="false">New Comment on "Creating objects" 20130103115606A</guid></item><item><title>Updated Wiki: Selecting locations and objects</title><link>http://sheetengine.codeplex.com/wikipage?title=Selecting locations and objects&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Selecting locations and objects&lt;/h1&gt;To determine the world coordinates of the location selected by the user we can use the following function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var pxy = sheetengine.transforms.inverseTransformPoint(pointuv);
&lt;/pre&gt;Parameters are:
&lt;ul&gt;&lt;li&gt;pointuv: point in camera coordinates. JSON with u,v keys.&lt;/li&gt;&lt;/ul&gt;
This can be combined with a click event to determine world coordinates the following way:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;canvasElement.onclick = function(event) {
  var puv = {
    u:event.clientX - sheetengine.canvas.offsetLeft + pageXOffset,
    v:event.clientY - sheetengine.canvas.offsetTop + pageYOffset
  };
  var pxy = sheetengine.transforms.inverseTransformPoint({
    u:puv.u + sheetengine.scene.center.u, 
    v:puv.v + sheetengine.scene.center.v
  });
}
&lt;/pre&gt;&lt;br /&gt;To determine if an object is selected in the scene simply use the getPointuv function to determine the object&amp;#39;s u-v coordinates and compare it to the u-v coordinates of the mouse:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;canvasElement.onmousemove = function(event) {
  // get the hover coordinates
  var puv = {
    u:event.clientX - sheetengine.canvas.offsetLeft + pageXOffset,
    v:event.clientY - sheetengine.canvas.offsetTop + pageYOffset
  };
			  
  // check if the object has been hovered
  var objhovered = isObjectHovered(puv);
}

function isObjectHovered(puv) {
  var ouv = sheetengine.drawing.getPointuv(obj.centerp);
  if (puv.u &amp;gt; ouv.u - 20 &amp;amp;&amp;amp;
    puv.u &amp;lt; ouv.u - 20 + 40 &amp;amp;&amp;amp;
    puv.v &amp;gt; ouv.v - 30 &amp;amp;&amp;amp;
    puv.v &amp;lt; ouv.v - 30 + 40)
    return true;
			
  return false;
}
&lt;/pre&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Wed, 26 Dec 2012 01:48:14 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Selecting locations and objects 20121226014814A</guid></item><item><title>Updated Wiki: Home</title><link>http://sheetengine.codeplex.com/wikipage?version=25</link><description>&lt;div class="wikidoc"&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=421585" alt="features.png" title="features.png" /&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;Sheetengine is an HTML5 canvas based JavaScript display engine for rendering isometric scenes built up of sheets. Features include:
&lt;ul&gt;&lt;li&gt;z-ordering,&lt;/li&gt;
&lt;li&gt;shadows with adjustable light source,&lt;/li&gt;
&lt;li&gt;sheet intersections,&lt;/li&gt;
&lt;li&gt;custom textures with transparent regions,&lt;/li&gt;
&lt;li&gt;custom view transformations,&lt;/li&gt;
&lt;li&gt;density map for collision detection,&lt;/li&gt;
&lt;li&gt;server side support for &lt;a href="http://nodejs.org"&gt;node.js&lt;/a&gt; and &lt;a href="https://github.com/learnboost/node-canvas"&gt;node-canvas&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
Sheetengine is the display engine of &lt;a href="http://www.crossyards.com"&gt;http://www.crossyards.com&lt;/a&gt;, the online building and gaming platform. Watch the Crossyards intro video to get a picture of what sheetengine is capable of:&lt;br /&gt;&lt;br /&gt;&lt;div class="video" style="text-align:Center"&gt;&lt;span class="player"&gt;&lt;object height="375px" width="500px"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_zDYS8N6rtI"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed height="375px" width="500px" type="application/x-shockwave-flash" wmode="transparent" src="http://www.youtube.com/v/_zDYS8N6rtI" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="external"&gt;&lt;a href="http://www.youtube.com/watch?v=_zDYS8N6rtI" target="_blank"&gt;Launch in another window&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;h1&gt;Examples&lt;/h1&gt;You can find offline examples in &lt;a href="http://sheetengine.codeplex.com/downloads/get/571466"&gt;sheetengine-examples.zip&lt;/a&gt; on the Downloads page.&lt;br /&gt;
&lt;hr /&gt;
&lt;h1&gt;Documentation&lt;/h1&gt;Full documentation is available on the &lt;a href="http://sheetengine.codeplex.com/documentation?referringTitle=Home"&gt;Documentation&lt;/a&gt; page.&lt;br /&gt;
&lt;hr /&gt;
&lt;h1&gt;A quick example: a moving/rotating object&lt;/h1&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=421586" alt="demo.png" title="demo.png" /&gt;&lt;br /&gt;The html markup will be very simple. We use an HTML5 canvas, and reference two javascripts: the sheetengine and our custom script in example.js:&lt;br /&gt;&lt;pre&gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;canvas id=&amp;quot;mainCanvas&amp;quot; width=&amp;quot;500&amp;quot; height=&amp;quot;300&amp;quot;&amp;gt;
    &amp;lt;/canvas&amp;gt;
    &amp;lt;script src=&amp;quot;sheetengine.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;example.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The following is the contents of the example.js - the implementation of our custom logic. After initializing the sheetengine we create a basesheet and a custom object made up of two sheets. We define a function to be called periodically in which we move/rotate the object and render the scene:&lt;br /&gt;&lt;pre&gt;
function init() {
  // initialize the sheetengine
  var canvasElement = document.getElementById(&amp;#39;mainCanvas&amp;#39;);
  sheetengine.scene.init(canvasElement, {w:600,h:400});
  
  // define a basesheet
  sheetengine.scene.tilewidth = 200;
  var basesheet = new sheetengine.BaseSheet({x:0,y:0,z:0}, {alphaD:90,betaD:0,gammaD:0}, {w:200,h:200});
  basesheet.color = &amp;#39;#70a050&amp;#39;;

  // define a custom object
  var sheet1 = new sheetengine.Sheet({x:0,y:-14,z:14}, {alphaD:45,betaD:0,gammaD:0}, {w:40,h:40});
  sheet1.context.fillStyle=&amp;#39;#F00&amp;#39;;
  sheet1.context.fillRect(0,0,40,40);
  sheet1.context.clearRect(10,10,20,20);

  var sheet2 = new sheetengine.Sheet({x:0,y:14,z:14}, {alphaD:-45,betaD:0,gammaD:0}, {w:40,h:40});
  sheet2.context.fillStyle=&amp;#39;#FFF&amp;#39;;
  sheet2.context.fillRect(0,0,40,40);
  sheet2.context.clearRect(10,10,20,20);

  var obj = new sheetengine.SheetObject({x:-50,y:-50,z:0}, {alphaD:0,betaD:0,gammaD:0}, [sheet1, sheet2], {w:80,h:80,relu:40,relv:50});
  
  sheetengine.calc.calculateChangedSheets();
  sheetengine.drawing.drawScene(true);
  
  // move object around
  var maxsteps = 20;
  var steps = 0;
  var direction = {x:5, y:0, z:0};
  var rotate = false;
  setInterval(function() {
    if (rotate) {
      obj.rotate({x:0, y:0, z: 1}, Math.PI/2/maxsteps);
      if (++steps &amp;gt;= maxsteps) {
        steps = 0;
        rotate = false;
      }
    } else {
      obj.move(direction);
      if (++steps &amp;gt;= maxsteps) {
        if (direction.x == 5) { direction.x = 0; direction.y = 5; }
        else if (direction.y == 5) { direction.x = -5; direction.y = 0; }
        else if (direction.x == -5) { direction.x = 0; direction.y = -5; }
        else if (direction.y == -5) { direction.x = 5; direction.y = 0; }
        steps = 0;
        rotate = true;
      }
    }
	
    // calculate sheets and draw scene
    sheetengine.calc.calculateChangedSheets();
    sheetengine.drawing.drawScene();
  }, 30);
};

init();
&lt;/pre&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Sat, 15 Dec 2012 11:37:31 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20121215113731A</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=10</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;
Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Examples&lt;/h1&gt;You can download examples from the &lt;a href="http://sheetengine.codeplex.com/releases"&gt;Downloads&lt;/a&gt; page.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any shape with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in view.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 23:13:05 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211111305P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=9</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;
Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any shape with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in view.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 22:20:27 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211102027P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=8</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;
Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any form with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions in the scene only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in one.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 22:16:50 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211101650P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=7</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;
Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any form with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions in the scene only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in one.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 21:58:00 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211095800P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=6</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any form with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions in the scene only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in one.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 21:57:31 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211095731P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://sheetengine.codeplex.com/documentation?version=5</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Introduction&lt;/h1&gt;
Sheetengine was originally designed to be the display engine for a social building and gaming project called Crossyards. This project allows users to build custom scenes made up of stand-alone sheets - that can be positioned and oriented according to the user&amp;#39;s will - using a basic HTML5 editor interface. To create the editor I was looking for something that was light-weight, cross-browser compatible (HTML5) and could handle isometric projections with the following three features: shadows, z-ordering, intersections. I deliberately chose isometric as I believe real 3D is simply too much for the web and I also wanted to be able to visualize the rendered scenes with extremely performant HTML4 methods (image pyramids) that require the projection output be independent of the camera position. As I introduced custom applications and games in Crossyards the engine soon was somewhat turned into a game engine with extended functionality to support object and camera movements also including collision detection. Since I am a fan of open source I decided to release it under the MIT license, maybe it will be useful for others as well.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Download?ProjectName=sheetengine&amp;DownloadId=571858" alt="banner.png" title="banner.png" /&gt;&lt;br /&gt;
&lt;h1&gt;Topics&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20a%20scene&amp;referringTitle=Documentation"&gt;Creating a scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Using%20custom%20textures&amp;referringTitle=Documentation"&gt;Using custom textures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Creating%20objects&amp;referringTitle=Documentation"&gt;Creating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation"&gt;Moving &amp;#47; rotating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Moving%20the%20camera&amp;referringTitle=Documentation"&gt;Moving the camera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Animating%20objects&amp;referringTitle=Documentation"&gt;Animating objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Hiding%20%2f%20showing%20objects&amp;referringTitle=Documentation"&gt;Hiding &amp;#47; showing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20with%20zoom&amp;referringTitle=Documentation"&gt;Rendering with zoom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Custom%20view%20transformations&amp;referringTitle=Documentation"&gt;Custom view transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Making%20sheets%20transparent&amp;referringTitle=Documentation"&gt;Making sheets transparent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Static%20drawing&amp;referringTitle=Documentation"&gt;Static drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Collision%20detection&amp;referringTitle=Documentation"&gt;Collision detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation"&gt;Selecting locations and objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Adjusting%20the%20light%20source&amp;referringTitle=Documentation"&gt;Adjusting the light source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20large%20scenes&amp;referringTitle=Documentation"&gt;Rendering large scenes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sheetengine.codeplex.com/wikipage?title=Rendering%20scenes%20on%20server%20side&amp;referringTitle=Documentation"&gt;Rendering scenes on server side&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Features&lt;/h1&gt;&lt;blockquote&gt;&lt;h4&gt;Isometric rendering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The concept of sheetengine is to draw a 3D world with isometric projection by defining sheets. A sheet is basically a (small) rectangular HTML5 canvas that is drawn onto the main canvas using isometric transformations. This means that defining texture of a sheet can be done by simply drawing on the 2D rendering context of the sheet canvas. The engine supports opacity, but shadows will only take fully transparent or opaque pixels into account. Therefore the sheets can take any form with the help of transparent colors.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Shadows&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Shadows are generally very important when rendering 3D scenes but when using isometric projections they are crucial. If you don&amp;#39;t draw shadows you are simply unable to tell where the objects are located in space by looking at the rendered image. Sheetengine draws shadows cast by sheets both on the static ground and on other sheets taking fully transparent colors into account. For this a single directional light source is used that can be adjusted in terms of direction and the darkness of drawn shadows.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Z-ordering&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sheetengine is not a tile-based display engine: the position of sheets can be arbitrary, therefore z-ordering of sheets is a bit more complex problem than a simple equation. The algorithm used guarantees that sheets will be drawn onto the main canvas in the correct order.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Intersections&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Since the position of sheets is allowed to be arbitrary, it can easily happen that the z-order of two sheets can not be determined in case they intersect each other. The library will automatically calculate the intersections of sheets and the resulting polygons can be rendered in the correct order. This algorithm is quite resource-intensive so intersection of moving objects and static sheets is disabled by default (objects are usually not allowed to go through sheets anyway) but can be turned on manually.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Object animation&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;SheetObjects are objects made up of sheets. These objects are allowed to be moved/rotated/animated in the scene allowing simple games to be implemented using the library. For every object a temporary canvas is created for rendering - this canvas is used by the engine to update the modified regions in the scene only, for optimized performance.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Collision detection&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Detecting if an object has bumped into a wall or is moving up a stairway is done using a density map. The density map contains points of all sheets in the scene sampled using a specified granularity.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering customizations&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Many rendering attributes can be customized. Size of sheets and base sheets, colors of shaded sheets and shadows, direction of light source, etc. It is also possible to define your own projection model by providing custom transform functions in case you didn&amp;#39;t like the built-in one.&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;h4&gt;Rendering on server-side&lt;/h4&gt;&lt;/blockquote&gt;&lt;blockquote&gt;The library is built in a way so that it can be used to render isometric scenes on the server-side using node and node-canvas. This can come very handy if you want to generate images on the server-side to create image pyramids and display isometric scenes in pre-HTML5 browsers (IE8, etc.).&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 11 Dec 2012 21:55:54 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20121211095554P</guid></item></channel></rss>