# Ideas and suggestions needed for Improving p5.js WebGL mode in GSOC 2019

**URL:** <https://discourse.processing.org/t/ideas-and-suggestions-needed-for-improving-p5-js-webgl-mode-in-gsoc-2019/8865>\
**Category:** Summer of Code\
**Created:** [March 2, 2019, 8:34pm UTC](https://discourse.processing.org/t/ideas-and-suggestions-needed-for-improving-p5-js-webgl-mode-in-gsoc-2019/8865 "2019-03-02T20:34:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sanketsingh24](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@sanketsingh24](https://discourse.processing.org/u/sanketsingh24)\
**Post date:** [March 7, 2019, 2:31pm UTC](https://discourse.processing.org/t/ideas-and-suggestions-needed-for-improving-p5-js-webgl-mode-in-gsoc-2019/8865/4 "2019-03-07T14:31:32Z")

</div>

`fallOff(constant, linear, quadratic)`

In a general sense, it can be used to limit the spread of diffusion from the lights, or vice versa. The falloff factor can also control the intensity of light.

Arguments-

1. Constant
2. Linear
3. Quadratic

These arguments would be used to calculate the falloff as-

`falloff = 1 / (CONSTANT + d * LINEAR + (d*d) * QUADRATIC)`

where d is the distance from light position to vertex position.

---

_[View the full topic](https://discourse.processing.org/t/ideas-and-suggestions-needed-for-improving-p5-js-webgl-mode-in-gsoc-2019/8865)._
