Samuel Girardin

Members
  • Content count

    219
  • Joined

  • Last visited

  • Days Won

    2

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
    http://www.visualiser.fr
  • Twitter
    samuelgirardin

Profile Information

  • Gender
    Male
  • Location
    France

Recent Profile Visitors

1,485 profile views
  1. @m.ali It actually works. Here is a castel : maps I get quickly the lat/loncoordinates of the 8 towers. Here is the playground : https://www.babylonjs-playground.com/#4E3KJK#5
  2. hi @m.ali hi you can try that : https://www.babylonjs-playground.com/#4E3KJK#2 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
  3. Hi, @royibernthal I need for a project to enter only number . , backspace and enter. Maybe it can help you to implement your own. https://www.babylonjs-playground.com/#XCPP9Y#158
  4. @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; } https://www.babylonjs-playground.com/#XCPP9Y#156 , only one event is fired
  5. 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
  6. That works if the button is a child of a container (rectangle for ie), and this last with isHitTestVisible set to false : https://www.babylonjs-playground.com/#XCPP9Y#153 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 ?
  7. Hi, Does it work as it should do ? https://www.babylonjs-playground.com/#XCPP9Y#152 One button, property isHitTestVisible set to false, the button is still clickable ? Is that normal ? I was expecting the opposite.
  8. 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,
  9. 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; }
  10. Hi , On a simple playground, it doesnt work too http://www.babylonjs-playground.com/#XCPP9Y#147
  11. 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.
  12. 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 ?
  13. great article ! Thx David. it's time for a deep dive into babylon vr experiences !
  14. awesome !
  15. Hi @adam, About the old'man ragdoll demo. Just few things, it was developped with and for oimo, You cannnot switch to cannon without re-developped all. Babylon physic plugin is just a sort of wrapper which try to unified call to 'similar function' you have in cannon and oimo. In fact there are only similar and the result of those functions is different if you use one or the other. I totally agree with @adam, in fact oldman demo began with a cylinder and 4 bones to simulate a rope.