-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hi,
shadertoy-react is working really good actually, thanks. However, I wasn't able to find a way to programmatically handle the case that I pass it an erroneous shader? I have that case legitimately because my shader gets built by my react application, so at the moment I can't just guarantee that everything is going fine.
So I see lots of console warnings (and a black screen in shadertoy-react), but would it be an unreasonable effort to make available to catch these errors beforehand?
I'm thinking of a quite unsophisticated prop like onError={err => {/* do stuff with error code, message, whatever */} for the ShadertoyReact component.
I've tried wrapping the thing in try/catch blocks or using react-error-boundary, but they won't fail - as ShadertoyReact doesn't actually fail due to its internal error handling
in any case, great work you did with this library. I totally prefer working with it over the original shadertoy, as it is way smoother.
best,
qm