<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>sheetengine Discussions Rss Feed</title><link>https://sheetengine.codeplex.com/discussions</link><description>sheetengine Discussions Rss Description</description><item><title>New Post: Setting an object's transparency</title><link>http://sheetengine.codeplex.com/discussions/585884</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
In the game I'm working on, I want to have a building appear semi-transparent while the player chooses its location. Then when it's chosen, I want to change the transparency to 100%. To accomplish this I'm setting the transparency of the context of each sheet in my object to 0.2 when I create the object. However, each time I set the position of the object, the transparency seems to decrease until it becomes opaque.&lt;br /&gt;
&lt;br /&gt;
Any ideas would be much appreciated! To be clear, I want the transparency to remain at 0.2 as the position of the object changes. I'm sure I'm making a silly mistake or don't really understand how transparency works in sheetengine.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://youtu.be/mxdqHrSrtT8" rel="nofollow"&gt;YouTube Video Showing Problem&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Mouse hover code:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;quot;#maincanvas&amp;quot;).mousemove(function(event) {    
// get the hover coordinates

var offsetTop = $('#maincanvas').offset().top;
var offsetLeft = $('#maincanvas').offset().left;

var P1puv = {
    u:event.clientX - offsetLeft, 
    v:event.clientY - offsetTop
};
var P1pxy = sheetengine.transforms.inverseTransformPoint({
    u:P1puv.u + sheetengine.scene.center.u, 
    v:P1puv.v + sheetengine.scene.center.v
});

if(buildingGhost === &amp;quot;buildingE&amp;quot;){
    var tmpX = P1pxy.x + 35;
    var tmpY = P1pxy.y + 25;
    var tileX = Math.round(tmpX / 100)
    var tileY = Math.round(tmpY / 100);
    console.log(&amp;quot;P1pxy.x=&amp;quot; + P1pxy.x + &amp;quot; P1pxy.y=&amp;quot; + P1pxy.y + &amp;quot; tileX=&amp;quot; + tileX + &amp;quot; tileY=&amp;quot; + tileY);
    
    if(ghostBuilding == null){
        ghostBuildingOldP = {x:tileX,y:tileY};
        ghostBuilding = createBuilding({x:tileX * 100,y:tileY * 100,z:0}, 1, '#4a3a47', '#4a3a47', 0.2);
    } else {
        if(tileX != ghostBuildingOldP.x || tileY != ghostBuildingOldP.y) {
            ghostBuildingOldP = {x:tileX,y:tileY};
            ghostBuilding.setPosition({x:tileX * 100,y:tileY * 100,z:0});
            sheetengine.calc.calculateAllSheets();
            sheetengine.drawing.drawScene(true);
        }
    }
} else {
    ghostBuilding = null;
}
});&lt;/code&gt;&lt;/pre&gt;

House creation code:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;function createBuilding(centerP, stories, colour, roofColour, alpha){

var frontWall = new sheetengine.Sheet({x:0,y:50,z:25}, {alphaD:0,betaD:0,gammaD:0}, {w:100,h:50});
frontWall.context.globalAlpha = alpha;
frontWall.context.fillStyle = colour;
frontWall.context.fillRect(0,0,100,50);
frontWall.context.clearRect(30,15,70,20);

var frontLedgeBottom = new sheetengine.Sheet({x:13,y:48,z:15}, {alphaD:90,betaD:0,gammaD:0}, {w:75,h:4});
frontLedgeBottom.context.globalAlpha = alpha;
frontLedgeBottom.context.fillStyle = colour;
frontLedgeBottom.context.fillRect(0,0,75,4);

var frontLedgeLeft = new sheetengine.Sheet({x:-19,y:48,z:20}, {alphaD:90,betaD:0,gammaD:90}, {w:30,h:4});
frontLedgeLeft.context.globalAlpha = alpha;
frontLedgeLeft.context.fillStyle = colour;
frontLedgeLeft.context.fillRect(0,0,30,4);

var sideLedgeRight = new sheetengine.Sheet({x:50,y:11,z:26}, {alphaD:0,betaD:0,gammaD:0}, {w:4,h:20});
sideLedgeRight.context.globalAlpha = alpha;
sideLedgeRight.context.fillStyle = colour;
sideLedgeRight.context.fillRect(0,0,4,20);

var sideLedgeBottom = new sheetengine.Sheet({x:48,y:28,z:15}, {alphaD:0,betaD:90,gammaD:90}, {w:40,h:4});
sideLedgeBottom.context.globalAlpha = alpha;
sideLedgeBottom.context.fillStyle = colour;
sideLedgeBottom.context.fillRect(0,0,75,4);

var windowFront = new sheetengine.Sheet({x:10,y:48,z:24}, {alphaD:0,betaD:0,gammaD:0}, {w:75,h:30});
windowFront.context.globalAlpha = alpha;
windowFront.context.fillStyle = '#b6b8ff';
windowFront.context.fillRect(0,0,75,30);

var windowSide = new sheetengine.Sheet({x:47,y:28,z:24}, {alphaD:0,betaD:0,gammaD:90}, {w:40,h:19});
windowSide.context.globalAlpha = alpha;
windowSide.context.fillStyle = '#b6b8ff';
windowSide.context.fillRect(0,0,75,19);

var doorWindow1 = new sheetengine.Sheet({x:47,y:-20,z:25}, {alphaD:0,betaD:0,gammaD:90}, {w:20,h:35});
doorWindow1.context.globalAlpha = alpha;
doorWindow1.context.fillStyle = '#b6b8ff';
doorWindow1.context.fillRect(0,0,20,35);

var sideWall1 = new sheetengine.Sheet({x:50,y:0,z:25}, {alphaD:0,betaD:0,gammaD:90}, {w:101,h:50});
sideWall1.context.globalAlpha = alpha;
sideWall1.context.fillStyle = colour;
sideWall1.context.fillRect(0,0,101,50);
sideWall1.context.clearRect(0,15,40,20);
sideWall1.context.clearRect(55,13,20,35);

var door = new sheetengine.Sheet({x:55,y:-10,z:25}, {alphaD:0,betaD:0,gammaD:90}, {w:20,h:35});
door.context.globalAlpha = alpha;
door.context.fillStyle = '#5d3500';
door.context.fillRect(0,0,20,35);
door.context.clearRect(2,2,15,12);
door.context.clearRect(2,22,15,8);

var sideWall2 = new sheetengine.Sheet({x:-50,y:0,z:25}, {alphaD:0,betaD:0,gammaD:90}, {w:101,h:50});
sideWall2.context.globalAlpha = alpha;
sideWall2.context.fillStyle = colour;
sideWall2.context.fillRect(0,0,101,50);

var frontRoofLedge1 = new sheetengine.Sheet({x:0,y:52,z:50}, {alphaD:90,betaD:0,gammaD:0}, {w:100,h:6});
frontRoofLedge1.context.globalAlpha = alpha;
frontRoofLedge1.context.fillStyle = colour;
frontRoofLedge1.context.fillRect(0,0,100,6);

var frontRoofLedge2 = new sheetengine.Sheet({x:2,y:55,z:53}, {alphaD:0,betaD:0,gammaD:0}, {w:105,h:6});
frontRoofLedge2.context.globalAlpha = alpha;
frontRoofLedge2.context.fillStyle = colour;
frontRoofLedge2.context.fillRect(0,0,105,6);


var sideRoofLedge1 = new sheetengine.Sheet({x:50,y:2,z:50}, {alphaD:0,betaD:90,gammaD:90}, {w:105,h:6});
sideRoofLedge1.context.globalAlpha = alpha;
sideRoofLedge1.context.fillStyle = colour;
sideRoofLedge1.context.fillRect(0,0,105,6);


var sideRoofLedge2 = new sheetengine.Sheet({x:55,y:2,z:53}, {alphaD:0,betaD:0,gammaD:90}, {w:105,h:6});
sideRoofLedge2.context.globalAlpha = alpha;
sideRoofLedge2.context.fillStyle = colour;
sideRoofLedge2.context.fillRect(0,0,105,6);


var backWall = new sheetengine.Sheet({x:0,y:-50,z:25}, {alphaD:0,betaD:0,gammaD:0}, {w:100,h:50});
backWall.context.globalAlpha = alpha;
backWall.context.fillStyle = colour;
backWall.context.fillRect(0,0,100,50);


var roof1 = new sheetengine.Sheet({x:1,y:1,z:55}, {alphaD:90,betaD:0,gammaD:0}, {w:107,h:107});
roof1.context.globalAlpha = alpha;
roof1.context.fillStyle = colour;
roof1.context.fillRect(0,0,107,107);
roof1.context.clearRect(20,20,68,68);


var roof2 = new sheetengine.Sheet({x:1,y:1,z:48}, {alphaD:90,betaD:0,gammaD:0}, {w:68,h:68});
roof2.context.globalAlpha = alpha;
roof2.context.fillStyle = roofColour;
roof2.context.fillRect(0,0,68,68);


var roofLedgeBack = new sheetengine.Sheet({x:0,y:-33,z:52}, {alphaD:0,betaD:0,gammaD:0}, {w:68,h:7});
roofLedgeBack.context.globalAlpha = alpha;
roofLedgeBack.context.fillStyle = colour;
roofLedgeBack.context.fillRect(0,0,68,7);


var roofLedgeSide = new sheetengine.Sheet({x:-32,y:0,z:52}, {alphaD:0,betaD:0,gammaD:90}, {w:68,h:7});
roofLedgeSide.context.globalAlpha = alpha;
roofLedgeSide.context.fillStyle = colour;
roofLedgeSide.context.fillRect(0,0,68,7);

 
var building1 = new sheetengine.SheetObject(centerP, {alpha:0,beta:0,gamma:0}, [doorWindow1,door,roofLedgeSide, roofLedgeBack, roof2,roof1,sideRoofLedge2, frontRoofLedge2, sideRoofLedge1, frontRoofLedge1, sideLedgeRight, windowFront, windowSide, frontLedgeBottom, frontLedgeLeft, frontWall, sideWall1, sideWall2, backWall, sideLedgeBottom], {w:150,h:100,relu:20,relv:30});

sheetengine.calc.calculateChangedSheets();
sheetengine.drawing.drawScene(true);

return building1;
}&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>riotgrrrl</author><pubDate>Tue, 10 Mar 2015 12:37:49 GMT</pubDate><guid isPermaLink="false">New Post: Setting an object's transparency 20150310123749P</guid></item><item><title>New Post: How to manipulate z-ordering of sheets</title><link>http://sheetengine.codeplex.com/discussions/438198</link><description>&lt;div style="line-height: normal;"&gt;I've checked it out, it's pretty cool! I like it :) Nice work!&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 10 Feb 2015 15:48:46 GMT</pubDate><guid isPermaLink="false">New Post: How to manipulate z-ordering of sheets 20150210034846P</guid></item><item><title>New Post: How to manipulate z-ordering of sheets</title><link>http://sheetengine.codeplex.com/discussions/438198</link><description>&lt;div style="line-height: normal;"&gt;It took a while but finally we went online. I am proud to present you the configurator we worked on the last month. &lt;br /&gt;
The part of the 3D visualization is managed by the sheet engine.&lt;br /&gt;
Please use the “View in 3D” button to see the sheet engine working: &lt;a href="http://www.cubit-shop.com/en-uk/sofa/configurator" rel="nofollow"&gt;www.cubit-shop.com/en-uk/sofa/configurator&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks again!&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://work.mach-parat.de/test/sheetengine/z_ordering/topview.jpg" alt="Image" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://work.mach-parat.de/test/sheetengine/z_ordering/frontview.jpg" alt="Image" /&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>pilleman</author><pubDate>Tue, 10 Feb 2015 15:32:44 GMT</pubDate><guid isPermaLink="false">New Post: How to manipulate z-ordering of sheets 20150210033244P</guid></item><item><title>New Post: Sheetengine dead?</title><link>http://sheetengine.codeplex.com/discussions/578704</link><description>&lt;div style="line-height: normal;"&gt;Sorry, I've been busy lately with other stuff and couldn't get a new release out. No major modifications are planned as of now. For the time being I can recommend you try Three.js, it has some sort of isometric support, and it can also rely on WebGL. Shadows might be a bit more tricky to implement to work globally but not that difficult either. Also it probably has the biggest community among js game engines so that can also be a plus.&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Tue, 27 Jan 2015 20:47:18 GMT</pubDate><guid isPermaLink="false">New Post: Sheetengine dead? 20150127084718P</guid></item><item><title>New Post: Sheetengine dead?</title><link>http://sheetengine.codeplex.com/discussions/578704</link><description>&lt;div style="line-height: normal;"&gt;The last posts to this forum are from September 2014, and the last source code update was in 2012. Is this thing in active development anymore??&lt;br /&gt;
&lt;br /&gt;
Can anyone recommend a good alternative to build isometric javascript games?&lt;br /&gt;
&lt;/div&gt;</description><author>chearner</author><pubDate>Tue, 27 Jan 2015 18:12:30 GMT</pubDate><guid isPermaLink="false">New Post: Sheetengine dead? 20150127061230P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;I see,&lt;br /&gt;
&lt;br /&gt;
ok, i will try to handle the zoom issue - this is the biggest problem here I think&lt;br /&gt;
&lt;br /&gt;
Thanks again!&lt;br /&gt;
&lt;/div&gt;</description><author>Mishap</author><pubDate>Mon, 15 Sep 2014 16:41:27 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915044127P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;Well, intersection calculation for objects are automatically switched off, so by switching shadows off I think you have pretty much optimized what you can.&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Mon, 15 Sep 2014 16:21:11 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915042111P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;I have seen the example with large sceene handling and it looks very nice.&lt;br /&gt;
But unfortunately I do have to zoom out - maybe i can limit the zoom out factor a little bit.&lt;br /&gt;
The Crossyard version is really not a solution exactly because of the reasons that you have yourself. &lt;br /&gt;
&lt;br /&gt;
The Images that i place (sheet textures) might as well be higher then the actual basesheet, so the z-ordering is indeed needed. but I don't care about interceptions or shadows (I have disabled all the shadows). &lt;br /&gt;
Is there any other calculation I can disable to make it faster?&lt;br /&gt;
&lt;br /&gt;
thanks a lot!!!&lt;br /&gt;
&lt;/div&gt;</description><author>Mishap</author><pubDate>Mon, 15 Sep 2014 15:30:07 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915033007P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
for sheetengine to work with big scenes I have created an example that uses dynamic loading and unloading sheets. This means that you can have as many sheets as you want, but the canvas will display only a limited number of sheets at a given time. When the camera moves, more sheets are loaded and some that fall out of the viewport are unloaded. Unfortunately I don't have a solution for zooming out. I have solved this problem in Crossyards by drawing the static scenes onto separate images and then creating image pyramids from them: this way the information you show on every stage is the same amount so you get the same performance, however this approach only works for strictly static scenes, there is no &amp;quot;augmented&amp;quot; gameplay possible when you zoom out. It would be too much information to handle.&lt;br /&gt;
&lt;br /&gt;
You might get good results with basesheets because they don't count in calculations: no intersections, no shadows, no z-ordering, etc. They are simply drawn to the canvas as a first step, but sheets are different, because they do cast shadows, they may intersect other sheets and the order of drawing is arbitrary so it needs to be calculated. It could possibly be faster with WebGL support, but it is not implemented yet.&lt;br /&gt;
&lt;br /&gt;
I cannot give advice on what engine to use, search for them on the internet, maybe you'll find some useful. If you don't need shadows cast by sheets that are reflected on other sheets/objects, you don't need sophisticated z-ordering because your sheets/objects are positioned on the same level and always in set orientations, and your sheets/objects never intersect, then your problem is a lot smaller than what sheetengine is capable of solving, and can be solved with simpler engines with better performance. Sheetengine was designed to render &amp;quot;difficult&amp;quot; scenes, with aribtrary sheet positions and orientations.&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Mon, 15 Sep 2014 15:10:48 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915031048P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;Hi dobsonl and thanks for the answer!&lt;br /&gt;
&lt;br /&gt;
Wow - so you mean sheetengine is not made to work with such big scenes?&lt;br /&gt;
Using sheetengine I've already created the world that has the new perspective (2.5D), it can be moved and zoomed, it redraws everything after moving or zooming, since the dynamic scene has limited width and height... And with 3500 basesheets I can moove and zoom it without a problem.&lt;br /&gt;
But when I just place around 200 simple sheets and the move/zoom or just redraw the world - it gets very very slow...&lt;br /&gt;
So if 3500 sheets is too much for the sheetengine, could you please give me a suggestion what could I do or which framework to use for this task:&lt;br /&gt;
&lt;br /&gt;
I have a small game (in 2.5D, so 100x68px each tile) that will have 3500 basesheets and can also have up to 3500 sheets (these are only images, so no objects will be created using poligons or what so ever) placed on the basesheets.&lt;br /&gt;
People place the objects on the basesheets, move the map, zoom in/out (preferably the zoom out goes until one sees the whole scene).... &lt;br /&gt;
It must be fast... &lt;br /&gt;
&lt;br /&gt;
So I've already build this using normal html and js, but it's too slow on old PCs, so I'm trying to create a canvas version.&lt;br /&gt;
&lt;br /&gt;
Thanks a lot for your help!&lt;br /&gt;
&lt;/div&gt;</description><author>Mishap</author><pubDate>Mon, 15 Sep 2014 12:58:13 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915125813P</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
how is performance with static sheets instead of objects? Unfortunately only objects implement partial redrawing of areas in case if they move/change, so if you choose to work with static sheets, you will need to redraw the whole scene, which would be quite slow in your case as I can imagine. Showing 3500 sheets anyway sounds to me a lot more than what is reasonable with html5 and sheetengine, but you need to test it.&lt;br /&gt;
&lt;br /&gt;
Image preloading: what I usually do is define a counter with the number of images to load (var counter = 100;) and at every image onload I decrease the counter and check if it has reached 0 - in which case I also call drawScene once. Not the best and most sophisticated approach, and you might also want to watch out for image loading errors. Alternatively you could use some sort of promise technology, or async library like &lt;a href="https://github.com/caolan/async" rel="nofollow"&gt;https://github.com/caolan/async&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Mon, 15 Sep 2014 06:09:41 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140915060941A</guid></item><item><title>New Post: manipulate xyz and size of simple Sheets</title><link>http://sheetengine.codeplex.com/discussions/567402</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I've read that after placing a normal sheet it becomes a static part of the scene.&lt;br /&gt;
Is there a way to change the x/y and width/height properties after placing them?&lt;br /&gt;
I don't want to use SheetObject since it is much heavier for the processor. On the scene I have about 3500 objects - if one zooms out, it is possible to see all of them at once - and that gets really heavy if I use sheetObject.&lt;br /&gt;
&lt;br /&gt;
Another question is how to handle the image preloading of many objects?&lt;br /&gt;
I am using this code to preload and append the image to a sheet:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var sheet = new sheetengine.Sheet(...);
var img = new Image();
img.onload = function() {
    sheet.context.drawImage(img,0,0,wid,height);    
    sheetengine.calc.calculateChangedSheets();
    sheetengine.drawing.drawScene(true);
};
img.src = mySRC; &lt;/code&gt;&lt;/pre&gt;

If I place at least 100 objects with imgages, I have to call the drawScene method 100 times - this doesn't seem right. What can I do to call it only once?&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;
Mishap&lt;br /&gt;
&lt;/div&gt;</description><author>Mishap</author><pubDate>Sun, 14 Sep 2014 22:26:52 GMT</pubDate><guid isPermaLink="false">New Post: manipulate xyz and size of simple Sheets 20140914102652P</guid></item><item><title>New Post: move object with drag</title><link>http://sheetengine.codeplex.com/discussions/565561</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
you can download examples from the download page. You can also check the documentation tab here on codeplex. There is no such example that presents dragging objects, however whatever info you need to achieve it is written in the following examples:&lt;br /&gt;
&lt;br /&gt;
Moving / rotating objects - &lt;a href="https://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;amp;referringTitle=Documentation" rel="nofollow"&gt;https://sheetengine.codeplex.com/wikipage?title=Moving%20%2f%20rotating%20objects&amp;referringTitle=Documentation&lt;/a&gt;&lt;br /&gt;
Selecting locations and objects - &lt;a href="https://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;amp;referringTitle=Documentation" rel="nofollow"&gt;https://sheetengine.codeplex.com/wikipage?title=Selecting%20locations%20and%20objects&amp;referringTitle=Documentation&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Fri, 05 Sep 2014 12:47:54 GMT</pubDate><guid isPermaLink="false">New Post: move object with drag 20140905124754P</guid></item><item><title>New Post: move object with drag</title><link>http://sheetengine.codeplex.com/discussions/565561</link><description>&lt;div style="line-height: normal;"&gt;Hi, my question: is it possible drag the objects with mouse? i can't find examples.&lt;br /&gt;
&lt;br /&gt;
best regards&lt;br /&gt;
&lt;/div&gt;</description><author>Pirosoftit</author><pubDate>Fri, 05 Sep 2014 12:29:18 GMT</pubDate><guid isPermaLink="false">New Post: move object with drag 20140905122918P</guid></item><item><title>New Post: How to: Move SheetObject textured</title><link>http://sheetengine.codeplex.com/discussions/542155</link><description>&lt;div style="line-height: normal;"&gt;Keten, Levente has given me a solution that might help your problem, it helped mine. &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Try changin lines 609-610 to this:

    targetContext.clearRect(0, 0, viewPort.w, viewPort.h);

instead of this:

    targetContext.fillStyle = sheetengine.backgroundColor;
    targetContext.fillRect(0, 0, viewPort.w, viewPort.h);&lt;/code&gt;&lt;/pre&gt;

This fixed the issue for me. I can now simply set whatever background I like on the canvas itself, and there are no issues so far that arise from moving the camera or SheetObjects interacting with the edges of the scene. I'm not noticing the bug which you've shown above, are you calling drawScene() each time a sheet moves?&lt;br /&gt;
&lt;br /&gt;
Btw, I'm interested in how you've achieved 'non square' maps. Did you modify the BaseSheet render loop somehow? Currently my idea is to put an 'inactive' property on a BaseSheet and simply not render it if the BaseSheet has that property. &lt;br /&gt;
&lt;/div&gt;</description><author>RohanDeshpande</author><pubDate>Thu, 04 Sep 2014 06:48:06 GMT</pubDate><guid isPermaLink="false">New Post: How to: Move SheetObject textured 20140904064806A</guid></item><item><title>New Post: How to manipulate z-ordering of sheets</title><link>http://sheetengine.codeplex.com/discussions/438198</link><description>&lt;div style="line-height: normal;"&gt;Thank you for the quick reply. &lt;br /&gt;
It is slower now, but it works for me. I do not need real time visualization.&lt;br /&gt;
&lt;br /&gt;
I will send you the link to the project when it is launched. &lt;br /&gt;
Great engine, excellent support!&lt;br /&gt;
&lt;/div&gt;</description><author>pilleman</author><pubDate>Thu, 03 Jul 2014 12:39:51 GMT</pubDate><guid isPermaLink="false">New Post: How to manipulate z-ordering of sheets 20140703123951P</guid></item><item><title>New Post: How to manipulate z-ordering of sheets</title><link>http://sheetengine.codeplex.com/discussions/438198</link><description>&lt;div style="line-height: normal;"&gt;No, it's not likely to be a problem of the viewsource vector. It's probably the result of some optimizations sheetengine uses in order to make z-ordering faster. Shortly, the way it works to decide which one from 2 sheets should be drawn first is that it sets off some rays in the direction of the viewsource and checks the intersections of the rays and the sheets. From the z-value of intersection points it decides which sheets to draw first. An infinite number of rays would give us the optimal solution, but that would take forever. Also, the distance &amp;lt;5 can be accounted for optimizations to fix some graphic glitches in games, that might not be specifically useful to you.&lt;br /&gt;
&lt;br /&gt;
So here are some suggestions, to play with:&lt;br /&gt;
&lt;br /&gt;
line 1291: use a lower value for zOrderDistanceThreshold&lt;br /&gt;
line 1295: use a lower value for zOrderDistanceThreshold&lt;br /&gt;
line 757: this is where the number of rays to shoot is defined. The array defines different number of rays (numpoints) for different line segment lengths (dist). Start experimenting with something like [{dist:0, numpoints:100}]. It's going to be slow, but probably give you more accurate results.&lt;br /&gt;
&lt;/div&gt;</description><author>dobsonl</author><pubDate>Wed, 02 Jul 2014 16:14:04 GMT</pubDate><guid isPermaLink="false">New Post: How to manipulate z-ordering of sheets 20140702041404P</guid></item><item><title>New Post: How to manipulate z-ordering of sheets</title><link>http://sheetengine.codeplex.com/discussions/438198</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I have got a similar problem. Currently I am working on a configurator for sofas. And I would like to use sheetengine for the isometric visualization. &lt;br /&gt;
&lt;br /&gt;
I have the following problem:&lt;br /&gt;
I tried to build different views that allow the user to look from different perspectives to the scenery.&lt;br /&gt;
Depending on how sofa-parts are placed and rotated the Z-ordering is not working.&lt;br /&gt;
For example here:&lt;br /&gt;
&lt;a href="http://work.mach-parat.de/test/sheetengine/z_ordering/index_construct.html" rel="nofollow"&gt;http://work.mach-parat.de/test/sheetengine/z_ordering/index_construct.html&lt;/a&gt;&lt;br /&gt;
The texture is not loaded the first time. Please click on the button [isofront] to redraw the scene.&lt;br /&gt;
&lt;img src="http://work.mach-parat.de/test/sheetengine/z_ordering/z-ordering.PNG" alt="Image" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I read that z-ordering is automatic and relies on the sheetengine.viewSource vector.&lt;br /&gt;
First I thought that something must be wrong with my viewSource vectors, but than I recognized that the build-in view does not work correct.&lt;br /&gt;
I put some boxes/frames on the stage to demonstrate the problem:&lt;br /&gt;
&lt;a href="http://work.mach-parat.de/test/sheetengine/z_ordering/" rel="nofollow"&gt;http://work.mach-parat.de/test/sheetengine/z_ordering/&lt;/a&gt;&lt;br /&gt;
&lt;img src="http://work.mach-parat.de/test/sheetengine/z_ordering/z-ordering2.PNG" alt="Image" /&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The boxes in front are rendered correct. There is a space of 5 between the boxes.&lt;/li&gt;
&lt;li&gt;The boxes in the middle have got problems at their right side. The difference to 1. is that the space between the boxes is 4 now&lt;/li&gt;
&lt;li&gt;
The last row of boxes has got problems at top, bottom and right side. They have got a depth 18 instead of 40 now and there is a space of 4.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
Is this a problem with the heetengine.viewSource vector?&lt;br /&gt;
What would be the correct code to switch between the views [isofront] [isoright] [isoback] [isoleft] of the first example?&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
pilleman&lt;br /&gt;
&lt;/div&gt;</description><author>pilleman</author><pubDate>Wed, 02 Jul 2014 14:56:49 GMT</pubDate><guid isPermaLink="false">New Post: How to manipulate z-ordering of sheets 20140702025649P</guid></item><item><title>New Post: How to: Basesheet hover</title><link>http://sheetengine.codeplex.com/discussions/542326</link><description>&lt;div style="line-height: normal;"&gt;I post my solution here &lt;a href="https://sheetengine.codeplex.com/discussions/473442" rel="nofollow"&gt;https://sheetengine.codeplex.com/discussions/473442&lt;/a&gt;. It shows white border around basesheet.&lt;br /&gt;
&lt;/div&gt;</description><author>Casero</author><pubDate>Fri, 16 May 2014 23:07:08 GMT</pubDate><guid isPermaLink="false">New Post: How to: Basesheet hover 20140516110708P</guid></item><item><title>New Post: crossyards code</title><link>http://sheetengine.codeplex.com/discussions/473442</link><description>&lt;div style="line-height: normal;"&gt;My hover around basesheet look like this:&lt;br /&gt;
CLICK on position x,y -&amp;gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;    var puv = {
        u: x - sheetengine.canvas.offsetLeft,
        v: y - sheetengine.canvas.offsetTop
    };
    var w = sheetengine.canvas.width / 2;
    var h = sheetengine.canvas.height / 2;
    puv.u = (puv.u - w) / zoom + w;
    puv.v = (puv.v - h) / zoom + h;
    var pxy = sheetengine.transforms.inverseTransformPoint({
        u: puv.u + sheetengine.scene.center.u,
        v: puv.v + sheetengine.scene.center.v
    });

   var clickposXY = sheetengine.scene.getYardFromPos(pxy);
    var clickpos = sheetengine.drawing.getPointuv({x: clickposXY.relyardx * sheetengine.scene.tilewidth, y: clickposXY.relyardy * sheetengine.scene.tilewidth, z: 0});
    var ctx = sheetengine.context;
    ctx.save();
    ctx.lineWidth = 1;
    ctx.strokeStyle = '#FFF';
    var w = 3 * sheetengine.scene.tilewidth / 2;
    var poly = [clickpos.u - w / 2, clickpos.v,
        clickpos.u, clickpos.v + w / 4,
        clickpos.u + w / 2, clickpos.v,
       clickpos.u, clickpos.v - w / 4];
    ctx.beginPath();
    ctx.moveTo(poly[0], poly[1]);
    for (var item = 2; item &amp;lt; poly.length - 1; item += 2) {
        ctx.lineTo(poly[item], poly[item + 1])
    }
    ctx.closePath();
    ctx.stroke();
    ctx.restore();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>Casero</author><pubDate>Fri, 16 May 2014 23:05:50 GMT</pubDate><guid isPermaLink="false">New Post: crossyards code 20140516110550P</guid></item></channel></rss>