• Content count

  • Joined

  • Last visited

  • Days Won


royibernthal last won the day on September 17 2016

royibernthal had the most liked content!

About royibernthal

  • Rank
    Advanced Member
  • Birthday 11/28/1991

Profile Information

  • Gender

Recent Profile Visitors

1,356 profile views
  1. Dynamic diffuseTexture path in babylon file

    Is that the final conclusion?
  2. Dynamic diffuseTexture path in babylon file

    Deltakosh Can you be more specific? I'd like to try to make a PR.
  3. Dynamic diffuseTexture path in babylon file

    Where in the scene would I need to add the logic? (before the texture is loaded)
  4. Dynamic diffuseTexture path in babylon file

    Sure that would work too. Would the observables be static?
  5. Dynamic diffuseTexture path in babylon file

    Hi @RaananW, thanks for the detailed response. I like the style of your first suggestion, but it'd be great to have a less cumbersome solution. I'd like to add something to bjs source, maybe a static callback in the first line of Texture/parse(): if (Texture.urlParser != null) = Texture.urlParser(; I'm not sure if it's most fitting place to do this, but it does the job. Otherwise, something of the sort somewhere between the plugin's loadMesh() to Texture/parse(). What do you think? Raanan? Deltakosh?
  6. I'm loading a mesh from a .babylon file using AssetsManager/addMeshTask(). The diffuseTexture path is defined inside the file. I'd like to change the diffuseTexture's path dynamically before the texture is automatically loaded by bjs. Ideally there could be some callback after the .babylon is loaded and before bjs starts loading assets that are referred to in that file. My goal is to load regular textures on desktop and optimized textures on mobile.
  7. When using Adaptive scaling, GUI calculates the final positioning and dimensions of controls according to idealWidth / idealHeight. When the stage scale is adapted, the width and height of controls returns scaled values. Is there a way to retrieve the original values (before adaptive scaling is applied)? Lately I found the need for that when setting dimensions during play - to do that I need to set the ideal values which will later be scaled by GUI. For instance, at a certain event I need to change the children of a container and then change the width of the container to be the sum of all its children's widths. When the stage is rendered at its ideal size there's no problem, however when it is scaled, the widths returned by the controls are scaled as well, and after setting the container's width to the already scaled sum of the childrens' widths, it is then scaled again by the GUI (as expected). How can I access the original values before adaptive scaling is applied? I guess I can create some util function to take into consideration current scale vs ideal, but it can make things cumbersome (especially when dealing with many such cases). Is there by any chance a built-in solution? If not, it'd be great to have something like "original" object property in controls containing the original values like: { x, y, width, height } Or alternatively parameters like width and height in controls can return the original values, which seems to me more practical (unless there are use cases I'm missing). This way or another, it'd be great to be able to get and set both the original and adapted values of controls.
  8. GUI - Adaptive Text Block Font Size

    Great thanks
  9. GUI - Adaptive Text Block Font Size

    Step 1: resize window to smallest Step 2: hide Step 3: resize window to biggest Step 4: show Result: Very small text until resized again Still correct for you? I'm using the latest Chrome on Windows 10 and I made sure to clear my cache.
  10. GUI - Adaptive Text Block Font Size

    Hmm true, I noticed a bug though - The font size is only adapted while the text block is added to stage, it should be adapted on addControl as well. Try to remove the text block, resize the window, then add the text block again:
  11. Deltakosh - When using adaptive scaling it'd be great to have all Text Blocks font sizes adapt to the resized stage automatically instead of scaling / resizing the Text Blocks - which looks very poor. I'm actually doing on PIXI something similar and it works great: For instance, the idealWidth (of the stage) is 800, at that size the "idealFontSize" is 36. When the window is resized to the width 400, the new font size of the Text Block will be 18. (36*400/800) When applying this solution, naturally any other kind of scaling / resizing can't be applied to Text Blocks. What do you think?
  12. GUI - Enter and Out callbacks not called in button on mesh

    Just saw this, thanks
  13. PIXI.Text doesn't look good when scaled down

    I think I got the picture, I'll see how I'll deal with this. Thanks
  14. PIXI.Text doesn't look good when scaled down

    I was afraid these might be the answers. How would you go about rescaling only the text to its original (unscaled) size after scaling its parent(s)? I could multiply recursively the scale of all its parents and use it to revert the text scale, but is there a better (and more efficient) way to do it?