Backface culling in HTML5

So I am trying to make card game and combine two sprites in one collection, one facing backwards

this is the code I’ve added to renderscript for tiles

	render.enable_state(graphics.STATE_CULL_FACE)
render.set_cull_face(graphics.FACE_TYPE_BACK)

It works fine when I build, though effect is not shown in editor
But when I build HTML5 app it shows both sides for a front cover.
How do I make it work or is there any other way to achieve this?

Editor doesn’t evaluate the render script so that’s expected at least. If it works when you run it locally and it works, then it should work when you run webgl, there’s nothing special for OpenGL vs webgl :thinking: if you share a small repro and file an issue on github we’ll take a look :+1:

3 Likes

https://github.com/Asterosaur/pairs

Thank you in advance! Really love the program and its lightweight philosophy.

1 Like