• Content Count

  • Joined

  • Last visited

  • Days Won


JohnK last won the day on October 9

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,142 profile views
  1. setEnabled takes the mesh out of the rendering loop and so does not consume processing time. Whereas isVisible hides the mesh but keeps it in the rendering loop. As always the best way to find out if something works is to try a simple example in the playground When cloning the geometry is copied but you can change materials. An alternative is createInstance this copies the geometry and the texture, so an instance cannot have its material changed. My preference is SPS solid particle system this takes a single mesh and allows you to group copies, as a particles, into a single mesh, so one draw call, but still allows a number of aspects to access individual particles.
  2. Interesting question and from my point of view it is a bit like asking why does Picasso paint faces with both eyes on the same side of a head when they are clearly on opposite sides. Answer because he wanted to. Developing any system depends on the life experiences and views of the developer and since these are different for us all we all see things dfferently. When I first started with Babylon.js my expectations often led me down the wrong path until I learnt not why things were done in the way they were but how things were done. When you are learning it is too easy to look for the pieces you expect to find so you can put them together to build the system you want. However these pieces might not exist. You need to think about what it is that you want to build and what pieces are available that will allow you to build it. For example an alternative way to approach your number 2 could be to load your mesh and then use mesh.setEnabled(false) to keep it out of the way until you need it or even just mesh.isVisible = false. If you need lots of copies of the mesh then perhaps the SPS system might be a better way than cloning. Keep learning and there are many contributers here to help.
  3. JohnK

    Professional support for Babylon.js

    You could ask here if any forum members would provide paid support. Unfortunately my expertise is not at the level you require.
  4. JohnK

    Pixel perfection

    Hi @jurito and welcome to the forum. A playground would be helpful and probably elicit more responses.
  5. JohnK

    SPS particles animation

    Jerome beat me to it. This one uses the box's horizontal position to determine the height fluctuation
  6. Just out of curiosity, does your project require label recreation rather than only changing the text string?
  7. Have to wait for Sebavan to see what the issue is with the code. Here is an alternative that does not use the console or re-create the plane, no increase in time
  8. Have a read through this section it may give you ideas
  9. JohnK

    No keyboard events on new scene

    Have you tried setting the focus on the canvas with code? The canvas element is not focusable by default. You need to set a tab index for the canvas <canvas tabindex=0 ></canvas>
  10. Have you read this yet it could help
  11. Only seen their landing page the camera is limited to zooming in or out, so should be possible with BJS. Do not attach firstPerson Scene camera to canvas. Adjust radius and viewport position and size on keypress, once close enough switch to mid scene only. EDIT Something like this and use W to move forward and S to move back
  12. Not solved yet as there are no blocks behind the "portal" Uses multiple scenes and a viewport. My thinking is to perhaps add a third scene behind the "portal" which you would need to synchronise with the front scene and then use some event to cross through the "portal". Note that if you use a free camera then you would need to change the size of the viewport as you got closer or further away. Also there would be no rotation effect as you moved around, the "portal" would always be flat on the the screen. OK decided to have a go with a background scene. This works with random meshes but having a fixed "street type" scene would be much more of a problem.
  14. You can only work on an imported mesh when you know it has loaded and so you need a callback function see
  15. Thought at first you wanted an edge as well as a fill and so did these PGs Happy playing 😊