Samuel Girardin

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Samuel Girardin

  1. @PhilT, Ok I see your file, main problem with physic engine is there are a hundred ways to do the same thing. Look at this one : Fps is better and at the end we have a solid 60 fps, because idle boxes are out of the simulation. They are not totally out, if a new collision occurs, they will be in again in the simulation.
  2. @PhilT . It's quite better here. Physics engine have their own specifications, it's quite hard to compare them even with raw perfs. Could you share your code, It will be interesting for me to see what value you used with the engines.
  3. @Deltakosh, about a plug in , not for now. I focus on my own game with bjs and energy.js on my spare time.
  4. Thanks for testing energy.js, and i'm really sorry that the engine is really slow.
  5. @MackeyK24, ammo vs energy : about the native engines, bullet (ammo is based on bullet) was developed after Ode (energy is based on ode), so I suppose Ammo is better. About the asm or wasm port with emscripten, ammo is a kind of automatic port, on my side all is done manually I expose only needed classes and methods. About perfs, I really don't know, but the matter is not to say, the engine handle 1000 boxes at 60 fps,. I think physic engine are really tricky, hard to tune, you really have to test and test to perform good simulation., and to learn the engine. About the car demo , both trimesh and heighmap, line 52 set the last boolean to true, and search subdivide repalce 512 by 256, finally it s here Cloth : no. About the plugin I will answer later this day in demo and project topic
  6. Nope, engine is still in alpha. This is not a priority , I need to add features, and fix few memory leaks.
  7. Ammo is really good too. new playground : important : check playground url , must start with http not https
  8. Hello, Energy.js is now on github : sam
  9. Hi, I've made few playgrounds using energy.js (it's a physic engine) , so you can test the engine live. It's still an alpha version, but you can fun ! bounce box ball joint wood machine vehicle (arrow keys) Typescript sources, grunt, etc : github It's quite tricky to get the engine works on the playground (append script and refresh), maybe you can have after multiple run a memory error). sam
  10. Hi, I suppose at work your screen resfresh rate is 75 hz, and 60 hz at home.
  11. HI, I think you have to use rotationQuaternion : sam
  12. @BitOfGold Hi, sometimes my english is bad, could you be more precise and explain me this : 'It maybe will miss important elements in a game like collision events and trigger (collision only) bodies' . Are you talking about object callback when collision occurs ? thx sam
  13. @Deltakosh I ve started that : I m not sure where you want to put it ?
  14. I only use emscripten to produce asm or wasm. The workflow ia exactly the same. I just have to add a specific flag to the compiler to emit asm or wasm. For the moment webassembly was just a test case. About your link, could be useful for heavy math calculation, but Javascript vm are more and more optimized.. Webaasembly is really useful to port existing c++ library to browsers. @Jerome
  15. Thanks guys. A blog post about wasm perf by Alon Zakai
  16. @Deltakosh , I'm going to work on a doc page this week. Another thing, I ported energy.js to webAssembly, it works pretty well : file size is half than the asm.js version, performances are 5-10% better in FF or Chrome. Edge (40.15063.0.0) is far behind, (still alpha support of webAssembly ?). Edit : about Edge, I test the new release in Preview build 16299 , performances are equivalent to ff and chrome. Asm.js version runs almost equally in the 3 browsers. Here is 2 perf tests, asm.js and webassembly. Launch the page clic on the scene and press S, You have to wait all red boxes become gray. Its about 21000ms on my i3 for asm.js and 19000ms for webAssembly. asm.js test webAssembly test Can someone test those demos and confirm webassembly is faster than asm in this particular test ? sam
  17. Hi, Few news about energyJS, It's still in dev. Here is a quick very alpha preview with examples. This is not a bjs plugin version. @RaananW worked one year ago on the plugin. We need to talk about that, For the moment it reproduces more the c inteface of ODE c++ project(http:// It's quite usefull, ODE documentation is really good, and I kept all the method name. Energyjs is port of Open dynamic engine to JS with EMSscripten ( . Tuto1_friction Tuto2_friction2 Tuto3_bounce Tuto4_rolling_friction Tuto5_rolling_friction2 Tuto6_contact_cfm_erp Tuto7_contact_cfm_erp2 Tuto8_motion Tuto1_auto_disable_body WoodMachine BallJoint Trimeshes Vehicle (maybe you need to refresh the html page - loading is async and I forgot to fix that,, same for v+trailers) Vehicle+trailers (arrow key to control the vehicle, d to flip the vehicle) It's only cpu dependent, maybe a little more faster than oimo and canon. Really well documented on ODE's part. You may have a TOTAL_MEMORY bug, search '167108864' in js/energy.js and increased this value. This is just a start. I will publish this week the the typescript dev commented on github .
  18. @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.
  19. lamentably short tutorial ... anyway, maybe something like this : var screen = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI"); screen._rootContainer.getChildByName("whaturlookingfor")
  20. @m.ali It actually works. Here is a castel : maps I get quickly the lat/loncoordinates of the 8 towers. Here is the playground :
  21. 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
  22. Hi, @royibernthal I need for a project to enter only number . , backspace and enter. Maybe it can help you to implement your own.
  23. @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
  24. 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