Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
Recently, I encountered a problem which was about changing texture of a Sprite3D.
setTexture method of Sprite3D you have provided, changes texture of every mesh in Sprite3D, and this is not what we expected.
I mean, there should be a way to change the texture of specific mesh.
While I trace deep into native code, I found out that CCMesh declared setTexture method which was using polymorphism, and thus made you skip binding them to the javascript.
I strongly suggest that this requirement should be added officially.
ex :
mySprite3D.getMeshByName("card").setTextureByFile("res/card.png");
Hi cocos2d developer
Recently, I encountered a problem which was about changing texture of a Sprite3D.
setTexture
method of Sprite3D you have provided, changes texture of every mesh in Sprite3D, and this is not what we expected.I mean, there should be a way to change the texture of specific mesh. While I trace deep into native code, I found out that CCMesh declared
setTexture
method which was using polymorphism, and thus made you skip binding them to the javascript.I strongly suggest that this requirement should be added officially. ex :
mySprite3D.getMeshByName("card").setTextureByFile("res/card.png");
Thanks in advance