@next2d/core 3.8.2 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/core",
3
- "version": "3.8.2",
3
+ "version": "3.9.0",
4
4
  "description": "Next2D Core Package",
5
5
  "author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
6
6
  "license": "MIT",
@@ -23,16 +23,17 @@
23
23
  "type": "git",
24
24
  "url": "git+https://github.com/Next2D/Player.git"
25
25
  },
26
+ "sideEffects": false,
26
27
  "dependencies": {
27
- "@next2d/core": "3.8.2",
28
- "@next2d/display": "3.8.2",
29
- "@next2d/events": "3.8.2",
30
- "@next2d/filters": "3.8.2",
31
- "@next2d/geom": "3.8.2",
32
- "@next2d/media": "3.8.2",
33
- "@next2d/net": "3.8.2",
34
- "@next2d/text": "3.8.2",
35
- "@next2d/ui": "3.8.2",
36
- "@next2d/render-queue": "3.8.2"
28
+ "@next2d/core": "3.9.0",
29
+ "@next2d/display": "3.9.0",
30
+ "@next2d/events": "3.9.0",
31
+ "@next2d/filters": "3.9.0",
32
+ "@next2d/geom": "3.9.0",
33
+ "@next2d/media": "3.9.0",
34
+ "@next2d/net": "3.9.0",
35
+ "@next2d/text": "3.9.0",
36
+ "@next2d/ui": "3.9.0",
37
+ "@next2d/render-queue": "3.9.0"
37
38
  }
38
39
  }
package/src/Player.js CHANGED
@@ -305,6 +305,10 @@ class Player {
305
305
  if (options.bgColor) {
306
306
  stage.backgroundColor = options.bgColor;
307
307
  }
308
+ // キャッシュストアのLRU上限(opt-in)。メインスレッド側でのみ設定する
309
+ if (options.cacheStoreLimit && options.cacheStoreLimit > 0) {
310
+ $cacheStore.$maxStoreSize = options.cacheStoreLimit;
311
+ }
308
312
  }
309
313
  }
310
314
  /**
@@ -4,4 +4,14 @@ export interface IPlayerOptions {
4
4
  tagId?: string;
5
5
  bgColor?: string;
6
6
  fullScreen?: boolean;
7
+ /**
8
+ * @description キャッシュストアの最大エントリ数(LRU)。未指定/0は無制限(従来挙動)。
9
+ * 上限を超えると最も長く参照されていないキャッシュから削除され、
10
+ * worker側のGPUリソース(アトラス領域等)も解放される。
11
+ * Maximum number of cache entries (LRU). Unset/0 = unlimited
12
+ * (legacy behavior). When exceeded, the least recently used
13
+ * caches are evicted and the worker-side GPU resources
14
+ * (atlas regions etc.) are released as well.
15
+ */
16
+ cacheStoreLimit?: number;
7
17
  }