lecodes-sdk 2.4.4 → 2.4.5

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.
@@ -1,5 +1,5 @@
1
1
  import { type ColorInput } from "../core/color";
2
- import type { Vec3Like } from "../math/vec";
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
- /** Light direction (points where the light travels). Defaults to a typical key-light angle. */
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
- /** Sun direction as created (the engine keeps it; a settings menu rebuilds a sun from it). */
129
- get direction(): [number, number, number];
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;
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "2.4.4";
1
+ export declare const SDK_VERSION = "2.4.5";
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