Jump to content


  • Content Count

  • Joined

  • Last visited

About pichou

  • Rank
    Advanced Member

Profile Information

  • Gender
  • Location

Contact Methods

  • Twitter

Recent Profile Visitors

1818 profile views
  1. Here is the functions I created to draw world border lines from a geojson file around a 3D sphere in https://wazana.io : addWorldLines () { $.getJSON("yougeojsonfileurl", (data) => { let features = data.features; for (let i = 0; i < features.length; i++) { let geo = features[ i ].geometry; let coord = geo.coordinates; if (geo.type == 'Polygon') { this.buildLine(coord); } else { for (let j = 0; j < coord.length; j++) { this.buildLine(coord[j]); } } } this.setStyle();
  2. Hummmmmmm Okkaayyyyyyyy! 😅 I haven't read the document carefully enough. Sorry I did not understand we had to add autoRotationBehavior property. Thanks! Perhaps that could be more obvious in the documentation? @Deltakosh Can you tell me how to make a PR on the documentation please?
  3. Not sure if it's a bug but it seems like camera property idleRotationWaitTime is not working. Look at this playground, whatever the time you put, it always wait 2-3 seconds before starting moving again : https://www.babylonjs-playground.com/#6FBD14#75
  4. Hi everyone, I come here to share with you something While working on a project, I had issues because of the maxSimultaneousLights for a material. Indeed my scene can have a lot of lights. Rather than increasing the maxSimultaneousLights parameter, I thought it would be more performant to check what was the mesh around the light depending on its range. So I ended up with this code : checkIncludedMeshes () { let includedContent = []; for (let i = 0; i < scene.meshes.length; i++) { let mesh = scene.meshes[i]; if (mesh.absolutePosition) { let dist = BABYL
  5. Most of the time geoJSON are made of latitude/longitude coordinates which you can easily translate to babylonJS Vector3 with this function : let getVectorFromLatlng = (lat:number, lng:number, radius) => { var phi = (90-lat)*(Math.PI/180), theta = (lng+180)*(Math.PI/180), x = (radius) * Math.sin(phi)*Math.cos(theta), z = (radius) * Math.sin(phi)*Math.sin(theta), y = (radius) * Math.cos(phi); return new BABYLON.Vector3(x/3, y/3, z/3); }
  6. pichou


    A lot of very nice feedback since WAZANA.IO is featured on the BABYLONJS homepage. I suspect you guys to help me make this game even better! Huge thanks
  7. Hi @ssaket, I needed to keep my latitude longitude approach but thanks to your suggestion, I managed to get the right formula: https://www.babylonjs-playground.com/#VDG184#9 Thanks, I didn't know about the alignWithNormal function but very useful! Cheerz
  8. I am sure the problem is already solved somewhere and well known but I can't find a working solution. I have a sphere with planes around it and I need those planes to be tangent to the sphere depending on its position. I have made a playground with my basic setup: https://www.babylonjs-playground.com/#VDG184#2 You will see 2 solutions I tried but which are not working, one using path3D and one with basic math. Thank you, Pichou
  9. Ok I know how to do it then. But that means I will have to load the files twice and I don't want to do that both for the servers and clients. Guess I will find another way! Thanks for your help @Deltakosh
  10. When I go to my network console and look at the headers, there is always the Content-Length. Maybe there is a way to get the xhr of a task in the assetManager? This way I could calculate the weight I am looking for?
  11. Hum I see! I found we could get the length with the xhr like this : ```parseInt(xhr.getResponseHeader("Content-Length"))``` if you already use it for the progress, I guess we can also have it somehow when the loading is finished? If some task/file doesn't have Content-Length indicated by the server it is ok because the result I want doesn't have to be exact.
  12. Nope to be more specific, the exact thing I am looking for is to know the entire scene weight. Meaning what is the total of data in bytes that need to be loaded in order to render the scene. So after everything has been loaded and not during the progress. Maybe a way to reach the "Content-Length" header of each asset request?
  13. Hello babylonjs community, Is there a way to have the file weight uploaded with the assetManager whatever the type of file? Cheerz, Pichou
  14. pichou


    Sorry @Deltakosh I haven't seen you asked for a screenshot. I even have a better stuff illustrating the game for you (hope this is not too late) :
  15. Very nice simulation! Indeed it hasn't change much my computer performance eventually. I think this is more my curiosity which has pushed me to ask!
  • Create New...