This seemed to work fine for me to create a gradient rect of 100x100 at 10,10 with the gradient starting from color1 to color2 (Vertically), you can even have 4 colours at each corners.
@OZApps During my tests I found it better to create my meshes around the screen's top/left [0;0] to keep its container center... centered. You probably already know it so it's not directed to you, but for a beginner at least it's good to understand that the center of the mesh's container is set at [0;0] if it's an empty Sprite, or one which parent is stage for example.
@moopf Really? it works for me and it's located in my Dropbox public's folder so it shouldn't be a problem with permissions. I attach it to the forum then.
Can other members confirm that the link doesn't work?
With a wrapper to make things easier to use, I think meshes have a lot of potential.
@moopf Maybe it has to do with the player's settings? Player settings [Hardware] : Orientation -> Landscape left Resolution ->1536 x 2048 (iPad Retina)
@Mells, nope it does the same thing with those settings. Thing is I've just remembered that I'm actually using a different version of Gideros as I'm testing some bug fixes for Atilim on packed textures. I'm wondering if there's some other change in this version that's messing with meshes - it definitely does not look nice like your image!
I've sent Atilim a message to ask him to check your project as well just in case it is an issue with that.
AHHH!! between 9.0 and 9.2 the Mesh API has changed and it breaks because the earlier API was Buffer and now it is Array. I hope it does not change any further. The example above would work perfectly well if we made that change as
Hey all, glad this sample was helpful. I have been experimenting with the Mesh Api to produce some visual effects, I hope I have some time soon to clean things a little and post here. Also I need to produce some original art for the sample above, so it can be shared freely as CC.
Comments
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
That's nice, but there are so many other variables in there, functions that are called in a loop. The faster way that I found is mesh
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Fog example
@OZApps
During my tests I found it better to create my meshes around the screen's top/left [0;0] to keep its container center... centered.
You probably already know it so it's not directed to you, but for a beginner at least it's good to understand that the center of the mesh's container is set at [0;0] if it's an empty Sprite, or one which parent is stage for example.
I haven't used the mesh in anger yet, need to have a play with it.
I attach it to the forum then.
Can other members confirm that the link doesn't work?
With a wrapper to make things easier to use, I think meshes have a lot of potential.
Likes: OZApps
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
I've just downloaded it and given it a run but I'm not sure it's showing correctly in my player?
great
@moopf Maybe it has to do with the player's settings?
Player settings [Hardware] :
Orientation -> Landscape left
Resolution ->1536 x 2048 (iPad Retina)
This is how it should look like :
I've sent Atilim a message to ask him to check your project as well just in case it is an issue with that.
I'm on Gideros 2012.09.02.
Thank you for sending him directly, I hope it helps to find if there was an hidden bug somewhere.
Likes: moopf
@mells, your sample is quite nice.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
glad this sample was helpful.
I have been experimenting with the Mesh Api to produce some visual effects, I hope I have some time soon to clean things a little and post here.
Also I need to produce some original art for the sample above, so it can be shared freely as CC.