Wild flax: fibre plants in meadows and by the lake (2 fibre each)

This commit is contained in:
Paul Bailey
2026-11-04 18:12:56 +00:00
parent 0c18b6d49e
commit 80786ab796
3 changed files with 32 additions and 3 deletions

View File

@@ -19,6 +19,8 @@ const ASH := Color(0.18, 0.17, 0.16)
const BINDING := Color(0.75, 0.68, 0.48)
const FIBER := Color(0.45, 0.55, 0.22)
const FIBER_PLANT := Color(0.68, 0.70, 0.36) ## paler than the grass, so it shows
const FIBER_SEED := Color(0.80, 0.68, 0.40)
const BERRY := Color(0.62, 0.08, 0.16)
const MUSH_CAP := Color(0.72, 0.30, 0.18)
const MUSH_ROAST := Color(0.40, 0.24, 0.12)
@@ -73,6 +75,7 @@ static func build(key: String) -> ArrayMesh:
"trout": m = _fish(TROUT, 0.24, false)
"grilled_perch": m = _fish(PERCH, 0.16, true)
"grilled_trout": m = _fish(TROUT, 0.24, true)
"fiber_plant": m = _fiber_plant()
"berry_bush": m = _berry_bush(true)
"berry_bush_bare": m = _berry_bush(false)
_:
@@ -209,6 +212,22 @@ static func _fiber() -> ArrayMesh:
_box(st, Vector3(0, 0.03, 0), Vector3(0.05, 0.05, 0.08), CLOTH)
return P._commit(st)
## A wild flax clump you pick for fibre: tall pale stalks fanning out of the
## grass, each with a seed head, so it stands out above the meadow.
static func _fiber_plant() -> ArrayMesh:
var st := P._begin()
var r := _rng(53)
for i in range(20):
var a := TAU * i / 20.0 + r.randf_range(-0.2, 0.2)
var lean := r.randf_range(0.12, 0.4)
var h := r.randf_range(1.0, 1.45)
var base := Vector3(cos(a), 0, sin(a)) * r.randf_range(0.03, 0.12)
var top := base + Vector3(cos(a) * lean, h, sin(a) * lean)
var col := P._mul(FIBER_PLANT, r.randf_range(0.85, 1.15))
P._cylinder(st, base, top, 0.022, 0.009, 4, col, r)
P._cylinder(st, top, top + (top - base).normalized() * 0.14, 0.032, 0.006, 4, P._mul(FIBER_SEED, r.randf_range(0.9, 1.1)), r)
return P._commit(st)
static func _berries() -> ArrayMesh:
var st := P._begin()
var r := _rng(43)