two.js
two.js copied to clipboard
[Bug] Negative scale does not work, with webgl mode only
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]
Ah yes, this is likely because all the objects in WebGL are rendered on one side. I'll look into this.
Fixed with this PR: https://github.com/jonobr1/two.js/pull/738