phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
18 stars 5 forks source link

Warning: Canvas2D: Multiple readback operations using `getImageData` are faster with the `willReadFrequently` attribute set to `true` #532

Open zepumph opened 4 months ago

zepumph commented 4 months ago

I get this warning in the console when running this sim. Likely a quick fix in DiffractionScene:

https://github.com/phetsims/wave-interference/blob/7a5ea7db9edcf9d46566b7b2319855250ee30908/js/diffraction/model/DiffractionScene.ts#L65

Full message:

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently