You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.1 the layer leftBounds and rightBounds are defined as a kind of strange combination of a UV and a width and height, defined in UV space. It also uses the order [left, top, width, height], which implies a flipped UV space from OpenGL. I've brought this up before and the consensus was generally "Don't break it if we don't have to", but since then I've been bitten by this system a few time and I think that Chrome's implementation has it "upside down" as a result. :P
I suggest that for clarity in 1.2 we redefine the layer bounds to explicitly be OpenGL UVs with the order [left, bottom, right, top]. (In OpenGL's UV space positive Y is up, so the bottom left corner is the origin.) Additionally we should define that bounds where left > right or bottom > top are invalid.
This means that instead of the default bounds being:
This seems quite unobjectionable (and none expressed), and minor. I don't see a reason for not redefining & closing, as we don't care about backwards compat too much and easily polyfillable.
Pushed this change as d6219a8. We're likely redefining how layers work soon, so it's somewhat moot, but I wanted to close the ticket down and ensure than change carried forward.
In 1.1 the layer
leftBounds
andrightBounds
are defined as a kind of strange combination of a UV and a width and height, defined in UV space. It also uses the order [left, top, width, height], which implies a flipped UV space from OpenGL. I've brought this up before and the consensus was generally "Don't break it if we don't have to", but since then I've been bitten by this system a few time and I think that Chrome's implementation has it "upside down" as a result. :PI suggest that for clarity in 1.2 we redefine the layer bounds to explicitly be OpenGL UVs with the order [left, bottom, right, top]. (In OpenGL's UV space positive Y is up, so the bottom left corner is the origin.) Additionally we should define that bounds where left > right or bottom > top are invalid.
This means that instead of the default bounds being:
They become:
This feels more consistent with the rest of the platform to me (sticks to WebGL's conventions) and more predictable for developers. Any complaints?
The text was updated successfully, but these errors were encountered: