News for hackers. Stuff that matters.
Re:Build an Infinite Canvas by rareitem on Thursday August 29, 2024 @08:07PM (#41396595)
Looks pretty cool. "Lesson 011 - Draw polyline" returns 404 though.
Re:Build an Infinite Canvas by martin_henk on Thursday August 29, 2024 @09:50PM (#41397095)
Infinite canvas is for me the new UX paradigm that could dominate the next years to come. Just seeing how natural Miro is used for all kinds of document creation is the moment it made click in my head.
Re:Build an Infinite Canvas by idle_zealot on Thursday August 29, 2024 @11:02PM (#41397396)
It's great that you've found something you enjoy, but do note that the experience isn't universally beloved. Personally, I find infinite-canvas-style editors and documents totally unparseable and tedious to navigate compared to something hierarchical or flat. I theorize that the difference in preference has something to do with how different individuals use spacial ideas to map concepts, but it could be a simple matter of familiarity.
Re:Build an Infinite Canvas by janderland on Friday August 30, 2024 @01:09AM (#41397883)
The only way an infinite canvas makes sense is if the diagram guides the user. You can’t rely on simply going to the next page anymore, so it does take some extra effort to get it right.
Re:Build an Infinite Canvas by throwup238 on Thursday August 29, 2024 @10:11PM (#41397185)
> new UX paradigm

I just felt a great disturbance in the force as a billion users shuddered in fear simultaneously.

Re:Build an Infinite Canvas by splash123 on Thursday August 29, 2024 @09:54PM (#41397108)
looks cool! this is the topic i was curious about for a while, thanks for the demonstration.

nit: lesson 001 has a figure with Chinese characters while the page is English.

Re:Build an Infinite Canvas by njtransit on Thursday August 29, 2024 @11:07PM (#41397415)
While this is really cool, you're essentially re-implementing the browser if you take this route. If you're ok only rendering in the browser, you can easily implement an infinite canvas using the normal DOM (including normal HTML elements and SVGs) and the CSS transform attribute. With a few tricks, you can even make it performant when using React.
Re:Build an Infinite Canvas by internetter on Friday August 30, 2024 @09:35AM (#41400579)
I'm not actually convinced the DOM can handle this. I've tried using native javascript and it worked, but the canvas was much smoother
Re:Build an Infinite Canvas by njtransit on Friday August 30, 2024 @10:01PM (#41406109)
I have a relatively naive implementation of an infinite canvas in React (which is a very slow library). The implementation is exactly 161 lines of code (including white space, imports, etc.). On my laptop, my implementation visibly starts to drop frames around 10,000 elements. The linked implementation starts to visibly drop frames at 20,000 elements. I'm leaving a lot of performance on the table, e.g. I don't have a culling equivalent and my DOM structure causes hit testing to be the bottleneck, which is solvable. What I'm able to render is much richer than a canvas, because of full HTML/CSS support. It's definitely possible, but you have to be willing to sit down with the profiler to understand what your bottlenecks are.
Re:Build an Infinite Canvas by rikroots on Friday August 30, 2024 @02:53PM (#41403498)
This is a superb introduction in the intricacies involved with implementing an infinite canvas from scratch. Reading through it, I'm really glad that when I wrote my canvas library I made a decision to avoid WebGL/WebGpu at all costs - though mature libraries that make heavy/exclusive use of such tech clearly demonstrate the benefits.

Looking forward to future instalments!

Re:Build an Infinite Canvas by sva_ on Saturday August 31, 2024 @05:06AM (#41407489)
The webgl renderer in lesson 1 does not seem to work in Chromium/Firefox on Linux.