lostincomputer Posted January 20, 2016 Share Posted January 20, 2016 I'm generating a random infinite curving path. Visualize it as a top view of a race track (or rope) that never ends. How do I make a texture repeat and follow the curving path? I saw Phaser/PIXI's rope, but the texture doesn't get repeated (or I don't know how to) Link to comment Share on other sites More sharing options...
Tom Atom Posted January 21, 2016 Share Posted January 21, 2016 Do you mean something like this: https://www.gameeapp.com/game/bPWcPaJRF7? This game was hired work for Gamee platform. Curve is infinite and on every single line of screen I take its value and create two sprites (left white and right black). This is rendered into RenderTexture. I run into performance issues, but solved it in the end (see my old post): In the end I have sprite pools and what was key was to put them into group and render this group instead of single sprites. drhayes 1 Link to comment Share on other sites More sharing options...
lostincomputer Posted January 21, 2016 Author Share Posted January 21, 2016 This is what I was looking for http://greensock.com/forums/topic/12113-coil-up-a-svg-graphic/?p=50862 Link to comment Share on other sites More sharing options...
OSUblake Posted March 20, 2016 Share Posted March 20, 2016 Hi lostincomputer, I wrote that stuff on the greensock forum. Here's a demo of that tileable rope using PIXI. http://codepen.io/osublake/pen/vNjjqa There's a bunch of code in there, so I just copied the tile rope class into a new pen. It's just a slightly modified version of the PIXI Rope class and the usage is the same. http://codepen.io/osublake/pen/4228bdb83c28bb1c739b4f53f05e1bad?editors=0010 Tom Atom and drhayes 2 Link to comment Share on other sites More sharing options...
Recommended Posts