stalgiag / p5.xr

a library that helps turn p5.js sketches into immersive experiences using WebXR
GNU Lesser General Public License v2.1
117 stars 25 forks source link

Better strokeWeight default to account for new line perspective feature #221

Closed TiborUdvari closed 1 week ago

TiborUdvari commented 1 week ago

The new line perspective feature introduced in p5.js v1.9.2 makes it so all examples, especially in AR look buggy. Since WebXR uses real world measurements, especially in immersive-ar mode this means that lines will have a thickness of 1m. Will add a way to add better defaults.

Here you can see the same sketch with v1.9.1 vs v.1.9.2 which introduces the new linePerspective feature.

This is related to what I thought broke in #219

push();
translate(0, 0, -0.4);
box(0.1, 0.1, 0.1);
pop();
Screenshot 2024-09-02 at 12 46 36 Screenshot 2024-09-02 at 12 45 54