TMTH Posted February 8, 2017 Share Posted February 8, 2017 Here is PG. http://babylonjs-playground.com/#QTNKM#1 When using designSize on canvas alignment properties are unusable. There are two different use cases: 1. I manually position primitive on some point. I expect it's position to be uniformly scaled from design size to real rendering size. That one is working. 2. I do not position primitive, but I set primitive alignment. Let it be marginHAlignment = BABYLON.PrimitiveAlignment.AlignRight. In that case I expect this primitive to be stuck on the right side of the rendered canvas. That case is not working. So, building real UI I have a problem. I can build UI panels using absolute positioning, and it will be OK, but how can I position those panels? Suppose I want one panel to be on left side of the canvas, and one on the right side - not so complex high level layout. Left one will be positioned fine, but with positioning right one I will have a problem. Big one. @Nockawa, is there any work around for this? Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 8, 2017 Share Posted February 8, 2017 @TMTH I'm reworking the whole thing since yesterday.. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 22, 2017 Share Posted February 22, 2017 I'm working on it, apparently, there's work to do! The non design mode is now working as expected thank to the positioning engine rewritting. But the design mode counterpart doesn't seem to work, so I'm on it. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 22, 2017 Share Posted February 22, 2017 Well, I was a bit too pessimistic! With a Design size set with 400, 300 (to have a smaller rect because you set their size with 10, 5), I also have the expected result with both designUseHorizAxis true or false! So I'll say: give it a new try! Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 28, 2017 Share Posted February 28, 2017 @TMTH can you mark the bug solved if you consider it is and you didn't do it, thanks Quote Link to comment Share on other sites More sharing options...
unintellisense Posted March 1, 2017 Share Posted March 1, 2017 Maybe this hasn't made it into the preview or the PG, or possibly I am using designSize wrong. But are these working right @Nockawa? http://babylonjs-playground.com/#2GDFI4 using position http://babylonjs-playground.com/#2GDFI4#1 using marginalignment Also I put a backgroundFill in, as I thought the idea of designSize was to grow/scale to fit the canvas. Sorry if I should have created another thread, but this seemed on topic. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted March 1, 2017 Share Posted March 1, 2017 @unintellisense well, yes, I had to rollback part of the code that were making this working (because unfortunately this code broke the scale propagation through primitive tree), as I said in other thread, that's the last thing I have to dev/check: alignment working correctly in all cases. I'm going to start that today, be a little more patient. I hate that because C2D has been unstable lately, trying to make all features people asked working at the same time was quite a challenge...But the worst is definitely behind... unintellisense 1 Quote Link to comment Share on other sites More sharing options...
Raitch Posted March 8, 2017 Share Posted March 8, 2017 @Nockawa Where can I find the latest C2D file? The ones generated from http://www.babylonjs.com/versionBuilder/ seems to have these unstable behaviors that you speak of. Am currently on 2.4 because upgrading makes my canvas 2Ds get shrinked and doesn't seem to overlap too well with alphas etc. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted March 8, 2017 Share Posted March 8, 2017 You can find it here: https://github.com/nockawa/Babylon.js/tree/master/dist/preview release/canvas2D But I'm about to make a big release with many changes/fix (good ones), I have one little thing to fix then I commit. So wait few hours or take immediately the actual file. Make sure to watch this thread (http://www.html5gamedevs.com/topic/22552-canvas2d-main-post/), I post a message for every update of C2D Quote Link to comment Share on other sites More sharing options...
Raitch Posted March 8, 2017 Share Posted March 8, 2017 Sounds awesome. Will be in the look out for it Quote Link to comment Share on other sites More sharing options...
Nockawa Posted March 8, 2017 Share Posted March 8, 2017 Ok, the new release is out. I'll post a forum message about it this afternoon (in few hours) Raitch 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.