Search the Community
Showing results for tags 'stretching'.
Found 3 results
Hey everbody, first of all: Thank you very much for the documentation and great forums. I achieved a lot with Babylon JS without the need of posting anywhere, because you get all the information you need just by one simple google search. But now is the time, since I just don't know where to look for a solution to this problem: I'm using BABYLON.Mesh.CreateDecal to place text and pictures onto a sphere-shape (it is a soccer ball to be more specific, so not just a perfect sphere). Everything works great so far, I made controls to reposition, scale, rotate, change color etc. to decals and they can be placed simply by clicking on the desired position. The problem is with bigger sizes: As I understand, decals not getting mapped onto the UV but projected onto the mesh. If I want to place a big picture and scale it up or place a long line of text, there a limitations: The picture can't run all way around the ball, because it get's cut off at a certain point. The second problem is, that it get's stretched at the outer parts (the more it is away from the clicked center, the more it is stretched, since it get's projected onto a sphere). TL;DR: Is there any way to place decals so they don't get stretched but use the UV (which is there since I dynamically load textures for the ball) to place them "pixel-perfect" all around the ball, if necessary (or at least half the ball)? Thank you guys and a happy New Year
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/