three-zoo 0.5.5 → 0.6.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.
@@ -1,9 +1,7 @@
1
1
  import type { Box3, SkinnedMesh } from "three";
2
2
  import { PerspectiveCamera, Vector3 } from "three";
3
3
  /**
4
- * A camera that supports independent horizontal and vertical FOV settings.
5
- * Extends Three.js PerspectiveCamera to allow separate control over horizontal
6
- * and vertical fields of view.
4
+ * Camera with independent horizontal and vertical FOV settings.
7
5
  */
8
6
  export declare class DualFovCamera extends PerspectiveCamera {
9
7
  /** Internal storage for horizontal field of view in degrees */
@@ -11,130 +9,93 @@ export declare class DualFovCamera extends PerspectiveCamera {
11
9
  /** Internal storage for vertical field of view in degrees */
12
10
  private verticalFovInternal;
13
11
  /**
14
- * Creates a new DualFovCamera instance.
15
- *
16
- * @param horizontalFov - Horizontal field of view in degrees. Clamped between 1° and 179°.
17
- * @param verticalFov - Vertical field of view in degrees. Clamped between 1° and 179°.
18
- * @param aspect - Camera aspect ratio (width/height).
19
- * @param near - Near clipping plane distance.
20
- * @param far - Far clipping plane distance.
12
+ * @param horizontalFov - Horizontal FOV in degrees (clamped 1-179°)
13
+ * @param verticalFov - Vertical FOV in degrees (clamped 1-179°)
14
+ * @param aspect - Aspect ratio (width/height)
15
+ * @param near - Near clipping plane distance
16
+ * @param far - Far clipping plane distance
21
17
  */
22
18
  constructor(horizontalFov?: number, verticalFov?: number, aspect?: number, near?: number, far?: number);
23
19
  /**
24
- * Gets the horizontal field of view in degrees.
25
- *
26
- * @returns The horizontal FOV value
20
+ * @returns Horizontal FOV in degrees
27
21
  */
28
22
  get horizontalFov(): number;
29
23
  /**
30
- * Gets the vertical field of view in degrees.
31
- *
32
- * @returns The vertical FOV value
24
+ * @returns Vertical FOV in degrees
33
25
  */
34
26
  get verticalFov(): number;
35
27
  /**
36
- * Sets the horizontal field of view in degrees.
37
- *
38
- * @param value - The horizontal FOV value in degrees. Clamped between 1° and 179°.
28
+ * @param value - Horizontal FOV in degrees (clamped 1-179°)
39
29
  */
40
30
  set horizontalFov(value: number);
41
31
  /**
42
- * Sets the vertical field of view in degrees.
43
- *
44
- * @param value - The vertical FOV value in degrees. Clamped between 1° and 179°.
32
+ * @param value - Vertical FOV in degrees (clamped 1-179°)
45
33
  */
46
34
  set verticalFov(value: number);
47
35
  /**
48
- * Sets both horizontal and vertical field of view values.
36
+ * Sets both FOV values.
49
37
  *
50
- * @param horizontal - Horizontal FOV in degrees. Clamped between and 179°.
51
- * @param vertical - Vertical FOV in degrees. Clamped between and 179°.
38
+ * @param horizontal - Horizontal FOV in degrees (clamped 1-179°)
39
+ * @param vertical - Vertical FOV in degrees (clamped 1-179°)
52
40
  */
53
41
  setFov(horizontal: number, vertical: number): void;
54
42
  /**
55
- * Copies the field of view settings from another DualFovCamera.
43
+ * Copies FOV settings from another DualFovCamera.
56
44
  *
57
- * @param source - The DualFovCamera to copy FOV settings from.
45
+ * @param source - Source camera to copy from
58
46
  */
59
47
  copyFovSettings(source: DualFovCamera): void;
60
48
  /**
61
- * Updates the projection matrix based on current FOV settings and aspect ratio.
62
- *
63
- * The behavior differs based on orientation:
64
- * - **Landscape mode (aspect > 1)**: Preserves horizontal FOV, calculates vertical FOV
65
- * - **Portrait mode (aspect ≤ 1)**: Preserves vertical FOV, calculates horizontal FOV
49
+ * Updates projection matrix based on FOV and aspect ratio.
66
50
  *
67
- * Called when FOV values or aspect ratio changes.
51
+ * Landscape (aspect > 1): preserves horizontal FOV.
52
+ * Portrait (aspect ≤ 1): preserves vertical FOV.
68
53
  *
69
54
  * @override
70
55
  */
71
56
  updateProjectionMatrix(): void;
72
57
  /**
73
- * Gets the horizontal field of view after aspect ratio adjustments.
74
- *
75
- * In landscape mode, returns the set horizontal FOV.
76
- * In portrait mode, calculates the horizontal FOV from vertical FOV and aspect ratio.
58
+ * Gets actual horizontal FOV after aspect ratio adjustments.
77
59
  *
78
- * @returns The horizontal FOV in degrees
60
+ * @returns Horizontal FOV in degrees
79
61
  */
80
62
  getActualHorizontalFov(): number;
81
63
  /**
82
- * Gets the vertical field of view after aspect ratio adjustments.
64
+ * Gets actual vertical FOV after aspect ratio adjustments.
83
65
  *
84
- * In portrait mode, returns the set vertical FOV.
85
- * In landscape mode, calculates the vertical FOV from horizontal FOV and aspect ratio.
86
- *
87
- * @returns The vertical FOV in degrees
66
+ * @returns Vertical FOV in degrees
88
67
  */
89
68
  getActualVerticalFov(): number;
90
69
  /**
91
- * Adjusts the vertical field of view to fit specified points within the camera's view.
92
- *
93
- * Calculates the required vertical FOV to ensure all provided vertices
94
- * are visible within the vertical bounds of the camera's frustum.
70
+ * Adjusts vertical FOV to fit points within camera view.
95
71
  *
96
72
  * @param vertices - Array of 3D points in world coordinates
97
73
  */
98
74
  fitVerticalFovToPoints(vertices: Vector3[]): void;
99
75
  /**
100
- * Adjusts the vertical field of view to fit a bounding box within the camera's view.
76
+ * Adjusts vertical FOV to fit bounding box within camera view.
101
77
  *
102
- * Calculates the required vertical FOV to ensure the bounding box
103
- * is visible within the vertical bounds of the camera's frustum.
104
- *
105
- * @param box - The 3D bounding box in world coordinates
78
+ * @param box - 3D bounding box in world coordinates
106
79
  */
107
80
  fitVerticalFovToBox(box: Box3): void;
108
81
  /**
109
- * Adjusts the vertical field of view to fit a skinned mesh within the camera's view.
110
- *
111
- * Updates the mesh's skeleton, applies bone transformations to vertices,
112
- * and calculates the required vertical FOV to fit the deformed mesh
113
- * within the vertical bounds of the camera's frustum.
82
+ * Adjusts vertical FOV to fit skinned mesh within camera view.
83
+ * Updates skeleton and applies bone transformations.
114
84
  *
115
- * @param skinnedMesh - The skinned mesh with active skeleton
85
+ * @param skinnedMesh - Skinned mesh with active skeleton
116
86
  */
117
87
  fitVerticalFovToMesh(skinnedMesh: SkinnedMesh): void;
118
88
  /**
119
- * Points the camera to look at the center of mass of a skinned mesh.
89
+ * Points camera to look at skinned mesh center of mass.
90
+ * Uses iterative clustering to find main vertex concentration.
120
91
  *
121
- * Updates the mesh's skeleton, applies bone transformations to vertices,
122
- * calculates the center of mass using a clustering algorithm, and orients the camera
123
- * to look at that point.
124
- *
125
- * The center of mass calculation uses iterative clustering to find the
126
- * main concentration of vertices.
127
- *
128
- * @param skinnedMesh - The skinned mesh with active skeleton
92
+ * @param skinnedMesh - Skinned mesh with active skeleton
129
93
  */
130
94
  lookAtMeshCenterOfMass(skinnedMesh: SkinnedMesh): void;
131
95
  /**
132
- * Creates a copy of this DualFovCamera.
133
- *
134
- * The cloned camera has identical FOV settings, position, rotation,
135
- * and all other camera properties.
96
+ * Creates a copy of this camera with identical settings.
136
97
  *
137
- * @returns A new DualFovCamera instance
98
+ * @returns New DualFovCamera instance
138
99
  * @override
139
100
  */
140
101
  clone(): this;
@@ -1,104 +1,103 @@
1
1
  import type { Material, Object3D } from "three";
2
2
  import { Mesh } from "three";
3
3
  /**
4
- * Constructor type for scene traversal operations.
5
- *
6
- * Represents a constructor function that creates instances of type T.
7
- * Used for runtime type checking when filtering objects by constructor type.
4
+ * Constructor type for runtime type checking.
8
5
  *
9
6
  * @template T - The type that the constructor creates
10
7
  */
11
8
  export type Constructor<T> = abstract new (...args: never[]) => T;
12
9
  /**
13
- * Utility class for finding and modifying objects in a Three.js scene graph.
14
- *
15
- * Provides static methods for traversing Three.js scene hierarchies,
16
- * searching for objects or materials, and performing batch operations.
10
+ * Static methods for traversing Three.js scene hierarchies.
17
11
  *
18
- * All methods perform depth-first traversal starting from the provided
19
- * root object and recursively processing all children.
12
+ * All methods use depth-first traversal.
20
13
  */
21
14
  export declare class SceneTraversal {
22
15
  /**
23
- * Finds the first object in the scene hierarchy with an exact name match.
16
+ * Finds first object with exact name match.
24
17
  *
25
- * Performs depth-first search through the scene graph starting from the
26
- * root object. Returns the first object whose name property matches
27
- * the search string.
28
- *
29
- * @param object - The root Object3D to start searching from
30
- * @param name - The exact name to search for (case-sensitive)
31
- * @returns The first matching Object3D, or null if no match is found
18
+ * @param object - Root object to start from
19
+ * @param name - Name to search for (case-sensitive)
20
+ * @returns First matching object or undefined
32
21
  */
33
- static getObjectByName(object: Object3D, name: string): Object3D | null;
22
+ static getObjectByName(object: Object3D, name: string): Object3D | undefined;
34
23
  /**
35
- * Finds the first material in the scene hierarchy with an exact name match.
36
- *
37
- * Performs depth-first search through the scene graph, examining materials
38
- * attached to Mesh objects. Handles both single materials and material arrays.
39
- * Returns the first material whose name property matches the search string.
24
+ * Finds first material with exact name match from mesh objects.
40
25
  *
41
- * @param object - The root Object3D to start searching from
42
- * @param name - The exact material name to search for (case-sensitive)
43
- * @returns The first matching Material, or null if no match is found
26
+ * @param object - Root object to start from
27
+ * @param name - Material name to search for (case-sensitive)
28
+ * @returns First matching material or undefined
44
29
  */
45
- static getMaterialByName(object: Object3D, name: string): Material | null;
30
+ static getMaterialByName(object: Object3D, name: string): Material | undefined;
46
31
  /**
47
- * Processes all objects of a specific type in the scene hierarchy.
32
+ * Executes callback for all objects of specified type.
48
33
  *
49
- * Performs depth-first traversal and executes the callback function
50
- * for every object that is an instance of the specified type.
34
+ * @template T - Type of objects to process
35
+ * @param object - Root object to start from
36
+ * @param type - Constructor to filter by
37
+ * @param callback - Function to execute for each matching object
38
+ */
39
+ static enumerateObjectsByType<T extends Object3D>(object: Object3D, type: Constructor<T>, callback: (instance: T) => void): void;
40
+ /**
41
+ * Executes callback for all materials of specified type from mesh objects.
51
42
  *
52
- * @template T - The type of objects to process
53
- * @param object - The root Object3D to start searching from
54
- * @param type - The constructor/class to filter by (e.g., DirectionalLight, Mesh)
55
- * @param callback - Function to execute for each matching object instance
43
+ * @template T - Type of materials to process
44
+ * @param object - Root object to start from
45
+ * @param type - Constructor to filter by
46
+ * @param callback - Function to execute for each matching material
56
47
  */
57
- static enumerateObjectsByType<T>(object: Object3D, type: Constructor<T>, callback: (instance: T) => void): void;
48
+ static enumerateMaterialsByType<T extends Material>(object: Object3D, type: Constructor<T>, callback: (material: T) => void): void;
58
49
  /**
59
- * Processes all materials found in mesh objects within the scene hierarchy.
50
+ * Executes callback for all objects in hierarchy.
60
51
  *
61
- * Performs depth-first traversal, finding all Mesh objects and executing
62
- * the callback function for each material. Handles both single
63
- * materials and material arrays.
52
+ * @param object - Root object to start from
53
+ * @param callback - Function to execute for each object
54
+ */
55
+ static enumerateObjects(object: Object3D, callback: (object: Object3D) => void): void;
56
+ /**
57
+ * Executes callback for all materials from mesh objects.
64
58
  *
65
- * @param object - The root Object3D to start searching from
66
- * @param callback - Function to execute for each material found
59
+ * @param object - Root object to start from
60
+ * @param callback - Function to execute for each material
67
61
  */
68
62
  static enumerateMaterials(object: Object3D, callback: (material: Material) => void): void;
69
63
  /**
70
- * Finds all objects in the scene hierarchy that match filter criteria.
71
- *
72
- * Performs depth-first search and collects all objects that either match
73
- * a regular expression pattern (applied to object names) or satisfy
74
- * a predicate function.
64
+ * Returns all objects matching filter criteria.
75
65
  *
76
- * @param object - The root Object3D to start searching from
77
- * @param filter - Either a RegExp to test against object names, or a predicate function
78
- * @returns Array of all matching Object3D instances
66
+ * @param object - Root object to start from
67
+ * @param filter - RegExp for object names or predicate function
68
+ * @returns Array of matching objects
79
69
  */
80
70
  static filterObjects(object: Object3D, filter: RegExp | ((object: Object3D) => boolean)): Object3D[];
81
71
  /**
82
- * Finds all materials in the scene hierarchy whose names match a pattern.
72
+ * Returns all materials matching filter criteria from mesh objects.
83
73
  *
84
- * Performs depth-first search through all Mesh objects and collects materials
85
- * whose name property matches the regular expression. Handles both
86
- * single materials and material arrays.
74
+ * @param object - Root object to start from
75
+ * @param filter - RegExp for material names or predicate function
76
+ * @returns Array of matching materials
77
+ */
78
+ static filterMaterials(object: Object3D, filter: RegExp | ((object: Material) => boolean)): Material[];
79
+ /**
80
+ * Returns all mesh objects that use any of the specified materials.
87
81
  *
88
- * @param object - The root Object3D to start searching from
89
- * @param name - Regular expression pattern to test against material names
90
- * @returns Array of all matching Material instances
82
+ * @param object - Root object to start from
83
+ * @param materials - Array of materials to search for
84
+ * @returns Array of mesh objects using the materials
91
85
  */
92
- static filterMaterials(object: Object3D, name: RegExp): Material[];
86
+ static findMaterialUsers(object: Object3D, materials: Material[]): Mesh[];
93
87
  /**
94
- * Finds all mesh objects that use materials with names matching a pattern.
88
+ * Clones material by name and replaces all instances with the clone.
95
89
  *
96
- * Performs depth-first search through all Mesh objects and collects mesh objects
97
- * whose materials have names that match the regular expression.
90
+ * @param object - Root object to start from
91
+ * @param name - Material name to search for (case-sensitive)
92
+ * @returns Cloned material or undefined if not found
93
+ */
94
+ static cloneMaterialByName(object: Object3D, name: string): Material | undefined;
95
+ /**
96
+ * Replaces all instances of a material with another material.
98
97
  *
99
- * @param object - The root Object3D to start searching from
100
- * @param materialName - Regular expression pattern to test against material names
101
- * @returns Array of all Mesh objects that use materials with matching names
98
+ * @param object - Root object to start from
99
+ * @param oldMaterial - Material to replace
100
+ * @param newMaterial - Material to use as replacement
102
101
  */
103
- static findMaterialUsers(object: Object3D, materialName: RegExp): Mesh[];
102
+ private static replaceMaterial;
104
103
  }
@@ -1,23 +1,22 @@
1
1
  import type { AnimationClip, Object3D, SkinnedMesh } from "three";
2
2
  import { Mesh } from "three";
3
- /** Converts skinned meshes to static meshes */
3
+ /** Converts skinned meshes to static meshes. */
4
4
  export declare class SkinnedMeshBaker {
5
5
  /**
6
- * Converts a skinned mesh to a static mesh in its current pose.
7
- * The resulting mesh has no bones but looks identical.
6
+ * Converts skinned mesh to static mesh in current pose.
8
7
  *
9
8
  * @param skinnedMesh - Mesh to convert
10
- * @returns Static mesh with baked vertex positions
9
+ * @returns Static mesh with baked positions
11
10
  */
12
11
  static bakePose(skinnedMesh: SkinnedMesh): Mesh;
13
12
  /**
14
- * Bakes a single frame from an animation into a static mesh.
13
+ * Bakes animation frame to static mesh.
15
14
  *
16
15
  * @param armature - Root object with bones
17
16
  * @param skinnedMesh - Mesh to convert
18
- * @param timeOffset - Time in seconds within the animation
19
- * @param clip - Animation to get the pose from
20
- * @returns Static mesh with baked vertex positions
17
+ * @param timeOffset - Time in seconds within animation
18
+ * @param clip - Animation clip for pose
19
+ * @returns Static mesh with baked positions
21
20
  */
22
21
  static bakeAnimationFrame(armature: Object3D, skinnedMesh: SkinnedMesh, timeOffset: number, clip: AnimationClip): Mesh;
23
22
  }
@@ -1,67 +1,45 @@
1
1
  import type { MeshStandardMaterial } from "three";
2
2
  import { MeshBasicMaterial } from "three";
3
3
  /**
4
- * Configuration options for the StandardToBasicConverter.
4
+ * Configuration options for material conversion.
5
5
  */
6
6
  export interface StandardToBasicConverterOptions {
7
7
  /**
8
- * Whether to preserve the original material's name
8
+ * Preserve original material name.
9
9
  * @defaultValue true
10
10
  */
11
11
  preserveName: boolean;
12
12
  /**
13
- * Whether to copy user data from the original material
13
+ * Copy user data from original material.
14
14
  * @defaultValue true
15
15
  */
16
16
  copyUserData: boolean;
17
17
  /**
18
- * Whether to dispose the original material after conversion
18
+ * Dispose original material after conversion.
19
19
  * @defaultValue false
20
20
  */
21
21
  disposeOriginal: boolean;
22
22
  /**
23
- * Whether to apply emissive color to the base color for brightness compensation
23
+ * Apply emissive color to base color for brightness compensation.
24
24
  * @defaultValue true
25
25
  */
26
26
  combineEmissive: boolean;
27
27
  /**
28
- * Factor for brightness adjustment to compensate for loss of lighting
28
+ * Brightness adjustment factor to compensate for loss of lighting.
29
29
  * @defaultValue 1.3
30
30
  */
31
31
  brightnessFactor: number;
32
32
  }
33
33
  /**
34
- * Converts Three.js MeshStandardMaterial to MeshBasicMaterial.
35
- *
36
- * Handles translation from PBR StandardMaterial to unlit BasicMaterial.
37
- * Since BasicMaterial doesn't respond to lighting, applies compensation
38
- * techniques including brightness adjustments and emissive color combination.
34
+ * Converts MeshStandardMaterial to MeshBasicMaterial with brightness compensation.
39
35
  */
40
36
  export declare class StandardToBasicConverter {
41
37
  /**
42
- * Converts a MeshStandardMaterial to MeshBasicMaterial.
38
+ * Converts MeshStandardMaterial to MeshBasicMaterial.
43
39
  *
44
- * Performs conversion from PBR StandardMaterial to unlit BasicMaterial
45
- * with brightness compensation and property mapping.
46
- *
47
- * @param standardMaterial - The source MeshStandardMaterial to convert
48
- * @param options - Configuration options for the conversion
49
- * @returns A new MeshBasicMaterial with properties mapped from the standard material
50
- *
51
- * @example
52
- * ```typescript
53
- * const standardMaterial = new MeshStandardMaterial({
54
- * color: 0x00ff00,
55
- * metalness: 0.5,
56
- * emissive: 0x111111,
57
- * emissiveIntensity: 0.2
58
- * });
59
- *
60
- * const basicMaterial = StandardToBasicConverter.convert(standardMaterial, {
61
- * brightnessFactor: 1.4,
62
- * combineEmissive: true
63
- * });
64
- * ```
40
+ * @param standardMaterial - Source material to convert
41
+ * @param options - Conversion options
42
+ * @returns New MeshBasicMaterial with mapped properties
65
43
  */
66
44
  static convert(standardMaterial: MeshStandardMaterial, options?: Partial<StandardToBasicConverterOptions>): MeshBasicMaterial;
67
45
  }
@@ -1,58 +1,40 @@
1
1
  import type { MeshStandardMaterial } from "three";
2
2
  import { MeshLambertMaterial } from "three";
3
3
  /**
4
- * Configuration options for the StandardToLambertConverter.
4
+ * Configuration options for material conversion.
5
5
  */
6
6
  export interface StandardToLambertConverterOptions {
7
7
  /**
8
- * Whether to preserve the original material's name
8
+ * Preserve original material name.
9
9
  * @defaultValue true
10
10
  */
11
11
  preserveName: boolean;
12
12
  /**
13
- * Whether to copy user data from the original material
13
+ * Copy user data from original material.
14
14
  * @defaultValue true
15
15
  */
16
16
  copyUserData: boolean;
17
17
  /**
18
- * Whether to dispose the original material after conversion
18
+ * Dispose original material after conversion.
19
19
  * @defaultValue false
20
20
  */
21
21
  disposeOriginal: boolean;
22
22
  /**
23
- * Custom color adjustment factor for roughness compensation
23
+ * Color adjustment factor for roughness compensation.
24
24
  * @defaultValue 0.8
25
25
  */
26
26
  roughnessColorFactor: number;
27
27
  }
28
28
  /**
29
- * Converts Three.js MeshStandardMaterial to MeshLambertMaterial.
30
- *
31
- * Handles translation between PBR properties of StandardMaterial and
32
- * the Lambertian reflectance model used by LambertMaterial. Applies
33
- * color compensation based on metalness and roughness values.
29
+ * Converts MeshStandardMaterial to MeshLambertMaterial with PBR compensation.
34
30
  */
35
31
  export declare class StandardToLambertConverter {
36
32
  /**
37
- * Converts a MeshStandardMaterial to MeshLambertMaterial.
33
+ * Converts MeshStandardMaterial to MeshLambertMaterial.
38
34
  *
39
- * Performs conversion from PBR StandardMaterial to Lambert lighting model
40
- * with color compensation based on metalness and roughness values.
41
- *
42
- * @param material - The source MeshStandardMaterial to convert
43
- * @param options - Configuration options for the conversion
44
- * @returns A new MeshLambertMaterial with properties mapped from the standard material
45
- *
46
- * @example
47
- * ```typescript
48
- * const standardMaterial = new MeshStandardMaterial({
49
- * color: 0xff0000,
50
- * metalness: 0.8,
51
- * roughness: 0.2
52
- * });
53
- *
54
- * const lambertMaterial = StandardToLambertConverter.convert(standardMaterial);
55
- * ```
35
+ * @param material - Source material to convert
36
+ * @param options - Conversion options
37
+ * @returns New MeshLambertMaterial with mapped properties
56
38
  */
57
39
  static convert(material: MeshStandardMaterial, options?: Partial<StandardToLambertConverterOptions>): MeshLambertMaterial;
58
40
  }
package/dist/Sun.d.ts CHANGED
@@ -1,11 +1,7 @@
1
1
  import type { Texture } from "three";
2
2
  import { Box3, DirectionalLight } from "three";
3
3
  /**
4
- * A directional light with spherical positioning controls.
5
- *
6
- * Extends Three.js DirectionalLight to provide spherical coordinate control
7
- * (distance, elevation, azimuth) and shadow map configuration for bounding boxes.
8
- * Also supports sun direction calculation from HDR environment maps.
4
+ * Directional light with spherical positioning and HDR environment support.
9
5
  */
10
6
  export declare class Sun extends DirectionalLight {
11
7
  /** Internal vectors to avoid garbage collection during calculations */
@@ -20,59 +16,40 @@ export declare class Sun extends DirectionalLight {
20
16
  private readonly tempBox3;
21
17
  private readonly tempSpherical;
22
18
  /**
23
- * Gets the distance from the light's position to the origin.
24
- *
25
- * @returns The distance in world units
19
+ * @returns Distance from light position to origin
26
20
  */
27
21
  get distance(): number;
28
22
  /**
29
- * Gets the elevation angle from the spherical coordinates.
30
- *
31
- * @returns The elevation angle in radians (phi angle from Three.js Spherical coordinates)
23
+ * @returns Elevation angle in radians (phi angle)
32
24
  */
33
25
  get elevation(): number;
34
26
  /**
35
- * Gets the azimuth angle from the spherical coordinates.
36
- *
37
- * @returns The azimuth angle in radians (theta angle from Three.js Spherical coordinates)
27
+ * @returns Azimuth angle in radians (theta angle)
38
28
  */
39
29
  get azimuth(): number;
40
30
  /**
41
- * Sets the distance while preserving current elevation and azimuth angles.
42
- *
43
- * @param value - The new distance in world units
31
+ * @param value - New distance in world units
44
32
  */
45
33
  set distance(value: number);
46
34
  /**
47
- * Sets the elevation angle while preserving current distance and azimuth.
48
- *
49
- * @param value - The new elevation angle in radians (phi angle for Three.js Spherical coordinates)
35
+ * @param value - New elevation angle in radians (phi angle)
50
36
  */
51
37
  set elevation(value: number);
52
38
  /**
53
- * Sets the azimuth angle while preserving current distance and elevation.
54
- *
55
- * @param value - The new azimuth angle in radians (theta angle for Three.js Spherical coordinates)
39
+ * @param value - New azimuth angle in radians (theta angle)
56
40
  */
57
41
  set azimuth(value: number);
58
42
  /**
59
- * Configures the shadow camera frustum to cover a bounding box.
43
+ * Configures shadow camera frustum to cover bounding box.
60
44
  *
61
- * Adjusts the directional light's shadow camera frustum to encompass the
62
- * provided bounding box by transforming box corners to light space and
63
- * setting camera bounds accordingly.
64
- *
65
- * @param box3 - The 3D bounding box to cover with shadows
45
+ * @param box3 - 3D bounding box to cover with shadows
66
46
  */
67
47
  configureShadowsForBoundingBox(box3: Box3): void;
68
48
  /**
69
- * Sets the sun's direction based on the brightest point in an HDR environment map.
70
- *
71
- * Analyzes an HDR texture to find the pixel with the highest luminance value
72
- * and positions the sun to shine from that direction using spherical coordinates.
49
+ * Sets sun direction based on brightest point in HDR environment map.
73
50
  *
74
- * @param texture - The HDR texture to analyze (must have image data available)
75
- * @param distance - The distance to place the sun from the origin
51
+ * @param texture - HDR texture to analyze (must have image data)
52
+ * @param distance - Distance to place sun from origin
76
53
  */
77
54
  setDirectionFromHDRTexture(texture: Texture, distance?: number): void;
78
55
  }