Jump to content

Search the Community

Showing results for tags 'updatemeshpositions'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 2 results

  1. Quick question, I am about to test it but I am working on some other stuff for the next hour or so and before I get to this problem I figured I would ask the community. I have a Theory that if I use: updateMeshPositions(positionFunction, computeNormals) and in the function just tell it that positions = positions or even skip that step and literally, just call the function with the flag computeNormals if it will update the normal data on the mesh? I kinda doubt it because I am assuming that the new normal data come from the manipulation of the Vertices in the function itself as it propagates. Is there a way to push the results of a VertexData manipulation to also update the Normals, I know its not inherent because I have logged the response after manipulation and it is the same as before. ***EDIT AND UPDATE*** Yea I guess it does work... after you manipulate the vertexData just pass the mesh through Mesh.updateMeshPositions(function(){}, true); and you will update the normals...
  2. I am currently manipulating a series of ground objects. I am able to manipulate the ground with different noise effects and calculations to get the effects I am desiring on a single ground plane. The problem when I am doing it with the series of them they are all effectively getting the same manipulation applied. I am generating the ground objects in a block so they are all one right after another and look like a single plane, so they all have an offset in the global space. How then can I convert the point from its local assignment in the script: TERIABLE.UpdatePositions = function (positions) { for (var idx = 0; idx < positions.length; idx += 3) { positions[idx+1] = positions[idx]*positions[idx+2]; } }; //Section where it is called: this._block.updateMeshPositions(TERIABLE.UpdatePositions); to a global position. I might be able to do it by adding the grounds.position.x and y to the idx values? but I have not tried that yet and I am not even sure how to pass the ground object with the positions on the updateMeshPositions call i see no optional variable offset in http://doc.babylonjs.com/classes/2.3/Mesh
  • Create New...