• Content count

  • Joined

  • Last visited

  • Days Won


JohnK last won the day on September 9

JohnK had the most liked content!

1 Follower

About JohnK

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    England, Buckinghamshire

Recent Profile Visitors

3,148 profile views
  1. Tutorial Talk

    Like the "watch it happen" idea and a PG version would be great. Just to let you know that though the page you linked to will continue to exist as the guide will continue to exist I am still working on re-structuring the official documentation which I hope to finish soon and submit to DK for his approval. The development of this is online for checking but still a couple of issues or so. To understand translate, rotate and spaces you will now need to read the following page and perhaps these as well,_rotation,_scaling (but note that if documentation is updated these links will probably stop working) Cannot help you with VR but when I have finished with the documentation would be happy to help with an interactive tutorial. Go idea to start doing on a PG but perhaps it might be better hosted separate to the PG as a new repository on babylon.js github. Looking forward to your first attempts.
  2. new BABYLON.Vector3(10 * Math.sqrt(1 - 0.017 * 0.017) * Math.cos(alpha), planet.parent.position.y, 10 * Math.sin(alpha));
  3. Where point on ellipse is given by (a.cos(theta), b.sin(theta)) with b < a and with eccentricity e, then b = a.sqrt(1 - e2)
  4. Material Not Correct in Latest BJS

    Seems to be a Firefox error. Turns out it is OK in Chrome and Edge. Should try it out in other browsers first before submitting a bug. Will remember in future.
  5. Way to Fit one Mesh into Another

    Let A be the mesh to be split and let B be the mesh that goes in the middle when A is split. With CSG overlap B on the right hand side of A and cut away to form C. With CSG overlap B on left hand side and cut away to form D. Position and join C, B and D in that order, C to left of B and D to right of B. Because of how parts cut out CBD will fit snuggly and merged to form a new mesh. At least we can hope.
  6. Material Not Correct in Latest BJS

    You can clearly see the problem by viewing the latest and stable versions in the playground Latest Version Stable Version
  7. Babylon.js render canvas not open in tab?

    The script in your first post = "none"; and the script in the W3schools link are not the same. As I said you cannot set style to an array
  8. Babylon.js render canvas not open in tab?

    Hi and welcome to the forum and Babylon.js. Unfortunately I have to tell you there are many errors in your Javascript code. Really you need help with Javascript at this point not with Babylon.js so perhaps another forum might be more appropriate. Until you get this part of the code correct I would not insert a renderCanvas and try to use Babylon.js but rather replace renderCanvas with text and get your code working correctly to view the text. Change to <div id="Tokyo" class="tabcontent"> Can I see this text? </div> However this time I will give you some pointers. You start out with all divs with class tabcontent as display:none and there is nothing in your code that changes that. tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { = "none"; } tabcontent is an array of elements with classname "tabcontent". You cannot set a style to an array but you can to an element of this array. Same issue with tablinks.
  9. Being a simple minded man I came up with a simple minded solution with things as they are A little bit of work necessary but could help until someone does a lot of work on the code.
  10. You will have to get the rotation using rotationQuaternion as using rotate sets rotationQuaternion and sets rotation to zero. If you then want the x, y, and z values to use with rotation use See also You could also keep a running total for rotations around Y or Z axis and set incremental rotation around Z to 0 when it gets more than Math.PI/4 ( or less than -Math.PI/4 in other direction)
  11. I have a question about cyos.

    Hi and welcome More information here
  12. This is what I meant when I said FF will allow you as a default, Chrome needs to have some setting changed. While it can be unsecure to load a file locally from your computer this is OK if YOU have created or know exactly the contents of the file you are loading. If you have just downloaded a file from the web then all the usual risks are there. Being very very careful I would not load any file from the web onto my computer and then into a project even if running a local server unless I absolutely trusted the source.
  13. Have added z rotation to "A" and "D" and changed Y rotation to WORLD. If you are happy with this you can tidy it up, remove "E" and "Q" and change to mouse as you wish.
  14. Don't have time to think about it until tomorrow but if you would settle with controlling only the yaw and pitch of the plane then as you turn the plane it should be possible to come up with values for the pitch and roll that would bank the plane and keep it on a level flight. If that would be OK I will think about how it could be done. I suppose if you wanted full control then a mouse for yaw and roll plus keys for pitch might make a controllable plane for a user.
  15. Ahhh by plane you mean airplane not a mathematical plane. See if reading this helps You are correct in that you want to simulate the banking of a plane as it turns so you cannot just yaw you have to roll as well. Now things get complicated quite quickly - you want to rotate a little bit about the local z axis (roll) as you rotate a little bit about the local y axis (yaw) to bank the plane. However rolling causes the local y axis to go off vertical and so any yawing about the local y axis will turn the local z axis up or down and so the plane will fly upwards or downwards and to keep the z axis level to the ground you need to pitch as well. Difficult to control using keys