Check out example codes for "The softness of a spot lights edge is controlled by penumbra angle, value gives perfect hard edge:". It will help you in understanding the concepts better.

Code Example 1

The softness of a spot lights edge is controlled by penumbra angle, value gives perfect hard edge: 
Decrease near edge

Learn ReactJs, React Native from akashmittal.com