|
@@ -38,7 +38,13 @@ class ModelCache {
|
|
var parts = path.split(".");
|
|
var parts = path.split(".");
|
|
parts.pop();
|
|
parts.pop();
|
|
parts.push("props");
|
|
parts.push("props");
|
|
- haxe.Json.parse(hxd.res.Loader.currentInstance.load(parts.join(".")).toText());
|
|
|
|
|
|
+ var propsRes = hxd.res.Loader.currentInstance.load(parts.join("."));
|
|
|
|
+ propsRes.watch(() -> {
|
|
|
|
+ // Clear this anim cache so the anim and it's props are reloaded the next time they are requested
|
|
|
|
+ models.remove(path);
|
|
|
|
+ anims.remove(path);
|
|
|
|
+ });
|
|
|
|
+ haxe.Json.parse(propsRes.toText());
|
|
} catch( e : hxd.res.NotFound )
|
|
} catch( e : hxd.res.NotFound )
|
|
null;
|
|
null;
|
|
m = { lib : res.toHmd(), props : props, col : null, lastTime : 0. };
|
|
m = { lib : res.toHmd(), props : props, col : null, lastTime : 0. };
|