Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Negative scale does not work, with webgl mode only #723

Open
Nicoco220983 opened this issue Apr 11, 2024 · 1 comment
Open

[Bug] Negative scale does not work, with webgl mode only #723

Nicoco220983 opened this issue Apr 11, 2024 · 1 comment
Assignees
Labels

Comments

@Nicoco220983
Copy link

Negative scale does not work, with webgl mode only.

To Reproduce

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="build/two.min.js"></script>
  </head>
  <body>
    <script>
        var two = new Two({
            type: Two.Types.webgl,
            fullscreen: true,
            autostart: true
        }).appendTo(document.body)
        const shape = two.makeRectangle(two.width * .5, two.height * .5, 100, 100)
        shape.scale = -.5
    </script>
  </body>
</html>

Expected behavior
The rectangle should be visible (it is when desactivating webgl mode)

Desktop (please complete the following information):

  • Browser [firefox]
  • Version [latest: v0.8.13]
@jonobr1
Copy link
Owner

jonobr1 commented Apr 12, 2024

Ah yes, this is likely because all the objects in WebGL are rendered on one side. I'll look into this.

@jonobr1 jonobr1 self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants