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
I'm using putImageData with the infinite canvas and the behavior is fine using most browser.
But on safari version 16.5 using Ventura 13.4, when a call to this function is made,
the console logs the following error and does not display the expected content.
Unhandled Promise Rejection: TypeError: Type error
The problem did not occur in other settings using safari.
I created this minimal project using svelte.
The component using the canvas is at src/routes/TestComponent.svelte.
On most platform, a pixelated heart is shown, using this function
const draw = () => {
if (context && canvas) {
context.clearRect(0, 0, canvas.width, canvas.height);
const res = 21;
console.log(content.length, res * res * 4);
let imageData = new ImageData(res, res);
imageData.data.set(content);
// behaviour is different if this is used before
// context.fillRect(0,0, 100,100)
context.putImageData(
imageData,
Math.floor(canvas.width / 2),
Math.floor(canvas.height / 2)
);
}
};
Is there a problem with the way I use the library ?
I plan to create an example not using svelte, to make sure the problem is not from here.
The text was updated successfully, but these errors were encountered:
Internally, InfiniteCanvasusescreatePattern to draw the ImageData. But, as it turns out, Safari has a bug in precisely that method. So, nothing I can do about this, unfortunately.
I'm using putImageData with the infinite canvas and the behavior is fine using most browser.
But on safari version 16.5 using Ventura 13.4, when a call to this function is made,
the console logs the following error and does not display the expected content.
The problem did not occur in other settings using safari.
I created this minimal project using svelte.
The component using the canvas is at
src/routes/TestComponent.svelte
.On most platform, a pixelated heart is shown, using this function
Is there a problem with the way I use the library ?
I plan to create an example not using svelte, to make sure the problem is not from here.
The text was updated successfully, but these errors were encountered: