Recently sby complained about not finding a simple tool for creating 2d meshes. I thought it would be fun to make a quick one. Here is the video: http://www.youtube.com/watch?v=G-59p0FdXIY
Here is the code: https://gist.github.com/JMV38/2559b70abc9ed33796c7
The video is self explnatory. The mesh is in the Mesh tab that you can copy after you have made your drawing. This tool is very basic and not optimized, but it works. If you want to save the mesh without seeing the triangles, just tap the button to hide triangles before tapping on save (WYSIWYG). Enjoy!
PS: in this version you can always view the saved mesh, but not reload it for modifications.
PPS: the detection zone for each triangle (for color, split, delete) is in the middle of the triangle. I should have drawn a spot there, but i forgot.
Did you mean ‘select a picture to make it the mesh texture’?
If so, it is not so easy to do it correctly. Because the texCoords have to be specified for each triangle. How should they be placed? How should they be moved when you modify the triangle? 2 possiblities make sense: move them, or dont move them. So it is not so clear what to do…
Maybe just 2 global options are enough: texture static / texture follows the mesh distortions. But i cant see what it would be used for. What is the point of adding a feature that does not correspond to a need? If you can describe a real life situation where you need this texture with a flat mesh, i will think of it.
No no let it be, cause usually in 2D i use meshes with textures so just in case that was possible, but its too complicated. I noticed one thing that all the vertices are vec3 whereas its a 2D mesh maker. Are you planning it to make it 3D, or its just some coincidence? And one more doubt how have you ordered the meshes, vertically horizontally, top to bottom, bottom to top i guess you should add numbers at the bottom of the meshes
Vec3 : half a coincidence : when i read ms:vertex(i) the result is a vec3, even if i entered a vec2. Since it worked fine i didnt notice nor corrected for it. But vec3 can be usefull too.
memory slot order: i wanted Mesh1 to be on top left, then left to right (usual reading order in western countries). I should mention it in the comment, or add the mesh name below each mesh, you are right.
Here is a small update: https://gist.github.com/JMV38/6573843
i have replaced all the letter icons by drawn icons, you can see some of them:
.
It is not much, but the use and feel become more intuitive.
I think i will probably add a texture to the mesh: then it will be possible to ajust the mesh to a part of the texture. This could be useful.
I also think i could make the mesh more compact by saving it with @ignatz compression tool. But then it wont be easy to read any more…