lhx880619

Members
  • Content count

    27
  • Joined

  • Last visited

  1. thanks @Deltakosh , since i have no problem with the export tool , and i can load the normal .babylon file. i just need some demo to show me how to load the binary model to scene. use assetmanmger.addBinaryFileTask ? do you have full demo of loading binary model ?some pg links?
  2. hi all, i just want to konw how to use the binary files exported by 3dmax using Max2Babylon-0.8.0. when i export from 3dmax i got a list of binary files which one should i use.
  3. calculate camera position to fit mesh size

    @jerome so this issue is related to the aspectRatio ha, thank you so much, problem solved. for those who got the same problem, pls see this https://www.babylonjs-playground.com/#P6JAWE#2 works good on both pc and mobile. the key is to take aspectRatio into consideration.
  4. calculate camera position to fit mesh size

    @JohnK yes, the mesh is in the center, but my purpose is to see the whole mesh. on my mobile phone, you can't see the whole mesh. but pc you can see the whole mesh. so i think the position.y of camera is something related to the fov of the camera? to see the whole mesh from top, i shoud get the max size of x,z and camera.y=max/ tan(fov/2) not this but should be like this
  5. calculate camera position to fit mesh size

    @JohnK sorry to bother you again, would you pls give me some advise about this problem?
  6. i just had a problem to calculate the camera position to fit all kinds of size of meshes. this pg make the mesh in the center of the screen (you can change the ground size), but not working on mobile devices. don't know why. https://www.babylonjs-playground.com/#P6JAWE
  7. @Gijs it means we should calculate the boxinfo manually? i suppose there's something like updateBoundingbox() function for parent mesh to auto update the boundingbox.
  8. hi all, i'm trying to calculate the boundingbox of a parent mesh, so that i may get a good camera asprect. but failed to get the boundingbox size of the parent. are there any tricks there? pg http://www.babylonjs-playground.com/#QVIDL9 // Our built-in 'sphere' shape. Params: name, subdivs, size, scene var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); // Move the sphere upward 1/2 its height sphere.position.y = 1; // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene); var parent = new BABYLON.Mesh("parent",scene); sphere.parent = parent; ground.parent=parent; parent.showBoundingBox =true;
  9. @JohnK cool !!! thank you so much for your help.
  10. @JohnK that's looks like what i'm searching for. but still need to bother you, another question is that polygonmeshbuilder only support polygon, how to add curves? i think path (with lines & curves) is the best data structure to describe what i'm doing. i want to draw 2d map, and then build 3d visuals. here is some screenshot for what i'm working with. just a 3d map for shoping mall. do you have any idea?