Strata - v1.4.10
    Preparing search index...

    Function calculateFade

    • Calculates a 0-1 opacity fade based on distance.

      Used to smoothly hide UI elements as they get further from or closer to the camera.

      Parameters

      • distance: number

        Current distance from camera.

      • fadeStart: number

        Distance where fading begins.

      • fadeEnd: number

        Distance where element is fully transparent.

      Returns number

      Opacity value (0-1).