pichou

Members
  • Content count

    75
  • Joined

  • Last visited

About pichou

  • Rank
    Advanced Member

Contact Methods

  • Twitter
    PichouPichou

Profile Information

  • Gender
    Male
  • Location
    Paris

Recent Profile Visitors

738 profile views
  1. pichou

    Engine resizing method

    The thing I use right now is the camera . I simple set the camera position depending on canvas height : window.onresize = () => { camera.position.z = -10 - (canvas.height - 500)/50; }; And it works, with that simple equation I manage to have the expected behavior. But I don't know, I feel like this is not reliable and that the size could still change depending on screens (I have test it only on mine for now). I have made a playground so that you can see the result : http://playground.babylonjs.com/#ZR8GLF#1
  2. pichou

    Engine resizing method

    Hum not really, With your "fitToView" function you can see in the playground that the skull size is still changing when you change the window height. Then the last suggestion of Ericky14 is actually to update the camera position/radius which I would prefer to avoid because I am not sure I will always have the exact same result depending on screen size with that method. Thanks for the topic though, the questions are similar indeed!
  3. Hello everybody! I have an issue with the resizing method which depends on screen size. When you resize the height of your window, all the elements in the scene are zoom-in or out when the screen height is bigger or smaller. I understand the logic because the bigger your screen is and the more you want to show. First I wonder why the camera position is unchange when the screen size change because the effect really looks like the camera is going up and down? Then in my specific case I don't want this effect to happen and need all the elements to keep the same size in the screen whether this is a big one or not. But didn't find a solution yet. I could set the camera position depending on the height of the screen but it doesn't seem really reliable. Thanks for your help! PICHOU
  4. pichou

    Blurred text

    Hey @Deltakosh, I know this library fabricjs which seems to have no issue to have good text rendering with webGL : http://fabricjs.com/ Plus I have made some research and found this article very interesting with a working example : http://wdobbie.com/post/gpu-text-rendering-with-vector-textures/ Then I also found this stackoverflow which list several techniques with its pros and cons : https://stackoverflow.com/questions/25956272/better-quality-text-in-webgl Maybe you already know all of that but I hope that can help! Cheerz, Pichou
  5. pichou

    Blurred text

    Thanks guys a lot for all your answers! Just by curiosity, how do other game engine manage to have good text quality? Plus for me this is not only text but also images, but I guess the problem is link.
  6. pichou

    Blurred text

    I have notice that the text created with babylon gui is blur. So I tried to put a classic html div and a gui text next to each other and the result is really obvious. I have made a playground to see it : https://www.babylonjs-playground.com/#2ARI2W#3 And attached you will find a screenshot of what I see. Plus I get the same thing with images, they are really blurred! First I wondered if this is only on my computer/screen that it is blurred like that. Some of you also have this problem? I have looked for a solution and the best I have found is to use the setSize function of the engine : https://github.com/BabylonJS/Babylon.js/blob/master/src/Engine/babylon.engine.ts#L2250 And it works I have better texts icons and images, but then a lot of other stuff were broken like the scene.pick function because the canvas size doesn't match with the screen size anymore I guess. So I just wonder why canvas can't have a better resolution and if there is a fix maybe? Bye bye, Pichou
  7. pichou

    Youtube video as a Source for Video Texture

    Still no way to do that? I saw threejs can handle youtube video : https://threejs.org/examples/#css3d_youtube Do not misunderstand me, I am not saying threejs is better than babylonjs, I am saying if threejs can do that, it sure has to be a way to do it in babylonjs? Cheerz, Pichou
  8. pichou

    inputText dynamic resize

    Hi @Deltakosh, Do you know a way to have one textarea? I saw you can have one with castorGUI library, but my input need to be on a plane or mesh. Plus I think the inputText is kind of poor in term of user interaction, no shortcut, can't copy/paste, no text selection. Do you think I could maybe have access to the code in order to improve it? I have looked at the code here and I think some things are doable : https://github.com/BabylonJS/Babylon.js/blob/master/gui/src/controls/inputText.ts Cheerz, Pichou
  9. pichou

    inputText dynamic resize

    To go further do you know a way to have a textWrapping on InputText like on TextBlock? I am looking for a textarea input but can't find a way to do that with the current InputText of Babylon. Here is a repo : https://www.babylonjs-playground.com/#UWS0TS#17 Thanks! Pichou
  10. pichou

    .babylon Model Library

    Hey @Raggar and @Deltakosh, I looked further and I found out that when I import the mesh there is actually a lot of meshes in the claraio's babylon file (between 10 to 30) when I expected just one. This is why when I tried to change the mesh properties it didn't work because I was moving or scaling only a part of the object. There is one mesh for each part of the object, for instance for this iphone 5S (https://clara.io/view/862d84a1-7dd3-4c69-a053-c0a90b7f994d) I get 24 different meshes with names like "button_volumedown", "light sensor", "powerswitch", etc. I guess when claraio uses the blender exporter they don't merge all of the object parts to end up with only one mesh. With some hope, I tried to use the function BABYLON.Mesh.MergeMeshes but didn't work héhé! Is it normal to have all that separate meshes? @Raggar do you have the same thing in the model you use from claraio? If it is the case how do you deal with that issue? Thanks guys!
  11. pichou

    .babylon Model Library

    The models coming from clara.io doesn't seem to work with babylonjs. I tried a few files but with obj file there is parseJSON error during importing and with a babylon file the mesh is imported but when you set one parameter (position, scaling, etc) it does nothing to the mesh. Anybody has the same issues? I will try to send them a message!
  12. pichou

    AdvancedTexture adapt to mesh size

    Okay playing with uvScale was my first idea (you can see it in the playground ), but it makes weird stuff. Guess I will keep searching for the right fomula as you suggest @Deltakosh Otherwise I thought to recreate the texture and its content once the plane stop moving but this is a shame!
  13. Hello everybody, Long time I haven't post anything here as my life with babylonjs is going smooth and well. But unfortunetly I am now stuck! I am looking for a way to adapt an advanced texture size depending on the mesh size so that the text on it will keep the same font and shape. I have made a playground to make my request more clear : https://playground.babylonjs.com/#RICIF8 Thanks a lot! Pichou
  14. pichou

    scene.onPointerUp firing twice.

    Thanks @RaananW! Works perfectly with observables. So does it mean that we have to always use obvervables instead of onPointerUp/Down because they will not be maintained anymore?
  15. pichou

    scene.onPointerUp firing twice.

    Yes, I noticed the same thing. Had to use a test to ignore the second trigger.