浏览代码

LODs: fix lods config shadowing not working

lviguier 6 月之前
父节点
当前提交
e267678536
共有 1 个文件被更改,包括 3 次插入10 次删除
  1. 3 10
      h3d/prim/ModelDatabase.hx

+ 3 - 10
h3d/prim/ModelDatabase.hx

@@ -18,7 +18,6 @@ class ModelDatabase {
 	static var LOD_CONFIG = "lodConfig";
 	static var DYN_BONES_CONFIG = "dynamicBones";
 
-	static var defaultLodConfigs : Map<String, Array<Float>> = new Map();
 	static var baseLodConfig = [ 0.5, 0.2, 0.01];
 
 	function new() {
@@ -78,17 +77,11 @@ class ModelDatabase {
 			return baseLodConfig;
 
 		#if (sys || nodejs)
-			var c = @:privateAccess fs.convert.getConfig(defaultLodConfigs, baseLodConfig, dir, function(fullObj) {
-				if (Reflect.hasField(fullObj, "lods.screenRatio"))
-					return Reflect.field(fullObj, "lods.screenRatio");
-
-				return baseLodConfig;
-			});
-			return c;
+		var c = hide.Ide.inst.currentConfig.getLocal("lods.screenRatio", baseLodConfig);
+		return c;
 		#else
-			return baseLodConfig;
+		return baseLodConfig;
 		#end
-
 	}
 
 	// Used to clean previous version of modelDatabase, should be removed after some time