route-graphics 1.24.2 → 1.25.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/README.md CHANGED
@@ -78,6 +78,21 @@ app.render({
78
78
  `createAssetBufferManager()` may keep image and video assets as direct source
79
79
  URLs when possible, while audio and font assets remain buffer-backed.
80
80
 
81
+ Assets loaded by an app instance can be released after no rendered or
82
+ transitioning element still references them:
83
+
84
+ ```javascript
85
+ await app.unloadAssets(["circle-red", "bgm-1"]);
86
+ ```
87
+
88
+ `unloadAssets()` removes renderer cache entries and releases texture, video,
89
+ audio, and font resources owned by that Route Graphics instance. Unknown or
90
+ already-unloaded keys are ignored, and released keys can be loaded again.
91
+
92
+ The event handler also receives `rendererContextLost` and
93
+ `rendererContextRestored` lifecycle events. Fallback UI should live outside the
94
+ renderer so it remains available while the graphics context is unavailable.
95
+
81
96
  For complete usage details, go to:
82
97
 
83
98
  - [Getting Started](http://route-graphics.routevn.com/docs/introduction/getting-started/)