Open avaer opened 2 years ago
Note that in some cases (such as scene crunching), the output is a GLB, not an image.
So a previewer UI will need to have a small renderer to explore such outputs.
All of this can be imported into the marketplace/dashboard.
Background
Right now we have three main previewer endpoints (HTML files which you can load to get previews functionality):
iframe
, now superceded byOffscreenEngine
which is far more capable)Problem
There are too many divergent preview implementations. In fact, most of the above are (probably) not used.
Most of the logic for these now lives in many separate imporable preview engines like
object-spriter.js
. The engine is successfully using these already and we will probably encapsulate more preview engines like this.Here is a non-exhaustive list:
Scenes
https://github.com/webaverse/app/blob/master/scene-cruncher.js https://github.com/webaverse/app/blob/master/scene-previewer.js https://github.com/webaverse/app/blob/master/scene-screenshotter.js
Objects
https://github.com/webaverse/app/blob/master/object-spriter.js
Avatars
https://github.com/webaverse/app/blob/master/avatar-cruncher.js https://github.com/webaverse/app/blob/master/avatar-spriter.js
Solution
1
, probably calledpreview.html
, though having nothing to do with the previous codepreview.html
use importable preview engines