lecodes-sdk 2.4.4 → 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/gl/Light.d.ts +11 -4
- 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/animate/tween/Timeline.ts +175 -175
- package/src/bridges/app.d.ts +8 -1
- package/src/core/Aspect.ts +55 -14
- package/src/g2/Scene2D.ts +1 -1
- package/src/gl/CameraPlace.ts +52 -52
- package/src/gl/Light.ts +274 -257
- package/src/gl/Mesh.ts +120 -120
- package/src/gl/Scene.ts +1 -1
- package/src/gl/scenarios.ts +291 -291
- package/src/runtime/app.ts +14 -0
- package/src/version.ts +1 -1
- package/tests/helpers/phases.ts +9 -8
package/dist/types/gl/Light.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ColorInput } from "../core/color";
|
|
2
|
-
import type
|
|
2
|
+
import { Vec3, type Vec3Like } from "../math/vec";
|
|
3
3
|
import { Node, type NodeTweenProps } from "./Node";
|
|
4
4
|
import { type TweenMeta } from "../animate/tween/spec";
|
|
5
5
|
import type { Animation } from "../animate/tween/Animation";
|
|
@@ -9,7 +9,10 @@ export type LightTweenProps = NodeTweenProps & {
|
|
|
9
9
|
color?: ColorInput | ColorInput[];
|
|
10
10
|
};
|
|
11
11
|
export type SunOptions = {
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Where the light travels (pointing down for a sun above the scene) - it sets the node's rotation, so it stays live
|
|
14
|
+
* as `light.direction` and turns with the node. Defaults to a typical key-light angle.
|
|
15
|
+
*/
|
|
13
16
|
direction?: Vec3Like;
|
|
14
17
|
/** Luminous intensity. */
|
|
15
18
|
intensity?: number;
|
|
@@ -125,8 +128,12 @@ export declare class Light extends Node {
|
|
|
125
128
|
destroy(): void;
|
|
126
129
|
set color(value: ColorInput);
|
|
127
130
|
get color(): ColorInput;
|
|
128
|
-
/**
|
|
129
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Where a sun's or a spot's light travels now, in world space (unit length): the node's forward (-Z). Writing it
|
|
133
|
+
* turns the node - live, the shadows follow; a parent's rotation is taken into account. A zero vector is ignored.
|
|
134
|
+
*/
|
|
135
|
+
get direction(): Vec3;
|
|
136
|
+
set direction(value: Vec3Like);
|
|
130
137
|
/** Sun shadow options as created — creation-time in the engine, so a change means a new sun. */
|
|
131
138
|
get shadowsQuality(): number;
|
|
132
139
|
get shadowDistance(): number;
|
|
@@ -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
|