P5.js: The directional light example doesn't work right

Created on 27 Jul 2020  路  7Comments  路  Source: processing/p5.js

Most appropriate sub-area of p5.js?

  • [ ] Color
  • [ ] Core/Environment/Rendering
  • [ ] Data
  • [ ] Dom
  • [ ] Events
  • [ ] Image
  • [ ] IO
  • [ ] Math
  • [ ] Typography
  • [ ] Utilities
  • [x ] WebGL
  • [ ] Other (specify if possible)

Details about the bug:

The example on https://p5js.org/reference/#/p5/directionalLight is supposed to change when the mouse is moved. But it doesn't.
If the position of the light is changed in the code before the run, the light is moved. It kind of seems to me that light position is fixed by the first time directionalLight is called.

  • p5.js version: p5.js v1.1.9 July 22, 2020
  • Web browser and version: tested in Firefox, Chrome and Opera
  • Operating System: Windows 10
  • Steps to reproduce this:
    Run the example on the reference page.
bug

Most helpful comment

Ah yes, should be caching then. Most resources have query string that ensure when the file changed a new version is cached but since p5.min.js doesn't have the query string attached it probably is still cached.

All 7 comments

I would like to work on this issue.

Hi!

Thanks @JimBrink for reporting this and @matvs for your interest. I still believe this should have been fixed in #4406 and that the fix should have been applied after the latest release. So I was just trying to see why it didn't :sweat_smile: . I noticed that despite the release, the p5 version used by the examples is still 1.0.0 as seen here: https://p5js.org/assets/js/p5.min.js
The banner still says p5.js v1.0.0 February 29, 2020. I think we should first try updating that.

If this problem still exists after the version issue on the website is addressed, feel free to work on it :smile:

The version that should be deployed onto the live site is showing the correct version. @lmccart Did the deploy from the github branch to the live site run for the new releases?

The deploy did happen, and I just ssh'd in and confirmed the file is at v1.1.9. A cacheing issue then? I seem to recall this happening a couple times in the past but we never tracked it down.

Ah yes, should be caching then. Most resources have query string that ensure when the file changed a new version is cached but since p5.min.js doesn't have the query string attached it probably is still cached.

So if we add a query string into the website pages that link to this file, would this fix it?

I'd expect so.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ogoossens picture ogoossens  路  3Comments

b0nb0n picture b0nb0n  路  3Comments

aferriss picture aferriss  路  3Comments

sps014 picture sps014  路  3Comments

Patchy12 picture Patchy12  路  3Comments