Jump to content

JohnK

Members
  • Content Count

    1401
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by JohnK

  1. You will need to find out more about the data structure of a mesh from https://doc.babylonjs.com/how_to/custom https://doc.babylonjs.com/how_to/updating_vertices
  2. ScrollViewer now available and enhanced by DK
  3. Having read how Jerome did it I updated to this one https://www.babylonjs-playground.com/#UIIK1W#2 which also does random letters only. Note face 1 faces forward.
  4. Here is a version that gets close. Its in Javascript rather than typescript but might help you spot any issue with your PG. Doesn't deal with non-letters and letters are applied to all sides. Also I made the cuboids immovable but this can be removed. https://www.babylonjs-playground.com/#UIIK1W And here is one using an second SPS of labels in front of the cuboid https://www.babylonjs-playground.com/#UIIK1W#1
  5. Disappointing about rawgit. A couple of things in your playground 1. you assign obje106 to mesh named obje128 so console.log(obje128) will always be undefined. 2. you cannot load directly from github but you can the raw file 3. The console.log outside the import loop will always give you undefined. So here we have the yacht loading but not all the textures (we will need to find a replacement for rawgit) https://www.babylonjs-playground.com/#IRRN4C#1
  6. This will help you to use your assets in the playground https://doc.babylonjs.com/resources/external_pg_assets
  7. Not really to do anything with an imported mesh you have to wait for it to load so all code for it has to be in the function(newMeshes) {....}. Using the assetsManager it is possible to import and store a number of meshes from a variety of files and keep the code that accesses the meshes separate. This code is only run when the assetsManager has finished. Do not know the reason why (probably something to do with skeletons or submeshes) but in the PG I posted if you replace var rabbit = newMeshes[1]; with var rabbit = newMeshes[0]; The 'rabbit' loads but is not c
  8. When using SceneLoader.ImportMesh before you can access any mesh stored in the file that file has to load. The parameter function(newMeshes) {......} is a callback function, that is it is only executed when the file has been loaded. While it is being loaded any code following SceneLoader.ImportMesh will still be executed, which is a call to console.log and as the file has not yet loaded obje106 does not yet exist. Cannot see what is wrong here. A version working in the playground https://www.babylonjs-playground.com/#ARI3S1
  9. The flashing is because of z-fighting with the textures. You prevent this by separating the meshes (line 210). Having stopped the rotation the direction of separation has to change from z to y https://www.babylonjs-playground.com/#W8L8IP#2 As you want the shape too be in XoZ plane and to rotate, then sprites will not work as they always face the camera. You can achieve the same idea with a transparent image on the ground plane ( the image used would need improving but shows the idea) https://www.babylonjs-playground.com/#8UZ3JD
  10. A search in the docs for rebuild lists 31 classes in the API?
  11. Here is a simplified version in a playground, using a GUI rather than tab switching, showing that engine.stopRenderLoop() does work but with issues https://www.babylonjs-playground.com/#ZMDY27 Issues Does not stop on first click of Stop button but click again and the stop - start works. Needs the setTimeout to work, maybe because in the playground (or maybe not) When re-starts it goes from the initial setup not a continuation. This is about as far as I can help you now need someone who knows the engine better than I.
  12. Hi @yagmur and welcome to the forum. In order to help more information is needed. As a minimum which class are you using rebuild with? Even better a description of what you are trying to achieve and even better still a playground example.
  13. We really need some code to help. If a playground is not possible, then a live example or if not possible a simplified version of your code. This gives an example of using stopRenderLoop in a playground to run multiple scene
  14. How about just stopping the rendering with engine.stopRenderLoop() and restart with engine.runRenderLoop() as you swap tabs. Never tried it so do not know if any problems restarting at exact point engine was stopped, for example if an animation was running.
  15. With meshes you could do it this way https://www.babylonjs-playground.com/#W8L8IP using https://doc.babylonjs.com/snippets/line2d and note that because CreatePolygon uses earcut for your own project you will need a copy from github. If you are just working in 2D then a sprite may suffice.
  16. You may find this useful https://www.babylonjs-playground.com/#E0KDHN as well which rotates the mesh using lookAt EDIT 21/12/2018 A bug in lookAt, to do with z -direction, was corrected in BJS 4.0 making the correct version of the above PG for version 4.0 and above https://www.babylonjs-playground.com/#E0KDHN#2
  17. JohnK

    Wikipedia

    On hold again as it was put on by a banned user.
  18. Here are some PGs playing around with width, needs more thought and work https://www.babylonjs-playground.com/#XCPP9Y#725 and with % https://www.babylonjs-playground.com/#XCPP9Y#726
  19. Hi @zen85 and welcome to the forum. In the playgound BABYLON.SceneLoader.ImportMesh("", "./scenes/", "dummy3.babylon", scene, ./scenes/ gives the relative path to the image dummy3.babylon. within the playground file structure. If your file structure does not include the file dummy.babylon within a folder called scenes at the same location as your html file then SceneLoader will not be able to find the file. The second parameter must contain the relative or absolute path of the actual location of the named file. EDIT correction made as per ssaket post following this one.
  20. You can build your own custom version. The only way I could do it I will describe below. Others may know alternatives You build from a local version of the BabylonJS/Babylon.js github repository. Read https://doc.babylonjs.com/how_to/how_to_start and rather than creating your own fork and cloning from that just clone directly to your local computer. Before doing the build part read https://doc.babylonjs.com/how_to/workloads to see which workloads to select and place in the `buildConfigurations` and set the `currentConfig` to this. The do the build part with gulp --max-old-space-size=
  21. JohnK

    Wikipedia

    Have renamed page to Babylon.js to match French and Russian versions BabylonJS will redirect
  22. JohnK

    Wikipedia

    https://en.m.wikipedia.org/wiki/BabylonJS EDIT 17 Nov 2018 On hold again as it was put on by a banned user. EDIt 1 Dec 2018 Back on line again - hope it holds this time
  23. Sorry do not know what you mean please explain.
  24. Hi @Brabbit_640 welcome to the forum for point rendering this thread is also worth a read mesh building possible provided, as trevordev said, you know how to triangulate (if that's the right word) the points.
×
×
  • Create New...