hex-world
    Preparing search index...

    Function setSeasonPhase

    • Tell a material which way the year is going, so it can decide whether a half-turned leaf is spring green or autumn gold. Cheap enough to call every frame; a no-op on a material with no foliage tint.

      HexWorld does this for you whenever the season advances or is scrubbed. Drive it yourself with seasons.phase if you are wiring materials by hand.

      Parameters

      • material: Material
      • phase: number

      Returns void

      seasons.advance(dt);
      for (const mat of myFoliageMaterials) setSeasonPhase(mat, seasons.phase);