You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when running Avivator in dev, it prints out more copies of Metadata (in JSON-like form) for current file being viewed for every HMR change that it's processed.
Looking at the code, I think the problem - or a problem - is that you don't return a cleanup function from your useEffects in hooks.js. It may well be that this is detrimental in other ways, or that it actually doesn't really effect anything in normal runtime - although I feel like things might get sluggish after a while in certain circumstances and this could be related. The most clear thing that I can see to reproduce now is this accumulation of metadata info logs.
side-note: I think I might hate React. Thanks for reminding me.
The text was updated successfully, but these errors were encountered:
Just adding cleanup functions that do nothing but console.warn actually seems to be making HMR work better. Now when I change code, it doesn't exactly instantly change to reflect my changes, but it does get back to at least some of its old state, after first briefly showing an initial state... it remembers that I was in volumetric rendering, the camera orientation, and crucially it seems to no longer need to reload all of the data (although it still churns away doing some loading for a little while before it realises). It doesn't remember the contrast limits, though.
edit: actually, maybe the state is behaving as it was before, it's just that the behaviour is different when editing things like hooks.js vs additive-blend-extension.js (with the latter, all state is lost I think, which is a shame, as making small shader tweaks should theoretically be possible with near instant results & minimal impact on the rest of the state).
I noticed that when running Avivator in
dev
, it prints out more copies ofMetadata (in JSON-like form) for current file being viewed
for every HMR change that it's processed.Looking at the code, I think the problem - or a problem - is that you don't return a cleanup function from your
useEffects
inhooks.js
. It may well be that this is detrimental in other ways, or that it actually doesn't really effect anything in normal runtime - although I feel like things might get sluggish after a while in certain circumstances and this could be related. The most clear thing that I can see to reproduce now is this accumulation of metadata info logs.side-note: I think I might hate React. Thanks for reminding me.
The text was updated successfully, but these errors were encountered: