Samuel Girardin

  • Content count

  • Joined

  • Last visited

  • Days Won


Samuel Girardin last won the day on February 4 2016

Samuel Girardin had the most liked content!

1 Follower

About Samuel Girardin

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

1,698 profile views
  1. Getting controls in GUI

    @Deltakosh I hope there is no missunterstanding with my post. I was totally shocked by this 'lamenta...' . Je voulais être grossier au début. Mais ce n'est ni le lieu, ni la manière d'être ici. Bref des baffes se perdent.
  2. Getting controls in GUI

    lamentably short tutorial ... anyway, maybe something like this : var screen = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI"); screen._rootContainer.getChildByName("whaturlookingfor")
  3. Positioning geographic coordinates to model

    @m.ali It actually works. Here is a castel : maps I get quickly the lat/loncoordinates of the 8 towers. Here is the playground :
  4. Positioning geographic coordinates to model

    hi @m.ali hi you can try that : It comes from BING map API. Works like a charm. var levelOfDetail = 18 //between 1 and 22 give your lat long in pixel in map tile. You can use that //to got some correct 2d value for positionning your object // 1 is 782715170 meters/pixel // 22 is 0.0373 meter/pixel // 18 p1.subtract(p2) give me something like (-15,68) , you can work with that // 20 more precise give (-60 , 272) . var a= LatLongToPixelXY(50.030462313669034, 26.467167212377877,levelOfDetail) ; var b = LatLongToPixelXY(50.03022756277145, 26.467086619328583,levelOfDetail) ; console.log(b.subtract(a)) ; var clip = function (n, minValue, maxValue) { return Math.min(Math.max(n, minValue), maxValue); } var mapSize = function(levelOfDetail) { return 256 << levelOfDetail; } var MinLatitude = -85.05112878; var MaxLatitude = 85.05112878; var MinLongitude = -180; var MaxLongitude = 180; var LatLongToPixelXY=function(latitude, longitude, levelOfDetail) { latitude = clip(latitude, MinLatitude, MaxLatitude); longitude = clip(longitude, MinLongitude, MaxLongitude); var x = (longitude + 180) / 360; var sinLatitude = Math.sin(latitude * Math.PI / 180); var y = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI); var mapsize = mapSize(levelOfDetail); var pixelX = clip(x * mapsize + 0.5, 0, mapsize - 1); var pixelY = clip(y * mapsize + 0.5, 0, mapsize - 1); console.log("x",pixelX) ; console.log("y",pixelY) ; console.log("____________") ; return new BABYLON.Vector2(pixelX, pixelY); }; sam
  5. GUI - Input TextBlock

    Hi, @royibernthal I need for a project to enter only number . , backspace and enter. Maybe it can help you to implement your own.
  6. GUI - isHitTestVisible

    @deltakosh I think you bug in your fix , you have deleted the if statement in _processPicking (button.ts) if (!this.contains(x, y)) { return false; } , only one event is fired
  7. GUI - isHitTestVisible

    public _processPicking(x: number, y: number, type: number): boolean { if (!this.contains(x, y)) { return false; } // new if (!this.isHitTestVisible) { return false; } in button.ts the if on isHitTestVisible seems to fix my problem. I'm quite sure that's a dirty solution
  8. GUI - isHitTestVisible

    That works if the button is a child of a container (rectangle for ie), and this last with isHitTestVisible set to false : On the first case, even if the button is at the top level (child of the advanced texture), isHitTestVisible is not take into account. It looks like it's missing loop through the childrens. @Deltakosh any idea ?
  9. GUI - isHitTestVisible

    Hi, Does it work as it should do ? One button, property isHitTestVisible set to false, the button is still clickable ? Is that normal ? I was expecting the opposite.
  10. PositionKind return unusual coordinates

    Hi, In fact, your mesh is exported from your 3d software with a scale, rotation, and translation. The vertex buffer come from your original mesh. Maybe you can try something like resetXfrom(in max), don't know the equivalent in blender. Hope this helps. "meshes":[{"name":"Sym_trie Sock sock","id":"Sym_trie Sock sock","materialId":"feet.Female_Mesh","billboardMode":0, "position":[-1.4393,-0.0012,-0.0036], "rotation":[-1.5708,0,0], "scaling":[0.069,0.069,0.069],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[38.3717,-10.4411,0.0043,
  11. In advancedDynamicTexture.ts or the whole js file Around line 205. You can add. Maybe I'm wrong. It seems to fix the pb. if (projectedPosition.z < 0 || projectedPosition.z > 1 ) { control.isVisible = false; continue; } // add this above the first if if (!control.isVisible) { continue; }
  12. Hi , On a simple playground, it doesnt work too
  13. TypeScript preprocessor for vs community ?

    Hi @Wingnut, thanks for the link. When I was asking myself that it would be cool to have this preprocessor thing, I didn't realize the subject is open since 2 years... My side is pro #DEFINE #IF. But I'm really a rookie on this part. I'm testing performances on 'low' level memory access for my project. I have plenty of methods like : //#IF SAFE this.q = ETools.Malloc_new_quaternion(); E.dGeomGetQuaternion(this.dxGeom, this.q); return ETools.Pointer_To_Vector4(this.q, true); // #IF FAST return [Module.HEAPF64[((this.pointer_rot) >> 3)], - Module.HEAPF64[((this.pointer_rot + 8) >> 3)], - Module.HEAPF64[((this.pointer_rot + 16) >> 3)], - Module.HEAPF64[((this.pointer_rot + 24) >> 3)]] And it would be really cool to compile the safe or the fast project easily with only the code I need. Performance test will be easier, and my 'productivity' will increase. I will stay tune on this preprocessor thing. And it's not to hot on the boat for the moment.. I hope you're doing well too. @unintellisense, thanks for your post. I'm really bad with gulp, etc. I never took time to learn how to use it. That's why I was asking for a 'ready to fly' magic preprocessor button ! Maybe I will write a simple parser that will erase the unwanted code before compiling.
  14. Hi, That's not really bjs related, But does anyone know if there is a TypeScript preprocessor plugin. for vs communty It could be useful to have some #DEFINE #IF etc, to manage different version ? I only found some exotic workflow and not related to visual studio. Any infos ?
  15. great article ! Thx David. it's time for a deep dive into babylon vr experiences !