three-zoo 0.4.6 → 0.5.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.
- package/README.md +63 -57
- package/dist/DualFovCamera.d.ts +142 -0
- package/dist/GeometryHasher.d.ts +1 -17
- package/dist/SceneTraversal.d.ts +104 -10
- package/dist/Sun.d.ts +59 -12
- package/dist/index.d.ts +1 -4
- package/dist/index.js +353 -312
- 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 +15 -7
- package/dist/BiFovCamera.d.ts +0 -53
- package/dist/Bounds.d.ts +0 -23
- package/dist/InstanceAssembler.d.ts +0 -26
- package/dist/SceneProcessor.d.ts +0 -29
package/dist/BiFovCamera.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Box3, SkinnedMesh } from "three";
|
|
2
|
-
import { PerspectiveCamera, Vector3 } from "three";
|
|
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.
|
|
7
|
-
*/
|
|
8
|
-
export declare class BiFovCamera extends PerspectiveCamera {
|
|
9
|
-
private horizontalFovInternal;
|
|
10
|
-
private verticalFovInternal;
|
|
11
|
-
/**
|
|
12
|
-
* @param horizontalFov - Horizontal FOV in degrees (90° default)
|
|
13
|
-
* @param verticalFov - Vertical FOV in degrees (90° default)
|
|
14
|
-
* @param aspect - Width/height ratio (1 default)
|
|
15
|
-
* @param near - Near clipping plane (1 default)
|
|
16
|
-
* @param far - Far clipping plane (1000 default)
|
|
17
|
-
*/
|
|
18
|
-
constructor(horizontalFov?: number, verticalFov?: number, aspect?: number, near?: number, far?: number);
|
|
19
|
-
/** Current horizontal FOV in degrees */
|
|
20
|
-
get horizontalFov(): number;
|
|
21
|
-
/** Current vertical FOV in degrees */
|
|
22
|
-
get verticalFov(): number;
|
|
23
|
-
/** Set horizontal FOV in degrees (clamped between 1° and 179°) */
|
|
24
|
-
set horizontalFov(value: number);
|
|
25
|
-
/** Set vertical FOV in degrees (clamped between 1° and 179°) */
|
|
26
|
-
set verticalFov(value: number);
|
|
27
|
-
/**
|
|
28
|
-
* Update both horizontal and vertical FOV
|
|
29
|
-
* @param horizontal - Horizontal FOV in degrees
|
|
30
|
-
* @param vertical - Vertical FOV in degrees
|
|
31
|
-
*/
|
|
32
|
-
setFov(horizontal: number, vertical: number): void;
|
|
33
|
-
/**
|
|
34
|
-
* Copy FOV settings from another BiFovCamera
|
|
35
|
-
* @param source - Camera to copy from
|
|
36
|
-
*/
|
|
37
|
-
copyFovSettings(source: BiFovCamera): void;
|
|
38
|
-
/**
|
|
39
|
-
* Updates the projection matrix based on FOV settings and aspect ratio.
|
|
40
|
-
* In landscape: preserves horizontal FOV
|
|
41
|
-
* In portrait: preserves vertical FOV
|
|
42
|
-
*/
|
|
43
|
-
updateProjectionMatrix(): void;
|
|
44
|
-
/** Get actual horizontal FOV after aspect ratio adjustments */
|
|
45
|
-
getEffectiveHorizontalFov(): number;
|
|
46
|
-
/** Get actual vertical FOV after aspect ratio adjustments */
|
|
47
|
-
getEffectiveVerticalFov(): number;
|
|
48
|
-
fitPointsVerticalFov(vertices: Vector3[]): void;
|
|
49
|
-
fitBoxVerticalFov(box: Box3): void;
|
|
50
|
-
fitSkinnedMeshVerticalFov(skinnedMesh: SkinnedMesh): void;
|
|
51
|
-
lookAtCenterOfMass(skinnedMesh: SkinnedMesh): void;
|
|
52
|
-
clone(): this;
|
|
53
|
-
}
|
package/dist/Bounds.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Object3D, SkinnedMesh } from "three";
|
|
2
|
-
import { Box3 } from "three";
|
|
3
|
-
/**
|
|
4
|
-
* Box3 with additional convenience methods for width, height, depth, etc.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Bounds extends Box3 {
|
|
7
|
-
/** Temporary vector for calculations */
|
|
8
|
-
private readonly tempVector3A;
|
|
9
|
-
constructor(object?: Object3D);
|
|
10
|
-
/** Width (x-axis length) */
|
|
11
|
-
get width(): number;
|
|
12
|
-
/** Height (y-axis length) */
|
|
13
|
-
get height(): number;
|
|
14
|
-
/** Depth (z-axis length) */
|
|
15
|
-
get depth(): number;
|
|
16
|
-
/** Length of the box's diagonal */
|
|
17
|
-
get diagonal(): number;
|
|
18
|
-
setFromSkinnedMesh(skinnedMesh: SkinnedMesh): Bounds;
|
|
19
|
-
/** Volume (width * height * depth) */
|
|
20
|
-
getVolume(): number;
|
|
21
|
-
/** Surface area (sum of all six faces) */
|
|
22
|
-
getSurfaceArea(): number;
|
|
23
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Object3D } from "three";
|
|
2
|
-
import { Mesh } from "three";
|
|
3
|
-
/** Configuration for instance assembly */
|
|
4
|
-
export interface InstanceAssemblerOptions {
|
|
5
|
-
/** Filter which meshes to include */
|
|
6
|
-
filter: (child: Mesh) => boolean;
|
|
7
|
-
/** How close vertices need to be to count as identical */
|
|
8
|
-
geometryTolerance: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Combines identical meshes into instanced versions for better performance.
|
|
12
|
-
* Meshes are considered identical if they share the same geometry and materials.
|
|
13
|
-
*/
|
|
14
|
-
export declare class InstanceAssembler {
|
|
15
|
-
/**
|
|
16
|
-
* Find meshes that can be instanced and combine them.
|
|
17
|
-
* Only processes meshes that:
|
|
18
|
-
* - Have no children
|
|
19
|
-
* - Pass the filter function (if any)
|
|
20
|
-
* - Share geometry with at least one other mesh
|
|
21
|
-
*
|
|
22
|
-
* @param container - Object containing meshes to process
|
|
23
|
-
* @param options - Optional settings
|
|
24
|
-
*/
|
|
25
|
-
static assemble(container: Object3D, options?: Partial<InstanceAssemblerOptions>): void;
|
|
26
|
-
}
|
package/dist/SceneProcessor.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Object3D } from "three";
|
|
2
|
-
/** Options for scene post-processing */
|
|
3
|
-
export interface SceneProcessorOptions {
|
|
4
|
-
/** Clone the input asset before processing? */
|
|
5
|
-
cloneAsset: boolean;
|
|
6
|
-
/** Combine identical meshes into instances? */
|
|
7
|
-
assembleInstances: boolean;
|
|
8
|
-
/** Names matching these patterns will cast shadows */
|
|
9
|
-
castShadowExpressions: RegExp[];
|
|
10
|
-
/** Names matching these patterns will receive shadows */
|
|
11
|
-
receiveShadwoExpressions: RegExp[];
|
|
12
|
-
/** Names matching these patterns will be transparent */
|
|
13
|
-
transparentMaterialExpressions: RegExp[];
|
|
14
|
-
/** Names matching these patterns won't write to depth buffer */
|
|
15
|
-
noDepthWriteMaterialExpressions: RegExp[];
|
|
16
|
-
}
|
|
17
|
-
/** Post-processes a scene based on name patterns */
|
|
18
|
-
export declare class SceneProcessor {
|
|
19
|
-
/**
|
|
20
|
-
* Process a scene to set up materials and shadows.
|
|
21
|
-
*
|
|
22
|
-
* @param asset - Scene to process
|
|
23
|
-
* @param options - How to process the scene
|
|
24
|
-
* @returns Processed scene root objects
|
|
25
|
-
*/
|
|
26
|
-
static process(asset: Object3D, options: Partial<SceneProcessorOptions>): Object3D[];
|
|
27
|
-
/** Does the string match any of the patterns? */
|
|
28
|
-
private static matchesAny;
|
|
29
|
-
}
|