Open
Description
Three.js r125 introduces some breaking changes to BufferGeometry. In particular, these lines will have trouble. I'm unsure about the rest of the repo.
I created a post on StackOverflow here asking for help with this and an answer came in quickly. Tldr; you could fix those lines with something like this:
const negativeWidth = -this.canvas.width / 2;
const positiveWidth = this.canvas.width / 2;
const positiveHeight = this.canvas.height / 2;
const negativeHeight = -this.canvas.height / 2;
this.geometry.attributes.position.setXY(0, negativeWidth, positiveHeight);
this.geometry.attributes.position.setXY(1, positiveWidth, positiveHeight);
this.geometry.attributes.position.setXY(2, negativeWidth, negativeHeight);
this.geometry.attributes.position.setXY(3, positiveWidth, negativeHeight);
this.geometry.attributes.position.needsUpdate = true;
I'm not going to submit a PR here because I'm unsure of how this would impact earlier versions and I'm not prepared to find out but I wanted to share in case anyone else wants to give it a shot.
Metadata
Metadata
Assignees
Labels
No labels