gwanyan-interactive-grassland - v0.1.0
    Preparing search index...

    WindFieldModel translates the pointer state into a physically plausible wind force at any patch on the terrain. The mouse acts like a moving gust source: the closer a patch is to the cursor and the faster the cursor moves, the larger the force becomes.

    Index

    Constructors

    • Creates a wind model with explicit values for influence radius, maximum cursor gust strength, and always-on ambient breeze.

      Parameters

      • influenceRadiusInWorldUnits: number
      • maximumMouseDrivenWindForce: number
      • ambientBreezeStrength: number

      Returns WindFieldModel

    Methods

    • Calculates the horizontal wind force that should act on a specific patch.

      Parameters

      • groundCoordinate: GroundCoordinate

        The patch position on the terrain.

      • windSourceState: WindSourceState

        The current mouse-driven wind source state.

      • elapsedSceneTimeInSeconds: number

        Absolute scene time used for ambient motion.

      Returns PlanarVector

      The total planar wind force for this patch.