P5.js: loadShader() not included in 0.5.16 but appears on reference page

Created on 13 Jan 2018  路  7Comments  路  Source: processing/p5.js

I don't seem to be able to use the loadShader() function in the 0.5.16 build. It also appears to be missing if I console.log(p5.prototype); it does not appear to be in there either.

documentation for loadShader:
https://p5js.org/reference/#/p5/loadShader

Not sure if I'm just looking in the wrong places, but If it's not included in the release it should probably be marked on the reference page.

Nature of issue?

  • [ ] Found a bug
  • [ ] Existing feature enhancement
  • [ ] New feature request

Most appropriate sub-area of p5.js?

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

Which platform were you using when you encountered this?

  • [ ] Mobile/Tablet (touch devices)
  • [x] Desktop/Laptop
  • [ ] Others (specify if possible)

Details about the bug:

  • p5.js version: 0.5.16
  • Web browser and version: Firefox 57.0.4 and Chrome Version 63.0.3239.132
  • Operating System: Windows 64bit
  • Steps to reproduce this: console.log(p5.prototype.loadShader);

Feature enhancement details:

New feature details:

Most helpful comment

it will be in the next release coming soon

All 7 comments

hmm... i think something else may be causing this issue. i see it:

https://codepen.io/Spongman/pen/YYvrJL?editors=0010

It must be.... I get very different results:
https://codepen.io/tsuhre/pen/EoRvdY

i see a red square in your pen. Firefox & Chrome on Xubuntu 16.04

it will be in the next release coming soon

Thats great! Any advice for a workaround in the mean time? I'm hoping to avoid accessing the webgl renderer directly.

@bmatthews1 you are using an old version of p5 in that pen. If you go to your pen settings, you have 0.5.16 listed in the "add classes to HTML" section and 0.5.6 in the javascript section. Replace the reference to 0.5.6 with a reference to 0.5.16 in the javascript section and you get expected behavior. loadShader did not exist in 0.5.6.

Well this is definitely a slap-face moment. I had the 0.5.16 library linked in the html settings, not the javascript ones. Thanks @mlarghydracept !

Was this page helpful?
0 / 5 - 0 ratings