Message from JavaScript discussions

August 2020

— I highly doubt that it’d do collision check with each primitive VS viewport


But could see it as a big optimization feature and since we’re talking about 2d canvas context, i’d not be surprised and i don’t want to reinvent wheel

— What wheel you want to reinvent🤔 im not a canvas-guy.. didnt use that api

— Imagine there is viewport check inside every context call and i just don’t know about it and will implement it again as a layer on top, totally pointless

Message permanent page

— That’s why i am asking

— Can i somewhere see canvas draw calls or something?

— No. But you can do 10000 calls of rendering on canvas and same off canvas. Check both with console.time() and console.timeEnd()
Also. Since you are going to use requestAnimationFrame, you can test how many frames you can draw in or out in a given time

Message permanent page

— Hmm good point, will try

— Nope that's not canvas.. i was making myself a tea with ice right now, one piece felt on the canvas, that's all i know about canvas. manually logging operations maybe🤔

Message permanent page

— Okay, so it kinda does

— Visible 100k calls

— Off-viewport 100k calls