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
or that reversed, or using some different kind of logical test. Looks like your eslint config doesn't love OffscreenCanvas, so I might need some help convincing it too.
Not super urgent, I think I can hack around this until it's fixed here.
Alternatively you could just extend the TinySDF class and override the _createCanvas method. This is what I'm doing in tests to switch to Node's canvas:
Had to remove it again because apparently OffscreenCanvas doesn't respect the willReadFrequently context option on current Chrome 93 (which appears to be fixed on 94 beta), causing performance issues. Will readd it in the future when there are no performance issues across current browsers.
Activity
mourner commentedon Apr 16, 2021
Alternatively you could just extend the
TinySDFclass and override the_createCanvasmethod. This is what I'm doing in tests to switch to Node'scanvas:tiny-sdf/test/test.js
Lines 13 to 17 in 88d5b01
MatthewSteel commentedon Apr 16, 2021
Ah, that's much better than the hack I had in mind, thanks for the tip!
mourner commentedon Apr 16, 2021
@MatthewSteel you're welcome! This will only work on the
masterbranch for now though — I need to release a new version.mourner commentedon Sep 22, 2021
Added as a part of ff5cef8
mourner commentedon Sep 24, 2021
Had to remove it again because apparently
OffscreenCanvasdoesn't respect thewillReadFrequentlycontext option on current Chrome 93 (which appears to be fixed on 94 beta), causing performance issues. Will readd it in the future when there are no performance issues across current browsers.morandd commentedon Sep 23, 2022
It seems Chrome added willReadFrequently support back in R99?
https://chromestatus.com/feature/6051647656558592
readd OffscreenCanvas by default, close #35