Rojoss Posted July 11, 2017 Share Posted July 11, 2017 I'm having trouble creating a custom mesh. The documentation doesn't help much to be honest and I've looked at the source code of Plain and Rope but after that I'm still unable to get it working. The way we did it for the past months was to extend the Rope and override the way rope works. With this solution we're having a lot of UV issues and we have too little control so we wanna make a custom mesh. Basically all we have to do is make a dynamic line so in the tick loop we add/remove points from the line. This is pretty much what I made now and I've tried different draw modes and different triangulation.https://gist.github.com/Rojoss/83f67295f3abbdca728247611703ec9f So a couple questions, Does the mesh update when I set the vertices, uvs and indices or is there something else that needs to be done? Is there some documentation on how to do triangulation for the different draw modes? Any other idea why my mesh doesn't render anything? Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted July 11, 2017 Share Posted July 11, 2017 (edited) Edit: Deleting my post, wrong forum, sorry ! Edited July 11, 2017 by SvenFrankson Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 11, 2017 Share Posted July 11, 2017 I've made changes in Mesh/Rope some time ago, it supports texture regions now. It will be totally rewamped for v5 too (there's even a branch https://github.com/pixijs/pixi.js/pull/3842 that improves rope/mesh significantly. I've spent a lot of time on both updates, so I cant just easily describe what are you doing wrong, it's like a black hole for me, too much time spent on meshes. Please look https://github.com/pixijs/pixi.js/tree/dev/src/mesh , try to understand how it works. There might be bugs. Sometimes you just need to call "this.refresh(true);" one extra time. 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.