texture mapping hallp

Haw do you do texture mapping on codea.

Well ok.
I hope I do not offend you, but I think I’m speaking for a few persons here.

You always ask very general questions, or try to convince someone to turn your vague described ideas into reality rather than trying yourself to get something done. If you would at least try, and than need help at an actual thing, I think there would be somebody here to help you. But as you write such questions over and over again (and you don’t even try to better your English, I think you mean help and not hallp, and how and not haw) I’m getting the idea, that you just muck around with us…

If not, okay… But try to learn by doing. There are examples with texture mappings out here, if you try understand that examples and get lost at a specific point, I think you’ll get help here!

Please look at the “Hello Mesh” example

Im so sorry :-(( guy’s :-((

The specific part in the 3D example where texture mapping is applied is:

    self.ms = mesh()
    self.ms.vertices = cubeverts

    self.ms.texture = "Planet Cute:Stone Block"

    self.ms.texCoords = cubetexCoords
    self.ms:setColors(255,255,255,255)

And here’s a tiny example that uses parameters to show how changing the texRect of a mesh rect affects how the texture appears:

function setup()
    m = mesh()
    m.texture = "Planet Cute:Chest Closed"
    
    recti = m:addRect(WIDTH/2,HEIGHT/2,303,171*3)
    parameter("TexX", 0, 1, 0)
    parameter("TexY", 0, 1, 0)
    parameter("TexW", 0, 1, 1)
    parameter("TexH", 0, 1, 1)
end

function draw()
    background(40, 40, 50)
    
    noSmooth()
    
    m:setRectTex(recti,TexX, TexY,TexW,TexH)
    m:draw()
end