diff --git a/lib/creator.js b/lib/creator.js index e8fe562..4fe51c7 100755 --- a/lib/creator.js +++ b/lib/creator.js @@ -39,6 +39,7 @@ class FFCreator extends FFCon { this.conf = new Conf(conf); this.loader = new Loader(); this.destroyed = false; + this.cleanAllCache = true; this.createApp(); this.createRenderer(); @@ -223,7 +224,7 @@ class FFCreator extends FFCon { try { this.app.render(); } catch (e) { - console.log(`App render eror:: ${e}`); + console.log(`App render erorr:: ${e}`); } } @@ -400,7 +401,7 @@ class FFCreator extends FFCon { this.app.destroy(true, true); } - destroyAndCleanAllCache(); + if (this.cleanAllCache) destroyAndCleanAllCache(); this.app = null; } diff --git a/package.json b/package.json index 26d3c81..1c29e7b 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffcreator", - "version": "7.5.1", + "version": "7.5.3", "description": "FFCreator is a lightweight and flexible short video production library", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/types/lib/FFCreator.d.ts b/types/lib/FFCreator.d.ts index 0caa8ee..403a6d8 100644 --- a/types/lib/FFCreator.d.ts +++ b/types/lib/FFCreator.d.ts @@ -38,6 +38,10 @@ declare namespace FFCreatorSpace { class FFCreator extends FFCon { constructor(conf: FFCreatorConf); + inCenter: boolean; + destroyed: boolean; + cleanAllCache: boolean; + on(name: K, fn: (ev: FFCreatorEventMap[K]) => any): void; /**