/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { Vector3 } from 'three'; import type { Environment, EnvironmentManager } from '../environment/environment-manager.js'; export interface GroundInfo { isGrounded: boolean; distance: number; contactPoint: Vector3; normal: Vector3; environment?: Environment; } /** * Handles ground detection for locomotion * Reuses temporary objects for performance */ export declare class GroundDetector { private gravityDir; private upAxis; private environmentManager; private ray; private tempPosition; private tempGroundInfo; constructor(gravityDir: Vector3, upAxis: Vector3, environmentManager: EnvironmentManager); /** * Detect ground below player position across multiple environments * Returns reused GroundInfo object for performance */ detectGround(environments: Environment[], playerPosition: Vector3, capsuleRadius: number, floatHeight: number, maxSlope: number): GroundInfo; /** * Add support for platform velocity inheritance when on kinematic platforms */ applyPlatformVelocity(playerVelocity: Vector3, groundInfo: GroundInfo): void; } //# sourceMappingURL=ground-detector.d.ts.map