فهرست منبع

add a check in the inspector to detect gltf loader presence

David Catuhe 6 سال پیش
والد
کامیت
aeb1a4a5ca
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      inspector/src/components/actionTabs/tabs/toolsTabComponent.tsx

+ 4 - 1
inspector/src/components/actionTabs/tabs/toolsTabComponent.tsx

@@ -125,7 +125,10 @@ export class ToolsTabComponent extends PaneComponent {
                         <ButtonLineComponent label="Generate .env texture" onClick={() => this.createEnvTexture()} />
                     }
                 </LineContainerComponent>
-                <GLTFComponent scene={scene} globalState={this.props.globalState!} />
+                {
+                    (BABYLON as any).GLTFFileLoader &&
+                    <GLTFComponent scene={scene} globalState={this.props.globalState!} />
+                }
             </div>
         );
     }