Closed wagedu closed 7 months ago
Can I work on this issue?! @wagedu
@wagedu Bro when I am running the given code I get the spehere with grid.Can you explain what is the issue ?
I think this may be due to the default near/far values of ortho
not having been updated along with some camera changes in 1.9. I believe this has been addressed in https://github.com/processing/p5.js/pull/6639, maybe someone can confirm whether this is reproducible with the recent beta build?
@Vishal2002 Mate, does it appear BEFORE you interact?
To me it doesn't UNTIL interaction. Attached it not appearing in Firefox & Safari, just in case.
Also, @davepagurek maybe I should be asking this on the Discord but... do you know of any workaround to make this work in the current 1.9? I tried setting/unsetting a custom camera without luck. Thanks!
Here are the new default values: https://github.com/diyaayay/p5.js/blob/dc065a2b99fe8110fc617da5682620cc1f444fed/src/webgl/p5.Camera.js#L908-L915
Maybe try setting these manually in your ortho
call instead of omitting the parameters? i.e.:
ortho(-width/2, width/2, -height/2, height/2, 0, max(width, height) + 800)
@davepagurek , thanks, now it works perfectly.
Previously I had tried with the values given in the reference, where the "far" value is 500, instead of max(w,h) + 800 And also has the top/bottom signs inverted
Thanks a lot!
Good point, I think the translate(0,0,500)
in the example is maybe misleading, as it is compensating for the far
value. I'll see if I can update that for this next release.
Most appropriate sub-area of p5.js?
p5.js version
1.9
Web browser and version
all
Operating System
all
Steps to reproduce this
Steps:
Snippet: