Skip to content
Snippets Groups Projects
Commit 51ffabb5 authored by netpro2k's avatar netpro2k
Browse files

Fix for inflating gltf models with no actual components

parent f63603c8
No related branches found
No related tags found
No related merge requests found
......@@ -265,8 +265,7 @@ AFRAME.registerComponent("gltf-model-plus", {
this.model.animations = model.animations;
this.el.setObject3D("mesh", this.model);
if (this.data.inflate) {
this.inflatedEl = inflateEntities(this.model, this.templates, gltfPath);
if (this.data.inflate && (this.inflatedEl = inflateEntities(this.model, this.templates, gltfPath))) {
this.el.appendChild(this.inflatedEl);
this.el.setObject3D("mesh", this.inflatedEl.object3D);
// TODO: Still don't fully understand the lifecycle here and how it differs between browsers, we should dig in more
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment