API

Function computeMaxExtents

  • Computes the maximum world-space extents of the given meshes, optionally stepping through an animation to capture the full swept volume (node, skeletal, and morph-target animation).

    Parameters

    • meshes: readonly Mesh[]

      The meshes to bound (e.g. from getContainerMeshes).

    • animationGroup: AnimationGroup | null = null

      An optional animation group to sample across its duration. When omitted (or zero-length), the meshes are bounded once at their current pose.

    • engine: EngineContext | null = null

      The engine context. Required when animationGroup drives skinned or morph-target meshes, because seeking the animation uploads the resulting pose to the GPU.

    • animationStep: number = ...

      Sampling interval in seconds while stepping the animation. Defaults to 1/6.

    Returns MeshExtent[]

    One world-space extent per input mesh (parallel to meshes). A mesh with no geometry contributes an inverted extent (+Inf/-Inf).