JohnK

Members
  • Content count

    1,134
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by JohnK

  1. Thank you @jerome corrected PG in docs and submitted a PR
  2. JohnK

    Coloring backface

    Something like this http://doc.babylonjs.com/how_to/frontandbackuv ?
  3. @jerome the page mentioned in the post above appears to be one you have written. If so would you have time to look at the issue @Pryme8 has raised in this topic? I, of course, mean the PG not working issue not the how to use custom scaling function issue.
  4. Ghost in the machine 😱👻
  5. Missed it. Please give me the page reference and I will chase it up.
  6. @Pryme8 There is this one http://www.babylonjs-playground.com/#165IV6#17 in the docs http://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes Where did your first example come from? Neither this nor the second work for me. Always happy to include more examples in the docs.
  7. JohnK

    [SOLVED] Atlas UV issue

    Hi and welcome to the forum.
  8. Hi @leota and welcome, notice that Deltakosh used a custom mesh so that the triangles in the mesh matched the triangles from the TRIANGLESTRIP. This will not necessarily the case with a standard mesh. If you are looking to some form of editor that shows meshes as made up of quads you will need to know the data structure of a mesh to manipulate the quad vertices. Take your box example you can view its construction by setting myMaterial.wireframe = true You can find more about the data structure and manipulating it by reading http://doc.babylonjs.com/how_to/custom http://doc.babylonjs.com/how_to/updating_vertices http://doc.babylonjs.com/resources/normals http://doc.babylonjs.com/extensions/quick_tree_generator
  9. JohnK

    TYPESCRIPT in Playground

    Answer with - Remember browsers cannot interpret TS directly and the software running the playground compiles the TS code into JS before rendering. So the easiest way to convert the TS code to JS is to use the from the Playground menu. This will give you a complete HTML file with the TS code compiled to JS. Should you wish to learn to code in TS then you will also need to learn the methods used to compile TS to JS for you code to run in a browser.
  10. JohnK

    How can I force repaint?

    If you have not read this topic it may offer some help
  11. Sorry but am on holiday for a week or so and only on mobile. Can give more explanation when I get back. In meantime check out http://doc.babylonjs.com/how_to/custom Also just work through the PG to see how coordinates are arrived at.
  12. JohnK

    TYPESCRIPT in Playground

    Understand that but was looking for a lazy way. Something like at the top of examples always have Basic Scene TS and Basic Scene JS underneath that the examples ( when available) grouped by JS and TS. That way there would always be quick access to TS or JS PGs. Also would encourage lazy people like me to check out how to use TS. Do not know how much a problem this would be or where the list of TS playgrounds would come from.
  13. All I did was to look at the roof diagram that Convergence provided, calculate the vertices from the diagram, divide into triangular facets and create a custom mesh. So starting from roof 'footprint' sketch out your roof and do the same.
  14. JohnK

    Bezier Surface

    I was inspired by this topic to produce a bezier surface. The surface is not a mesh but a logical object that contains the data from which you can build the mesh using a ribbon. I restricted myself to a bicubic surface. Over the next weeks I will add some other methods and who know perhaps try to write a typescript version and PR it. This PG animates the surface by changing the control points, https://www.babylonjs-playground.com/#KT9EE7#1 In this PG you can move the control points (purple spheres) in the direction of the chosen axis. Click on a control to move the axes to that control, click on a cone to set the axis along which you move the control ( done by giving mesh behaviours a go) then drag the control https://www.babylonjs-playground.com/#KT9EE7#2 Work still in progress. have fun.
  15. JohnK

    TYPESCRIPT in Playground

    Will do, though I am on holiday for a week or more and so there will be a delay. As a non Typescript user I may have some questions. For example 1. When in JS playground how do you switch to TS playground 2. Would it be possible to have some more examples of TS PGs, such as showing how simple functions would be written and show how new BABYLON methods would be achieved in TS PG. In other words what would these PGs look like with TS http://www.babylonjs-playground.com/#1ENDNT https://www.babylonjs-playground.com/#KT9EE7#1 (this type of example could also be useful to show additions work before a PR.)
  16. Is this of any help https://www.babylonjs-playground.com/#165IV6#431
  17. JohnK

    Bezier Surface

    If you change camera view so that mesh not in front of them you can select again. First time with dragging behavior. Probably much better ways to interact with controls but wanted to give new methods a go and get a quick demo up and running. Any improvements welcome. Working on multi surfaces at the moment.
  18. JohnK

    Bezier Surface

    Had a look and it seems to depend on viewing angle whether an axis works or not. I expect it has something to do with my incomplete understanding of using dragBehaviors After further reading and digesting what it said I have simplified the PG https://www.babylonjs-playground.com/#KT9EE7#3 NOTE: In new PG since no axis or plane is defined then ` Dragging will occur along the plane facing the camera `. Thank you for spurring me on to check again.
  19. Though I would give more standard approaches a go to producing a bezier surface. Results here
  20. JohnK

    Using typescript in playground

    Badly worded on my part ignore it. You answered my main point thank you.
  21. JohnK

    Using typescript in playground

    I do see that not having to do this step would make life easier for Typescript users but have a naive question from a non typescript user that would like clarification. I thought that if you used, for example Visual Studio Code, and wrote Typescript code then it would convert it to Javascript for you. So I think that would mean if your Javascript worked the original Typscript would be correct. Is this not true?
  22. JohnK

    Using typescript in playground

    @NasimiAsl lots of confusion here. When Wingnut says he is not deleting the issue of Typescript in the Playground. It is another issue (about how to reply in posts) he is deleting from TWC = The Wingnut Chronicles. The issue of typescript in the playground is still an open issue with the main question as you asked
  23. This behaviour depends on the version of babylon.js you are using see https://doc.babylonjs.com/how_to/pivots#breaking-change
  24. You can now see which models are available for downloading http://doc.babylonjs.com/resources/meshes_to_load