texture coordinates

For developers using the Construct 2 Javascript SDK

Post » Fri Mar 16, 2012 6:49 am

is there a way with the current sdk to change the coordinates for the vertexes of a quad in either canvas or webgl?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Mar 16, 2012 4:22 pm

Yes, but only really in WebGL mode. See Tiled Background for an example: in canvas mode it draws using a repeat canvas pattern, and in WebGL mode it draws a single quad with special texture coordinates to cause a repeat effect via quadTex. However, since canvas 2D is a limited 2D API which doesn't give you access to texture co-ordinates, that's about as far as you can take it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests