webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
344 stars 207 forks source link

Previewer unification #2801

Open avaer opened 2 years ago

avaer commented 2 years ago

Background

Right now we have three main previewer endpoints (HTML files which you can load to get previews functionality):

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

avaer commented 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.

avaer commented 2 years ago

All of this can be imported into the marketplace/dashboard.