Closed floehopper closed 1 month ago
Steps to reproduce:
This doesn't seem to break anything in production, but the app completely breaks in development which isn't great.
from p5 import * img = None def setup(): size(400, 200) global img img = load_image("does-not-exist.png") def draw(): image(img, 10, 25, 100 , 100) no_loop() run()
The following function calls seem to be relevant:
load_image(): https://github.com/RaspberryPiFoundation/editor-ui/blob/ca69c291365422025c5e628c3800b83546b0f2f1/public/shims/processing/p5/p5-shim.js#L1700
load_image()
loadImage(): See these docs
loadImage()
It looks as if this is also resolved if the image is loaded in preload() as opposed to setup() as in #1024. Closing.
preload()
setup()
Steps to reproduce:
This doesn't seem to break anything in production, but the app completely breaks in development which isn't great.
Initial investigation
The following function calls seem to be relevant:
load_image()
: https://github.com/RaspberryPiFoundation/editor-ui/blob/ca69c291365422025c5e628c3800b83546b0f2f1/public/shims/processing/p5/p5-shim.js#L1700loadImage()
: See these docs