import { Ref, RefObject } from 'react'; import { Object3D, Camera } from 'three/webgpu'; import { GrassInput, Grass as Grass$1, Brush } from './index.js'; export { BrushMode, GrassLOD, GrassMap, GrassMapOptions, GrassMapSample, GrassOptions, GrassRenderer, GrassSettings, GrassStats, GrassStyle, GrassUniforms, Interactor, MAX_INTERACTORS, PresetName, TerrainPainter, WindOptions, createBillboardGeometry, createBladeGeometry, createGrassUniforms, presets } from './index.js'; import { Terrain } from 'threejs-heightfield'; export { HeightFn, Terrain, bakeHeightfield, createHeightSampler, raycastHeight, slopeAt } from 'threejs-heightfield'; /** * React Three Fiber entry point: the `` component plus everything from `threejs-grass` * (the imperative class is re-exported as `GrassImpl`). * * @module threejs-grass/react */ /** Props of the `` component: every {@link GrassInput} setting plus the ones below. */ interface GrassProps extends GrassInput { /** Receives the underlying Grass instance (for `sampleHeight`, `mapNode`, `stats`, …). */ ref?: Ref; /** * Mesh/group (or a ref to one) — baked when the component mounts or the object changes — or a * `(x, z) => y` height function. Inline functions are fine: the latest one is always used, but * tiles already built keep their heights (call `grass.setTerrain()` to force a rebuild). */ terrain?: Terrain | RefObject; /** Camera the field follows. Defaults to the R3F default camera. */ camera?: Camera; /** Turns on the {@link TerrainPainter} with this brush (needs `grassMap`). `false` = off. */ paint?: Partial | false; } /** * Infinite, camera-centred grass for react-three-fiber. Needs a WebGPURenderer: * * @example * ```tsx * { const r = new WebGPURenderer(props as any); await r.init(); return r }}> * * * * ``` */ declare function Grass({ ref, terrain, camera, paint, ...options }: GrassProps): React.JSX.Element | null; export { Brush, Grass, Grass$1 as GrassImpl, GrassInput, type GrassProps };