lecodes-sdk 2.4.5 → 2.4.6
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/dist/types/runtime/app.d.ts +14 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types.json +1 -1
- package/package.json +1 -1
- package/src/bridges/app.d.ts +8 -1
- package/src/runtime/app.ts +14 -0
- package/src/version.ts +1 -1
|
@@ -80,6 +80,20 @@ export declare const app: {
|
|
|
80
80
|
* screen); a standalone-built app leaves to the platform instead — Android backgrounds it,
|
|
81
81
|
* iOS ignores the call (the platform forbids programmatic exit). */
|
|
82
82
|
quit(): void;
|
|
83
|
+
/** Collect garbage now: what the app no longer references — a finished level's nodes, its
|
|
84
|
+
* textures and materials — is freed before this returns, not whenever the collector next runs.
|
|
85
|
+
* Call it where a pause is invisible (a loading screen, between levels), after dropping the
|
|
86
|
+
* references; never during play — a collection walks the whole heap. It also puts the next
|
|
87
|
+
* automatic collection at half again the heap it leaves: the room the next stretch of play has.
|
|
88
|
+
* `headroomMB` asks for more room when the play ahead allocates more than that — a drive that
|
|
89
|
+
* streams in hundreds of megabytes of terrain buffers: `app.gc({ headroomMB: 512 })` keeps the
|
|
90
|
+
* next collection at least 512 MB away (until it comes; then the engine's rule again). The log's
|
|
91
|
+
* `[gc]` line says what it took, what it freed and where the next one is. On iOS a request the
|
|
92
|
+
* engine serves on its own schedule, without the headroom; a no-op in the browser, where a page
|
|
93
|
+
* cannot ask for a collection. */
|
|
94
|
+
gc(options?: {
|
|
95
|
+
headroomMB?: number;
|
|
96
|
+
}): void;
|
|
83
97
|
/** Global back-press fallback (Android back button/gesture — iOS has no system back). Fires
|
|
84
98
|
* only when nothing else consumed the press: no open widget/modal claimed it, the current
|
|
85
99
|
* screen has no `onBack`, every pager is at its tab root and the router is at its
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.4.
|
|
1
|
+
export declare const SDK_VERSION = "2.4.6";
|
|
2
2
|
/** The major of a semver string, or null when it is not one. */
|
|
3
3
|
export declare const sdkMajor: (version: string | null | undefined) => number | null;
|
|
4
4
|
/** The `// sdk: <version>` line of a compiled bundle's header (sdk/src/compile/header.ts), read from
|