Collect metadata from glb file
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -10,6 +10,10 @@ checkForGltf = function (e) {
|
||||
const mvPreview = document.createElement('model-viewer')
|
||||
mvPreview.style['width'] = '180px'
|
||||
mvPreview.style['height'] = '180px'
|
||||
mvPreview.addEventListener('load',(e) => {
|
||||
mw.storage.session.set( 'mw_glbMeta', JSON.stringify($(e.target.originalGltfJson.asset)))
|
||||
},
|
||||
{once: true})
|
||||
|
||||
const dThumbCap = document.createElement('div')
|
||||
dThumbCap.classList.add('thumbcaption')
|
||||
|
||||
@@ -7,7 +7,7 @@ let currentSet = 'default'
|
||||
* Disables hiding of various child items
|
||||
* once model has loaded
|
||||
*/
|
||||
modelLoaded = function() {
|
||||
modelLoaded = function(e) {
|
||||
$('.awaiting-model').css('display', 'flex').removeClass('awaiting-model')
|
||||
if (typeof enableMenu != 'undefined') {enableMenu()}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user