Temechon Posted February 26, 2014 Share Posted February 26, 2014 Hi all, I think I found a bug in the Mesh.clone() method (line 4 here) : // Buffersresult._vertexBuffers = this._vertexBuffers;for (var kind in result._vertexBuffers) { result._vertexBuffers[kind].references++;}VertexBuffer.references is not defined => this line set the attribute references to all vertex buffer at NaN.It should be : result._vertexBuffers[kind]._buffer.references++;This bug caused some bad behaviour when all my cloned mesh were being disposed : BABYLON.VertexBuffer.prototype.dispose = function () { this._engine._releaseBuffer(this._buffer);};this._buffer.references were not incremented, and all my meshes were removed from screen Is it possible to include this fix in the next version of babylon ? Thanks Quote Link to comment Share on other sites More sharing options...
gwenael Posted February 26, 2014 Share Posted February 26, 2014 Hi Temechon, I may suggest you to do a pull request on GitHub. You seem to have fixed a bug and Deltakosh could check that in your fork and then merge it so your fix will be included to BabylonJS code. BTW, no need to have a fork to do a pull request, you can directly modify the file on GitHub and GitHub will do the pull request for you https://github.com/BabylonJS/Babylon.js/edit/master/Babylon/Mesh/babylon.mesh.js Temechon and Samuel Girardin 2 Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 26, 2014 Author Share Posted February 26, 2014 Hi Gwenael, I just did it. Thank you for this information, I didn't know you could do that ! You're a boss gwenael 1 Quote Link to comment Share on other sites More sharing options...
gwenael Posted February 26, 2014 Share Posted February 26, 2014 I'm not the one who did the fix Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 26, 2014 Share Posted February 26, 2014 Validated and integrated Thanks guys! gwenael 1 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.