You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get one of the 1.x reference examples of a function to load some object in preload, ensure it runs with a working file on loading
Update the p5.js script to use the current p5.js 2.0 beta library
Try to run and the error is something related to trying to use the specific object, but the variable is undefined. Thus, the FES wraps a TypeError without clearly guiding the user to the real issue, which is that preload has not been called and the object is empty.
Most appropriate sub-area of p5.js?
p5.js version
2.0-beta.2
Web browser and version
Chrome
Operating system
MacOSX
Steps to reproduce this
Steps:
preload
, ensure it runs with a working file on loadingTypeError
without clearly guiding the user to the real issue, which is thatpreload
has not been called and the object is empty.All loaders that might be affected:
Snippet:
Here are two examples in to different loader functions (code needs files to run):
image(img, 0, 0);
withTypeError: Cannot read properties of undefined (reading 'width')...
model(shape);
withTypeError: Cannot read properties of undefined (reading 'vertices')...
The text was updated successfully, but these errors were encountered: