JohnK

Members
  • Content Count

    1,276
  • Joined

  • Last visited

  • Days Won

    37

Reputation Activity

  1. Like
    JohnK got a reaction from ssaket in Pick a point in the space with mouse.   
    Here is an experiment https://www.babylonjs-playground.com/#RQ2T0A#15
    Still a lot wrong with it, as in
    not very accurate the scaling on line 85 is made up with no logical basis though it does seem to work (?????) rotating the camera means the x position of gizmo is reflected Maybe it could lead somewhere! 🙂
  2. Like
    JohnK got a reaction from ssaket in Pick a point in the space with mouse.   
    Here is an experiment https://www.babylonjs-playground.com/#RQ2T0A#15
    Still a lot wrong with it, as in
    not very accurate the scaling on line 85 is made up with no logical basis though it does seem to work (?????) rotating the camera means the x position of gizmo is reflected Maybe it could lead somewhere! 🙂
  3. Like
    JohnK got a reaction from kcoley in Failed to use CSG function to add a hole on a mesh created via CreateRibbon function   
    Hi @JZ7878 and welcome to the forum from me. The issue is the use of double sides for the ribbons. To ensure the normal directions for the sides are correct (ie point away from solid) to produce the 'solid looking' mesh you need to swap the order of some of your arrays. I have done this by using the reverse function but you could change the appropriate arrays by hand. The 'direction' of the ribbon will also affect how CSG works. So here is a cube made up of single sided ribbons in correct direction
    http://playground.babylonjs.com/#J4H6RF#3
    You can also remove the backface culling lines.
    I stuck to using a standard box as it was easier to experiment with just one 'ribbon cube'.  You can try the same approach with a 'ribbon hole maker' making sure normals will be correct.
  4. Like
    JohnK got a reaction from kcoley in Failed to use CSG function to add a hole on a mesh created via CreateRibbon function   
    Hi @JZ7878 and welcome to the forum from me. The issue is the use of double sides for the ribbons. To ensure the normal directions for the sides are correct (ie point away from solid) to produce the 'solid looking' mesh you need to swap the order of some of your arrays. I have done this by using the reverse function but you could change the appropriate arrays by hand. The 'direction' of the ribbon will also affect how CSG works. So here is a cube made up of single sided ribbons in correct direction
    http://playground.babylonjs.com/#J4H6RF#3
    You can also remove the backface culling lines.
    I stuck to using a standard box as it was easier to experiment with just one 'ribbon cube'.  You can try the same approach with a 'ribbon hole maker' making sure normals will be correct.
  5. Like
    JohnK got a reaction from kcoley in Failed to use CSG function to add a hole on a mesh created via CreateRibbon function   
    Hi @JZ7878 and welcome to the forum from me. The issue is the use of double sides for the ribbons. To ensure the normal directions for the sides are correct (ie point away from solid) to produce the 'solid looking' mesh you need to swap the order of some of your arrays. I have done this by using the reverse function but you could change the appropriate arrays by hand. The 'direction' of the ribbon will also affect how CSG works. So here is a cube made up of single sided ribbons in correct direction
    http://playground.babylonjs.com/#J4H6RF#3
    You can also remove the backface culling lines.
    I stuck to using a standard box as it was easier to experiment with just one 'ribbon cube'.  You can try the same approach with a 'ribbon hole maker' making sure normals will be correct.
  6. Like
    JohnK got a reaction from Deltakosh in 2D Compass   
    Hi @Alan R and welcome from me. Some alternatives
    https://doc.babylonjs.com/babylon101/sprites
    https://doc.babylonjs.com/babylon101/materials#transparent-texture-examples with a plane.
    https://doc.babylonjs.com/resources/babylonjs_and_pixijs
  7. Like
    JohnK got a reaction from DylanD in Color Blindness in BabylonJs   
    This page may help with color design choices https://www.hallaminternet.com/accessibility-colour-blind-users/
  8. Thanks
    JohnK got a reaction from Shahzaib 3d Customizer in I NEED HELP IN Clock time Function in babylon js 3d configurator   
    Also @Shahzaib 3d Customizer can I gently remind you that members come to the forum as and when they are available and answer questions in their own time frame. While this is one of the most responsive and helpful of all forums and people are only too happy to help I would get annoyed if some one was pinging me even a couple of times an hour so on behalf of NasimiAsl and others who might reply to you a little patience goes a long way 🙂
  9. Like
    JohnK got a reaction from ssaket in How to load a videoDome without showing it right away?   
    Hi again using the principle that it is better to teach someone to fish than catch the fish for them😊 -
    if you go to the API in the docs, scroll down to videoDome an open it then look through the properties and methods you will come across
    setEnabled So you ask yourself can I use this, how do I try it out? You go to the docs and search for videoDome which brings you to the how to do 360 video page. On this page there is a playground example. Next quetion is how do I reset dome.setEnabled if I set it to false? Use a clickable button, Next check out the GUI page of the docs and read about events
    Here is a button click playground example. Paste this example into the videoDome example and reset the onclick function to reset thee dome.setEnabled to true and see what happens.
    The result https://www.babylonjs-playground.com/#SQ5UC1#14
     shows it is possible to load the video and show later. Now all that is needed is to adapt this to the animation context.
     
  10. Like
    JohnK got a reaction from ssaket in How to load a videoDome without showing it right away?   
    Hi again using the principle that it is better to teach someone to fish than catch the fish for them😊 -
    if you go to the API in the docs, scroll down to videoDome an open it then look through the properties and methods you will come across
    setEnabled So you ask yourself can I use this, how do I try it out? You go to the docs and search for videoDome which brings you to the how to do 360 video page. On this page there is a playground example. Next quetion is how do I reset dome.setEnabled if I set it to false? Use a clickable button, Next check out the GUI page of the docs and read about events
    Here is a button click playground example. Paste this example into the videoDome example and reset the onclick function to reset thee dome.setEnabled to true and see what happens.
    The result https://www.babylonjs-playground.com/#SQ5UC1#14
     shows it is possible to load the video and show later. Now all that is needed is to adapt this to the animation context.
     
  11. Thanks
    JohnK got a reaction from Shahzaib 3d Customizer in I NEED HELP IN Clock time Function in babylon js 3d configurator   
    Also @Shahzaib 3d Customizer can I gently remind you that members come to the forum as and when they are available and answer questions in their own time frame. While this is one of the most responsive and helpful of all forums and people are only too happy to help I would get annoyed if some one was pinging me even a couple of times an hour so on behalf of NasimiAsl and others who might reply to you a little patience goes a long way 🙂
  12. Like
    JohnK got a reaction from Deltakosh in I NEED HELP IN Clock time Function in babylon js 3d configurator   
    This playground https://www.babylonjs-playground.com/#URY2VP would load your scene but will not do so because http://162.144.214.39/~idwatch/hands/hand.babylon is not CORS compliant. Try opening a github account and store your file there.
  13. Thanks
    JohnK got a reaction from Shahzaib 3d Customizer in I NEED HELP IN Clock time Function in babylon js 3d configurator   
    Also @Shahzaib 3d Customizer can I gently remind you that members come to the forum as and when they are available and answer questions in their own time frame. While this is one of the most responsive and helpful of all forums and people are only too happy to help I would get annoyed if some one was pinging me even a couple of times an hour so on behalf of NasimiAsl and others who might reply to you a little patience goes a long way 🙂
  14. Like
    JohnK reacted to MarianG in Event click object group   
    maybe this?
    http://www.babylonjs-playground.com/#Z1PG79#5
  15. Like
    JohnK got a reaction from Dieterich in Event click object group   
    Not too sure what you want to happen on a click and also I am not getting and error messages. Perhaps the following are worth looking at
    http://doc.babylonjs.com/how_to/interactions
    https://www.babylonjs-playground.com/#7CBW04
     
  16. Thanks
    JohnK got a reaction from Shahzaib 3d Customizer in I NEED HELP IN Clock time Function in babylon js 3d configurator   
    Also @Shahzaib 3d Customizer can I gently remind you that members come to the forum as and when they are available and answer questions in their own time frame. While this is one of the most responsive and helpful of all forums and people are only too happy to help I would get annoyed if some one was pinging me even a couple of times an hour so on behalf of NasimiAsl and others who might reply to you a little patience goes a long way 🙂
  17. Like
    JohnK got a reaction from ssaket in How to load a videoDome without showing it right away?   
    Hi again using the principle that it is better to teach someone to fish than catch the fish for them😊 -
    if you go to the API in the docs, scroll down to videoDome an open it then look through the properties and methods you will come across
    setEnabled So you ask yourself can I use this, how do I try it out? You go to the docs and search for videoDome which brings you to the how to do 360 video page. On this page there is a playground example. Next quetion is how do I reset dome.setEnabled if I set it to false? Use a clickable button, Next check out the GUI page of the docs and read about events
    Here is a button click playground example. Paste this example into the videoDome example and reset the onclick function to reset thee dome.setEnabled to true and see what happens.
    The result https://www.babylonjs-playground.com/#SQ5UC1#14
     shows it is possible to load the video and show later. Now all that is needed is to adapt this to the animation context.
     
  18. Like
    JohnK reacted to ssaket in Can I create any shapes via BABYLON.MeshBuilder.CreatePolygon?   
    Hi there,  please go through the official documentation, it covers all your questions (https://doc.babylonjs.com/how_to/parametric_shapes) 
    TL;DR
     For Non Regular Polygon/ Extruded Non Regular Polygon -> the path should be in x0z plane.
    and you can use extrude shapes in both z and y direction (ref - https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes)
    Hope this helps, happy learning  
  19. Like
    JohnK got a reaction from ssaket in How to load a videoDome without showing it right away?   
    Hi again using the principle that it is better to teach someone to fish than catch the fish for them😊 -
    if you go to the API in the docs, scroll down to videoDome an open it then look through the properties and methods you will come across
    setEnabled So you ask yourself can I use this, how do I try it out? You go to the docs and search for videoDome which brings you to the how to do 360 video page. On this page there is a playground example. Next quetion is how do I reset dome.setEnabled if I set it to false? Use a clickable button, Next check out the GUI page of the docs and read about events
    Here is a button click playground example. Paste this example into the videoDome example and reset the onclick function to reset thee dome.setEnabled to true and see what happens.
    The result https://www.babylonjs-playground.com/#SQ5UC1#14
     shows it is possible to load the video and show later. Now all that is needed is to adapt this to the animation context.
     
  20. Like
    JohnK got a reaction from NasimiAsl in Get plane equation from plane mesh   
    Here is one way https://www.babylonjs-playground.com/#WYJ862
    Just increase the clipDistance a little if you want the plane to be clipped https://www.babylonjs-playground.com/#WYJ862#1   (or just make it invisible)
  21. Like
    JohnK got a reaction from trevordev in GUI Input Text Behavior   
    @trevordev have found some more info. the colon : issue for FF is known google closure-library   line 70 as is the forward slash issue for FF
    The colon issue is easily solved in inputText.ts by changing
    (keyCode > 47 && keyCode < 58) || // Numbers to
    (keyCode > 47 && keyCode < 60) || // Numbers The forward slash seems more of a problem.
    Would be nice if a CTRL V did a paste into the inputText control.
  22. Like
    JohnK got a reaction from Dieterich in Better way to create pyramid trunk   
    Just need to add one line
    pyramid.material.backFaceCulling = false; http://www.babylonjs-playground.com/#SMRU59#7
  23. Like
    JohnK reacted to Deltakosh in GUI Input Text Behavior   
    And btw this is not related to inputs but to the focus manager of the GUI. We recently fixed an issue with virtual keyboard and I'm sure that broke the input text somehow 
  24. Like
    JohnK got a reaction from fateriddle in Where should I be putting my animation code in complex scene?   
    Hi @fateriddle and welcome from me. There are two main ways of achieving animation in BJS. One uses 
    in this case you can change properties of BJS objects such as position, rotation etc.
    Another way is to use animatables https://doc.babylonjs.com/features/animations
    From your description it seems you are using animatables which do not go inside the registerBeforeRender loop.
  25. Like
    JohnK got a reaction from trevordev in GUI Input Text Behavior   
    I have a thought that the focus issue may be playground related. I came across it in the PG and now trying it out in a local project it does not seem to happen. There does seem to be a couple of issues with inputText that require further investigation before a PR of @ssaket's  probable solution to one aspect of it.
    Would be useful if more people can test inputText in a PG and externally so we can have a full picture.