• Content Count

  • Joined

  • Last visited

  1. Hi Deltakosh, I've read the documentation more thoroughly again and have checked this PG (I've set the button in the billboard mode, see: - you need to zoom in ...). In essence, it would likely be the future direction, thanks! However, there could be more work to do. For example, I do not know how display the button text in a color other than white. Yesterday, I've completed the functionality in a somewhat hard way and it is now complete - will post it on the Playground next week. Because it is a (full functioning) prototype, I will stop improving it for a time being and will first check with the users am I on the right track all together. If it all goes fine, I would look for a BABYLON developer to write the functionality in a more professional way. I have programmed neatly, but my knowledge of javascript, WebGL and BABYLON.JS is by far insufficient to make a good product.
  2. Billboards I'm showing need to be in a 3D scene, i.e. to resize depending on their spatial position - I'm showing a non-planar graph. That is basically all.
  3. Hi Adam, I'm using GUI in this particular application prototype already, but it seems not to be meant for this particular purpose. Maybe I'm wrong. BTW, I've also tried to open playground on my windows phone from the link provided by html5devs and it also fails (goes to default PG scene). However, typing of the last part of the url opens the PG without problems. Probably a glitch in the forum software.
  4. I've solved it somehow by drawing a rectangle directly in WebGL, see lines 26 and 27 textureContext.fillStyle = "#B5FFFF"; textureContext.fillRect (0, 0, 1000, 1000); check: As I'm not a neither WebGL nor BABYLON.JS developer, please comment on my solution.
  5. I've improved the example a bit:
  6. I can write texts on "billboard style" mashes in any combination of text and background colors. However, I cannot figure out how to do it when wrapping text. For text wrapping I've used a code I've seen on this forum and on Stackoverflow and it works fine. However, it uses direct functions of WebGL and that apparently collides with the usage of BABYLON.JS objects (not surprising as it goes underneath the Babylon layer). So, I can draw text In white, but not in black. I'm sure it can be done, but I'm fighting it the whole morning without succes, Please have a look into this playground example (I've isolated it from the rest of my application). To see the meshes, double click on the canvas. Thanks very much in advance.
  7. Thanks, this is exactly what I need.
  8. this works: label.background = "#E70000"; thanks!
  9. Could you show me that in the code? I've tried: var label = new BABYLON.GUI.Rectangle("label for " +; label.background = new BABYLON.Color3(0.9, 0, 0); That does nothing.
  10. I'm displaying some items in the "billboard" mode: The items would need to maintain the same color (or change it just a bit with the camera rotations). I believe it must be very simple to do, but, still bein a novice, I do not know how ....
  11. I've just removed the prefix "solved". As a matter of fact, I've made a mistake by stuffing 5 issues in one post. The first issue has been responded to, the others not. Next time, I'll start more focused topics. Two issues have to do with my lack of experience (and shortcomings in the documentation) see #1 and #4. Points #2 and #5 are questions/suggestions regarding the functionality. I believe those are of interest to other forum users. For me, there is a simple workaround: will use a fixed-size font. Point #3 is something I've incidentally discovered while testing, but of no further interest to me. .............................................. I have used the GUI extension and basically it does what I need. See Yet I have several questions and suggestions. 1. The background color of a container, in my case an instance of BABYLON.GUI.Rectangle is assigned by a string value ("black", "white"...). Which colors are possible? I would prefer to use BABYLON.Color3(...) 2. What I need is a 'sticky' label. For that, I create a rectangle and used it as a container for a TextBlock and that works fine. However, what I would like to have is that my label would be transparent or semi-transparent and the text not. In the present implementation, if I change alpha of the rectangle, it seems topropagate to child controls (my TextBlock), so the text becomes also semi-transparent. I believe this is a small bug: if I want the text to be semi-transparent, I can change the alpha of the TextBlock 3. I can link a TextBlock directly to a mesh. However, in that case I cannot change link offsets (linkOffsetX, linkOffsetY ...). Apparently, linkOffsetY has some value (100?) and the others are 0. Wouldn't it be a welcome feature? 4. Vertical text alignment of a TextBlock can be controlled by setting textVerticalAlignment to 0, 1 or 2, but I could not find it in the documentation. 5. Apparently, the object TextBlock has been designed to work in conjunction with some container object. Otherwise, it has no boundaries so it cannot decide on text wrapping. Is it possible to let the container (a Rectangle, for example) to be resized to match the text size (this would need to be somehow reconciled with wrapping - maybe like in MS PowerPoint). The simplest possibility would be to enable the programmer to do it. For example, to introduce a method that would return the "bounding box" of a text with the preset width and word wrap (Y/N). If I would have something like that, I could decide dynamically what container size I would need and whether to truncate my text.
  12. Thanks Samuel, looking into your example: I've figured out that the hiding in your case works due to the way how you instantiate the texture: advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane); while I do: advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("ui1"); As I'm really not proficient with 3D programming, I do not understand the difference - will read the documentation one of these days. I would prefer not to change the js library - it goes far beyond my knowledge - until 2 weeks ago I've never programmed java script ... For me would be simpler not to use CreateFullscreenUI for the time being and wait till the fix becomes a part of the release.
  13. Hiding and showing controls by using isVisible (like a Rectangle in this case) works if the control is not linked to a mesh by linkWithMesh. Once it is attached, the control stays visible. The inner controls (in my case the text inside the rectangle) can be hidden. See the playground lines 35-42.