Dad72 Posted June 3, 2014 Share Posted June 3, 2014 Since the last update of babylon, I get an error on this line that I did not previously have. this._effect.setMatrix("groundMatrix", this.groundTexture._computeTextureMatrix()); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 Not a bug this tome, I renamed this function which was private to a public one: getTextureMatrix Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 Ah ok. I did not know. Thanks for the information Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 I have replace _computeTextureMatrix() => getTextureMatrix() But the terrain is given a 0. I have more mountain and river... try the WorlMonger 1.12. I use the material of WorldMonger + StandardMaterial merged: I load my terrian like this:ground = BABYLON.Mesh.CreateGround("myGround", 500, 500, 200, scene, true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.PositionKind, $.parseJSON(this.savedPosition), true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.NormalKind, $.parseJSON(this.savedNormal), true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.UVKind, $.parseJSON(this.savedUvs));ground.material = new WORLDCASTOR.GroundMaterial("Material_myGround", scene, Light); var Position and var Normal ans var savedUvs her recover from a file Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 I do not understand your problem Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 quand je charge le terrain avec ce changement, il est plat maintenant. je n'est plus de rivière, de montagne... tout est plat. si je charge une ancienne version de la 1.12 tout est ok. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 Can you try with the last version I posted on github? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 No sorry DK is the same thing. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 And there is no error in the console? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 I have : Uncaught TypeError: Cannot set property 'innerHTML' of nullin VM10977:1 I have no such file Otherwise I test this: it works, ground = BABYLON.Mesh.CreateGroundFromHeightMap("myGround", "Data/Textures/Terrain/heightMap/heightMapShaderEditor.png", 200, 200, 145, 0, 20, scene, true);ground.material = new WORLDCASTOR.GroundMaterial("Material_myGround", scene, Light); but this, the ground is flat. ground = BABYLON.Mesh.CreateGround("myGround", 500, 500, 200, scene, true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.PositionKind, $.parseJSON(this.savedPosition), true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.NormalKind, $.parseJSON(this.savedNormal), true);this.meshGround.setVerticesData(BABYLON.VertexBuffer.UVKind, $.parseJSON(this.savedUvs));ground.material = new WORLDCASTOR.GroundMaterial("Material_myGround", scene, Light);may be a because of: setVerticesData() Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 could you isolate that in a small project so that I can test? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 I'll try to do it in the evening. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 I updated my version of worldmonger with 1.12 and I have no issue Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 ok. I took exactly the same worldmonger demo, but I change by calling a file // Grounds Version Defaut /* var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "Assets/heightMap.png", 100, 100, 100, 0, 12, scene, true); var groundMaterial = new WORLDMONGER.GroundMaterial("ground", scene, sun); ground.material = groundMaterial; ground.position.y = -2.0; */ // Grounds Version modified (Loading has sailed from a file) var ground; $.ajaxSetup({ async: false}); $.ajax({ url:"Open_terrain.fonction.php", type:'POST', success:function(data){ data = data.split(";"); var savedPosition = data[0]; var savedNormal = data[1]; var Mysubdivision = data[2]; var MydimX = data[3]; var MydimY = data[4]; ground = BABYLON.Mesh.CreateGround("ground", parseInt(MydimX), parseInt(MydimY), parseInt(Mysubdivision), scene, true); ground.setVerticesData($.parseJSON(savedPosition), BABYLON.VertexBuffer.PositionKind, true); ground.setVerticesData($.parseJSON(savedNormal), BABYLON.VertexBuffer.NormalKind, true); ground.material = new WORLDMONGER.GroundMaterial("Material_ground", scene, sun); ground.position.y = -3.0; ground.isPickable = false; } }); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 This one is also my fault!!! I'm so sorry about that. This is EXACTLY why I do not want to change a published API Anyway, here is the reason: - **Breaking changes** - ```Mesh.setVerticesData``` signature is now: (kind, values, updatable) instead of (values, kind, updatable) in order to be consistent with ```Mesh.updateVerticesData``` Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 Yes. This works. I had read and I forget to change it. There is no of problem DK, be not sorry. you made a really works great on babylon. Your engine is the best one out there for webgl. I have test many of engine and it's yours engine I'm most loyal. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 thank you very much, but I promise to stop changing public API gwenael 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Author Share Posted June 3, 2014 If the change is important... is not a problem for me. You can make a list of the changes in signature in an ads for example put post it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.