Better HN
topnewbestaskshowjobs
Log inSign up

bbycroft

6 karma · joined Dec 3, 2023 (3y ago) · 2 submissions

Submissions

comment 3y ago · link · parent

My bad, this is likely WebGL2 support, as others have pointed out. Now I show a message on the canvas area if that's the case.

I wasn't expecting it to get quite this popular, so hadn't handled this (rather major) edge case.

comment 3y ago · link · parent

Author here! Thanks, you'll find the code in https://github.com/bbycroft/llm-viz/blob/main/src/llm/Canvas... I don't know a name for it, I just made it up.

But for me it's really broken haha

1) When you zoom, the cursor doesn't stay in the same position relative to some projected point 2) Panning also doesn't pin the cursor to a projected point, there's just a hacky multiplier there based on zoom

The main issue is that I'm storing the view state as target (on 2D plane) + euler angles + distance. Which is easy to think about, but issues 1 & 2 are better solved by manipulating a 4x4 view matrix. So would just need a matrix -> target-vector-pair conversion to get that working.