Dad72 Posted October 17, 2015 Share Posted October 17, 2015 Hello, Is it possible to choose the container in which the display debugLayer? I'll explain in French for simplicity and clarity. J'ai un système de Layout que j'ajoute à mon element <body>. ensuite tout mes autres élements comme le <canvas> est ajouter a mon système de Layout. Le probleme est que quand je veux afficher le debugLayer de Babylon, il est ajouter au <body> et pas sur mon layout, ce qui a pour resultat que je ne voie pas le DebugLayer qui est en dessous le layout. Ce que je demanderais, c’est si il serait possible de pouvoir créer une option dans le debugLayer pour que l'on puisse l'ajouter nous même sur un element div a nous. Par exemple en ajoutant une option "selector" dans la signature: scene.debugLayer.show(true, {selector: "#myDivIDPerso"});De cette façons, j'ajoute un div vide a mon container Layout et quand je créer le debugLayer, je l'ajoute a ce div grâce a cette nouvelle option. Qu'en pense tu DK, tu crois que cela pourrait être possible. Cela m'aiderais beaucoup, car je n'ai pas été capable d'afficher le DebugLayer sur mon Layout que je crée comme ca: $('.layout-desing').w2layout({ name: 'layout-desing', panels: [ { type: 'left', size: 250, resizable: true}, { type: 'main'}, { type: 'right', size: 380, resizable: true} ] }); this.layoutW2uiDesing = w2ui['layout-desing']; this.layoutW2uiDesing.content('left', '<div class="explorer"></div>'); this.layoutW2uiDesing.content('main', '<canvas id="renderEditor"></canvas><div class="DebugLayer"></div>'); this.layoutW2uiDesing.content('right', '<div id="propGrid"></div>');En te remerciant d'avance. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 17, 2015 Share Posted October 17, 2015 No problem, this is the new signature:show(showUI: boolean = true, camera: Camera = null, rootElement: HTMLElement = null) Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 17, 2015 Author Share Posted October 17, 2015 Cool, Thank you DK Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 17, 2015 Author Share Posted October 17, 2015 It's work, but I have a problem position. This shift is the width of the margin that I have left in my layout and height of the top position of the Layout. I add this, that works, but maybe there is a change to make in the DebugLayer to avoid doing this?.$("#DebugLayer").css({"left":"0px", "top":"0px"});// Force left and top: 0px on element DebugLayerThanks. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 17, 2015 Author Share Posted October 17, 2015 Arf, I meet a new problem now. The debugLayer create a canvas that takes clearColor color and thus prevents me from seeing my szene behind. I fix like this:$("#DebugLayerDrawingCanvas").css({"background-color":"rgb(0,0,0,0)"});I do not know why but the canvas created by debugLayer takes color clearColor. maybe he should put transparent by default. So:$("#DebugLayer").css({"left":"0px", "top":"0px"}); // Fix 1 for position$("#DebugLayerDrawingCanvas").css({"background-color":"rgb(0,0,0,0)"}); // fix 2 for display scene Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 18, 2015 Share Posted October 18, 2015 Fix 1 is expected if you want to change the root. I'll use transparent for background nonetheless 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.