Kokos Posted March 25, 2016 Share Posted March 25, 2016 I'm trying to use Phaser Ropes in order to populate the top of a curved world with ground. As the rope is a mesh that distorts an image its perfect for this purpose. However I'm running into two issues. 1. According to the docs, a Phaser Rope is "a Sprite that has a repeating texture.". This doesn't seem to be the case however, with a simple fiddle it already shows that the texture is stretched (and loses its aspect ratio in the process): https://jsfiddle.net/qruppmzu/ Is it possible to actually turn this into a repeating texture instead of causing it to stretch? Currently I need to use a whole lot of ropes to populate the world, which becomes heavy on performance really quickly. I can generate / move the ropes as you progress through the world but having one rope seems like a better idea (if it works). 2. Even though the constructor allows it, the rope doesn't work with texture atlasses. How would I go about getting this to work? My framework depends on everything being in an atlas, apart from rebuilding it makes little sense to have one single sprite outside of the atlas because of a bug like this. See: https://jsfiddle.net/qruppmzu/1/ Link to comment Share on other sites More sharing options...
Kokos Posted March 29, 2016 Author Share Posted March 29, 2016 Anybody? Link to comment Share on other sites More sharing options...
stupot Posted March 29, 2016 Share Posted March 29, 2016 It looks like the docs for the Phaser Rope were written like a wish list, before the features were implemented, so it doesn't quite deliver the advertised functionality. It doesn't use frames from atlases and can't animate frames, it's very much tied to a single base texture. Look at the functionality of the base pixi.js rope/strip to see what the limitations are. I had a look at this a while ago, it'll need quite a bit of work in both Phaser and Pixi to get it up to spec. I nice little project for someone... Kokos and Ehipasika 2 Link to comment Share on other sites More sharing options...
Kokos Posted March 29, 2016 Author Share Posted March 29, 2016 Ah, that sucks. I guess I'll go the hacky route and see if I can get it to perform. Thanks for the insight. Link to comment Share on other sites More sharing options...
Recommended Posts