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

    GrassFieldSurface owns the renderable mesh for every blade of grass. The geometry is updated on the CPU each frame so that the same scene can run on both the WebGPU renderer and the automatic WebGL fallback without needing a custom shader language branch for each backend.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates the dynamic grass mesh and seeds its static geometry attributes.

      Parameters

      • parameters: {
            bladeCount: number;
            segmentsPerBlade: number;
            patchStates: GrassPatchSimulationState[];
            minimumBladeHeightInWorldUnits: number;
            maximumBladeHeightInWorldUnits: number;
            minimumBladeWidthInWorldUnits: number;
            maximumBladeWidthInWorldUnits: number;
            groundWidthInWorldUnits: number;
            groundDepthInWorldUnits: number;
        }

      Returns GrassFieldSurface

    Properties

    mesh: Mesh<
        BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
        MeshPhysicalMaterial,
    >

    Methods