I would rather not break existing synchronous code and rewrite all them to async, since making function async would force all callers to await (or .then) on them, which could be a massive change.
Or maybe it’s ok to export the .babylon loader from babylonFileLoader.ts instead of just registering to SceneLoader.
The json comes from some complex processing, and it contains complex references so I don’t want it to be serialized, or maybe passing a placeholder “{}” to source, and return the actual json in onParsed.
If the method was imported by class, it’s sure I can create a wrapper and override the original one, but if imported directly as function, seems it can not be assigned globally.
That sounds good.