• Content Count

  • Joined

  • Last visited

  • Days Won


JohnK last won the day on September 11

JohnK had the most liked content!


About JohnK

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    England, Buckinghamshire

Recent Profile Visitors

5,019 profile views
  1. Some things for you to play with. In this PG Try commenting line 22 or line 23 or both. Different values on lines 27 and 28. Use 0, 1 or 2 as a value for line 32. Just don't ask me to explain 😵
  2. JohnK

    About the script positioning issue

    Have turned you code into a playground can you describe in terms of the logo_cube, the red cube and the blue cube what you want to ? Here are some other PGs perhaps one or both of them will make it easier for you to explain what you need.
  3. Quite possibly. I am just throwing the idea out there. In my opinion the camera for a FPS project would be controlled differently than one for a flying project. You could well be right. Let's see what further reactions there are.
  4. BABYLON.flightCamera😵😎as a new camera instead of new input controller?
  5. JohnK

    About the script positioning issue

    Sorry but personally only look at Playground examples. Are you asking something along the lines of I have two Babylon scenes, scene A and scene B. For scene A I have created code A which are click events for scene A. In the same way for scene B I have created code B which are click events for scene B. Scene A and code A are different to scene B and code B. Is there a way I can export code A along with scene A and also separately code B with scene B so that having done this I would like to set up a single project where I can import scene A and scene B and for the appropriate click events to work in the correct scene?
  6. JohnK

    About the script positioning issue

    Not very sure about what you need do these help? They are here as a solution to the problem of that topic.
  7. @timm as promised I did some work on question 1 Lines 140 to 148 use a temporary dynamictexture to calculate a ratio to use with the width of the dynamictexture and the oval in order to find a suitable font size. Probably you could use just the textTexture dynamictexture once to find ratio and then drawText on it. EDIT yes you can
  8. @timm Reference your questions above 1. Do not have an immediate answer but have an idea I will try later 2.1 In some sense by using a tiny offset you are doing in 3D the HTML/CSS equivalent of setting a different z-index, so yes this is the way to do it. 2.2 It is because you are setting the opacityTexture of your textMaterial based on your textTexture which is a black and white image making the white areas transparent, just remove line 148
  9. @tham_kathy as it says in the docs and You have given the base data in clockwise order. Reversing the data pairs and relabeling the planes to match this new order gives To change an existing playground just edit and save, the playground number will just increase to the next available number, real easy.
  10. I am busy for a few of days. Have a read of as it is much easier for someone to work with a playground. Could be the end of the week before I have time to try out your HTML file.
  11. Hi @timm and welcome to the forum from me. Well done with your solution. Here is an alternative using extrudePolygon but probably no better than yours as it has a couple of disadvantages 1. Edge rendering round circles shows up 2. You can see in the docs that for non-playground use extrudePolygon requires Earcut to be installed. Also note that the path for the polygon needs to be in XZ plane
  12. JohnK

    issues with toEulerAngles

    Whenever the rotationQuaternion is set for a mesh then rotation values are ignored and setting a value for mesh.rotation will have unpredictable results. So set a variable to mesh. rotationQuaternion.toEulerAngles() , null the rotationQuaternion and then set the rotation to the stored value. See the difference when you comment out line 48 is
  13. Found some raw data here added some commas and turned into an array and could not save the array in the PG as got `too long` message so had to add as external file to get Give it a moment or two to load up. If it says 'positions not defined` click the RUN button.
  14. JohnK

    How to join two walls as one?

    Doors work OK if you need them. A bungalow based on this one (very loosley)
  15. JohnK

    How to join two walls as one?

    Here we go, have re-written the buildFromPlan function and now you can use an interior: true within the options. This builds one or more walls that do not join end to start. After building the main walls you can add interior walls by giving positional coordinates, based on the base data. As the walls are given thickness in the direction away from the origin if you find the depth of the wall is on the wrong side just reverse the corner coordinates in the array, ie [4, 2, 4, 8] becomes [4, 8, 4,2]. Here are some of examples Doors and windows should work but have yet to try that.