three-zoo 0.5.2 → 0.5.3

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.
Files changed (2) hide show
  1. package/README.md +21 -42
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,9 +16,9 @@
16
16
  ## Features
17
17
 
18
18
  - 📷 **DualFovCamera** - Independent horizontal and vertical FOV control with auto-fitting
19
- - 🔍 **SceneTraversal** - Find and manipulate objects and materials in scene graphs
20
- - 🎭 **SkinnedMeshBaker** - Convert animated meshes to static geometry for optimization
21
19
  - ☀️ **Sun** - Intuitive spherical positioning for directional lights with HDR integration
20
+ - 🔍 **SceneTraversal** - Find and manipulate objects and materials in scene graphs
21
+ - 🎭 **SkinnedMeshBaker** - Convert animated meshes to static geometry
22
22
 
23
23
  ## Installation
24
24
 
@@ -26,27 +26,6 @@
26
26
  npm install three-zoo
27
27
  ```
28
28
 
29
- ## Quick Start
30
-
31
- ```typescript
32
- import { DualFovCamera, SceneTraversal, Sun } from 'three-zoo';
33
-
34
- // Camera with independent FOV control
35
- const camera = new DualFovCamera(90, 60);
36
- camera.fitVerticalFovToMesh(characterMesh);
37
- camera.lookAtMeshCenterOfMass(characterMesh);
38
-
39
- // Scene traversal and manipulation
40
- const enemies = SceneTraversal.filterObjects(scene, /^enemy_/);
41
- const glassMaterials = SceneTraversal.filterMaterials(scene, /glass/i);
42
-
43
- // Intuitive sun positioning
44
- const sun = new Sun();
45
- sun.elevation = Math.PI / 4;
46
- sun.azimuth = Math.PI / 2;
47
- sun.configureShadowsForBoundingBox(sceneBounds);
48
- ```
49
-
50
29
  ## DualFovCamera
51
30
 
52
31
  Advanced camera with independent horizontal and vertical field of view:
@@ -67,6 +46,25 @@ camera.fitVerticalFovToMesh(skinnedMesh);
67
46
  camera.lookAtMeshCenterOfMass(skinnedMesh);
68
47
  ```
69
48
 
49
+ ## Sun
50
+
51
+ Directional light with spherical positioning:
52
+
53
+ ```typescript
54
+ const sun = new Sun();
55
+
56
+ // Spherical coordinates
57
+ sun.elevation = Math.PI / 4; // 45° above horizon
58
+ sun.azimuth = Math.PI / 2; // 90° rotation
59
+ sun.distance = 100; // Distance from origin
60
+
61
+ // Automatic shadow configuration
62
+ sun.configureShadowsForBoundingBox(sceneBounds);
63
+
64
+ // Position from HDR environment map
65
+ sun.setDirectionFromHDRTexture(hdrTexture, 50);
66
+ ```
67
+
70
68
  ## SceneTraversal
71
69
 
72
70
  Navigate and manipulate Three.js scene graphs:
@@ -106,25 +104,6 @@ const frameMesh = SkinnedMeshBaker.bakeAnimationFrame(
106
104
  );
107
105
  ```
108
106
 
109
- ## Sun
110
-
111
- Directional light with spherical positioning:
112
-
113
- ```typescript
114
- const sun = new Sun();
115
-
116
- // Spherical coordinates
117
- sun.elevation = Math.PI / 4; // 45° above horizon
118
- sun.azimuth = Math.PI / 2; // 90° rotation
119
- sun.distance = 100; // Distance from origin
120
-
121
- // Automatic shadow configuration
122
- sun.configureShadowsForBoundingBox(sceneBounds);
123
-
124
- // Position from HDR environment map
125
- sun.setDirectionFromHDRTexture(hdrTexture, 50);
126
- ```
127
-
128
107
  ## Requirements
129
108
 
130
109
  - Three.js ^0.175.0 (peer dependency)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-zoo",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Some reusable bits for building things with Three.js ",
5
5
  "scripts": {
6
6
  "clean": "rm -rf dist",