diff --git a/source/import/importergltf.js b/source/import/importergltf.js index 13c2aac..2f49956 100644 --- a/source/import/importergltf.js +++ b/source/import/importergltf.js @@ -476,6 +476,8 @@ OV.ImporterGltf = class extends OV.ImporterBase ProcessMainFile (gltf) { + this.ImportModelProperties (gltf); + let unsupportedExtensions = this.gltfExtensions.GetUnsupportedExtensions (gltf.extensionsRequired); if (unsupportedExtensions.length > 0) { this.SetError (); @@ -504,6 +506,18 @@ OV.ImporterGltf = class extends OV.ImporterBase } } + ImportModelProperties (gltf) + { + for (let propertyName in gltf.asset) { + if (gltf.asset.hasOwnProperty (propertyName)) { + if (typeof gltf.asset[propertyName] === 'string') { + const property = new OV.Property (OV.PropertyType.Text, propertyName, gltf.asset[propertyName]); + this.model.AddProperty (property); + } + } + } + } + GetDefaultScene (gltf) { let defaultSceneIndex = gltf.scene || 0; diff --git a/website/examples.html b/website/examples.html index c1361e2..b71285c 100644 --- a/website/examples.html +++ b/website/examples.html @@ -16,6 +16,7 @@