SurfaceTextureSpec class
Specifies a secondary texture to blend over the terrain surface within the vegetation boundary.
The texture is tiled using world-space XZ coordinates so it doesn't stretch regardless of boundary size. It fades out smoothly at the boundary edges.
Usage: createGrass(camera, ..., surfaceTexture: SurfaceTextureSpec( asset: 'assets/terrain/stones_leaves.png', blendStrength: 0.6, tilingScale: 12.0, edgeFade: 0.25, ), );
Constructors
- SurfaceTextureSpec({required String asset, double blendStrength = 0.5, double tilingScale = 10.0, double edgeFade = 0.2})
-
const
Properties
- asset → String
-
Asset path of the secondary texture (PNG with optional alpha).
final
- blendStrength → double
-
Overall opacity of the overlay in
0, 1.final - edgeFade → double
-
Fraction of the boundary half-extent used for the smooth edge fade.
0.0 = hard cut, 0.25 = fade over the outer 25% of the boundary.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tilingScale → double
-
How many world metres before the texture repeats.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited