Bug 198373 - P5.js
Summary: P5.js
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-30 08:02 PDT by open
Modified: 2022-07-01 15:29 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description open 2019-05-30 08:02:13 PDT
Hi there

I made a website with the p5.js library https://p5js.org/
and it dosn't work nice on Safari

1 ) the star field I use for the loading screen  get stuck everytime I get a callback of a loaded file
2 ) the onFocus isn't detected properly

try it out
http://rich.gg

cheers
Comment 1 Alexey Proskuryakov 2019-05-31 12:54:55 PDT
Thank you for the report! Would you be willing to isolate the issue further? At this point, it's unclear if this is a WebKit issue, a p5.js one, or a website one.

> 1 ) the star field I use for the loading screen  get stuck everytime I get a callback of a loaded file

This sounds like expected behavior. Handling a callback on main thread blocks it, so there is nothing to drive the animation. Perhaps the concern is that it's blocked for too long? You can use Web Inspector timeline to see what's happening.

2 ) the onFocus isn't detected properly

What is the symptom of this? Can you replicate with a small test case?
Comment 2 open 2019-06-03 00:37:57 PDT
thank you for taking my report in consideration

I think my problems sort of comes from the p5.js library but I'm writing here to find answers that will help p5.js work great on Safari

- about the file loading call back it seems strange to me that I don't get that behavior from other broswers but if you say it is normal, then so be it

- about the onFocus thing, I use the "focused" parameter
https://p5js.org/reference/#/p5/focused
 of the p5.js library
https://github.com/processing/p5.js

As for reproducibility, If I open my site (rich.gg) on Safari on iPhone, I see my !focused page
Comment 3 Brent Fulgham 2022-07-01 15:29:14 PDT
We believe this site is behaving properly now. Can you confirm on iOS 15 or newer?