three-zoo 0.5.4 → 0.5.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.
- package/README.md +24 -24
- package/dist/DualFovCamera.d.ts +43 -44
- package/dist/SceneTraversal.d.ts +28 -38
- package/dist/SkinnedMeshBaker.d.ts +5 -5
- package/dist/StandardToBasicConverter.d.ts +8 -14
- package/dist/StandardToLambertConverter.d.ts +7 -13
- package/dist/Sun.d.ts +18 -19
- package/dist/index.js +149 -178
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/Sun.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Texture } from "three";
|
|
2
2
|
import { Box3, DirectionalLight } from "three";
|
|
3
3
|
/**
|
|
4
|
-
* A directional light with spherical positioning controls
|
|
4
|
+
* A directional light with spherical positioning controls.
|
|
5
5
|
*
|
|
6
|
-
* Extends Three.js DirectionalLight to provide
|
|
7
|
-
* (distance, elevation, azimuth) and
|
|
8
|
-
* Also supports
|
|
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.
|
|
9
9
|
*/
|
|
10
10
|
export declare class Sun extends DirectionalLight {
|
|
11
11
|
/** Internal vectors to avoid garbage collection during calculations */
|
|
@@ -20,21 +20,21 @@ export declare class Sun extends DirectionalLight {
|
|
|
20
20
|
private readonly tempBox3;
|
|
21
21
|
private readonly tempSpherical;
|
|
22
22
|
/**
|
|
23
|
-
* Gets the distance from the light to
|
|
23
|
+
* Gets the distance from the light's position to the origin.
|
|
24
24
|
*
|
|
25
25
|
* @returns The distance in world units
|
|
26
26
|
*/
|
|
27
27
|
get distance(): number;
|
|
28
28
|
/**
|
|
29
|
-
* Gets the elevation angle
|
|
29
|
+
* Gets the elevation angle from the spherical coordinates.
|
|
30
30
|
*
|
|
31
|
-
* @returns The elevation angle in radians (
|
|
31
|
+
* @returns The elevation angle in radians (phi angle from Three.js Spherical coordinates)
|
|
32
32
|
*/
|
|
33
33
|
get elevation(): number;
|
|
34
34
|
/**
|
|
35
|
-
* Gets the azimuth angle
|
|
35
|
+
* Gets the azimuth angle from the spherical coordinates.
|
|
36
36
|
*
|
|
37
|
-
* @returns The azimuth angle in radians (
|
|
37
|
+
* @returns The azimuth angle in radians (theta angle from Three.js Spherical coordinates)
|
|
38
38
|
*/
|
|
39
39
|
get azimuth(): number;
|
|
40
40
|
/**
|
|
@@ -46,21 +46,21 @@ export declare class Sun extends DirectionalLight {
|
|
|
46
46
|
/**
|
|
47
47
|
* Sets the elevation angle while preserving current distance and azimuth.
|
|
48
48
|
*
|
|
49
|
-
* @param value - The new elevation angle in radians (
|
|
49
|
+
* @param value - The new elevation angle in radians (phi angle for Three.js Spherical coordinates)
|
|
50
50
|
*/
|
|
51
51
|
set elevation(value: number);
|
|
52
52
|
/**
|
|
53
53
|
* Sets the azimuth angle while preserving current distance and elevation.
|
|
54
54
|
*
|
|
55
|
-
* @param value - The new azimuth angle in radians (
|
|
55
|
+
* @param value - The new azimuth angle in radians (theta angle for Three.js Spherical coordinates)
|
|
56
56
|
*/
|
|
57
57
|
set azimuth(value: number);
|
|
58
58
|
/**
|
|
59
|
-
* Configures the shadow camera to
|
|
59
|
+
* Configures the shadow camera frustum to cover a bounding box.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
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
64
|
*
|
|
65
65
|
* @param box3 - The 3D bounding box to cover with shadows
|
|
66
66
|
*/
|
|
@@ -68,12 +68,11 @@ export declare class Sun extends DirectionalLight {
|
|
|
68
68
|
/**
|
|
69
69
|
* Sets the sun's direction based on the brightest point in an HDR environment map.
|
|
70
70
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* creating realistic lighting that matches HDR environment maps.
|
|
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.
|
|
74
73
|
*
|
|
75
74
|
* @param texture - The HDR texture to analyze (must have image data available)
|
|
76
|
-
* @param distance - The distance to place the sun from the origin
|
|
75
|
+
* @param distance - The distance to place the sun from the origin
|
|
77
76
|
*/
|
|
78
77
|
setDirectionFromHDRTexture(texture: Texture, distance?: number): void;
|
|
79
78
|
}
|