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

    GrassPatchPhysicsSimulation implements a classic damped spring model. The spring continuously tries to pull the grass upright, damping removes energy over time, and the wind model adds external force.

    Index

    Constructors

    Methods

    • Creates a simple evenly spaced patch grid that covers the entire terrain.

      Parameters

      • patchRows: number

        Number of rows in the patch grid.

      • patchColumns: number

        Number of columns in the patch grid.

      • groundWidthInWorldUnits: number

        Terrain width.

      • groundDepthInWorldUnits: number

        Terrain depth.

      Returns GrassPatchDescriptor[]

      A list of patch descriptors.

    • Advances every patch by one frame.

      Parameters

      • timeStepInSeconds: number

        The elapsed frame time.

      • windSourceState: WindSourceState

        The latest wind source state.

      • elapsedSceneTimeInSeconds: number

        Total elapsed scene time.

      Returns void