|
@@ -59,7 +59,6 @@ if (BABYLON.Engine.isSupported()) {
|
|
var currentPluginName;
|
|
var currentPluginName;
|
|
var skyboxPath = "https://assets.babylonjs.com/environments/environmentSpecular.env";
|
|
var skyboxPath = "https://assets.babylonjs.com/environments/environmentSpecular.env";
|
|
var debugLayerEnabled = false;
|
|
var debugLayerEnabled = false;
|
|
- var debugLayerLastActiveTab = 0;
|
|
|
|
|
|
|
|
engine.loadingUIBackgroundColor = "#a9b5bc";
|
|
engine.loadingUIBackgroundColor = "#a9b5bc";
|
|
|
|
|
|
@@ -75,9 +74,9 @@ if (BABYLON.Engine.isSupported()) {
|
|
BABYLON.Animation.AllowMatricesInterpolation = true;
|
|
BABYLON.Animation.AllowMatricesInterpolation = true;
|
|
|
|
|
|
// Update the defaults of the GLTFTab in the inspector.
|
|
// Update the defaults of the GLTFTab in the inspector.
|
|
- INSPECTOR.GLTFTab._GetLoaderDefaultsAsync().then(function(defaults) {
|
|
|
|
- defaults.validate = true;
|
|
|
|
- });
|
|
|
|
|
|
+ // INSPECTOR.GLTFTab._GetLoaderDefaultsAsync().then(function(defaults) {
|
|
|
|
+ // defaults.validate = true;
|
|
|
|
+ // });
|
|
|
|
|
|
// Setting up some GLTF values
|
|
// Setting up some GLTF values
|
|
BABYLON.GLTFFileLoader.IncrementalLoading = false;
|
|
BABYLON.GLTFFileLoader.IncrementalLoading = false;
|
|
@@ -87,7 +86,6 @@ if (BABYLON.Engine.isSupported()) {
|
|
plugin.onValidatedObservable.add(function(results) {
|
|
plugin.onValidatedObservable.add(function(results) {
|
|
if (results.issues.numErrors > 0) {
|
|
if (results.issues.numErrors > 0) {
|
|
debugLayerEnabled = true;
|
|
debugLayerEnabled = true;
|
|
- debugLayerLastActiveTab = "GLTF";
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -213,7 +211,7 @@ if (BABYLON.Engine.isSupported()) {
|
|
}
|
|
}
|
|
|
|
|
|
if (debugLayerEnabled) {
|
|
if (debugLayerEnabled) {
|
|
- currentScene.debugLayer.show({ initialTab: debugLayerLastActiveTab });
|
|
|
|
|
|
+ currentScene.debugLayer.show();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -259,10 +257,6 @@ if (BABYLON.Engine.isSupported()) {
|
|
else {
|
|
else {
|
|
var startProcessingFiles = function() {
|
|
var startProcessingFiles = function() {
|
|
BABYLON.Tools.ClearLogCache();
|
|
BABYLON.Tools.ClearLogCache();
|
|
-
|
|
|
|
- if (currentScene) {
|
|
|
|
- debugLayerLastActiveTab = currentScene.debugLayer.getActiveTab();
|
|
|
|
- }
|
|
|
|
};
|
|
};
|
|
|
|
|
|
filesInput = new BABYLON.FilesInput(engine, null, sceneLoaded, null, null, null, startProcessingFiles, null, sceneError);
|
|
filesInput = new BABYLON.FilesInput(engine, null, sceneLoaded, null, null, null, startProcessingFiles, null, sceneError);
|
|
@@ -295,8 +289,6 @@ if (BABYLON.Engine.isSupported()) {
|
|
window.addEventListener("keydown", function(event) {
|
|
window.addEventListener("keydown", function(event) {
|
|
// Press R to reload
|
|
// Press R to reload
|
|
if (event.keyCode === 82 && event.target.nodeName !== "INPUT" && currentScene) {
|
|
if (event.keyCode === 82 && event.target.nodeName !== "INPUT" && currentScene) {
|
|
- debugLayerLastActiveTab = currentScene.debugLayer.getActiveTab();
|
|
|
|
-
|
|
|
|
if (assetUrl) {
|
|
if (assetUrl) {
|
|
loadFromAssetUrl();
|
|
loadFromAssetUrl();
|
|
}
|
|
}
|
|
@@ -310,11 +302,10 @@ if (BABYLON.Engine.isSupported()) {
|
|
if (currentScene) {
|
|
if (currentScene) {
|
|
if (currentScene.debugLayer.isVisible()) {
|
|
if (currentScene.debugLayer.isVisible()) {
|
|
debugLayerEnabled = false;
|
|
debugLayerEnabled = false;
|
|
- debugLayerLastActiveTab = currentScene.debugLayer.getActiveTab();
|
|
|
|
currentScene.debugLayer.hide();
|
|
currentScene.debugLayer.hide();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- currentScene.debugLayer.show({ initialTab: debugLayerLastActiveTab });
|
|
|
|
|
|
+ currentScene.debugLayer.show();
|
|
debugLayerEnabled = true;
|
|
debugLayerEnabled = true;
|
|
}
|
|
}
|
|
}
|
|
}
|