Hacker News new | ask | show | jobs
by Groxx 5945 days ago
1) I'll seriously disagree with you on this. Flash is likely much easier, because it's designed around doing this, but it's easily possible in Canvas too. Just maybe not currently. An OpenGL-like pipeline to help figure out what you clicked on, combined with JavaScript objects that can draw themselves, allows identical behavior. I don't know about interaction speed, can't comment on that. And I'm only using OpenGL as an example because I have some idea of how it works, there are other ways to detect what was clicked.

Heck, if you wanted, you could literally duplicate OpenGL in its entirety in JS for Canvas. There's nothing preventing this, except lack of threading / parallel processing, though I admit it'd be ungodly slow.

2) Also primarily a problem currently, and likely due mostly to the lack of mature libraries to do just this. With compositing rules (source-over, source-atop, etc) and masks for objects, you can re-render only the displayed portion of any object on a Canvas as well.

Low level: well yeah, it's a thin layer over a bitmap surface. Libraries are needed to abstract away from that. It's kind of like saying that OpenGL isn't fast because it's core is low-level. That low-level feature-set Canvas has will be wrapped in libraries to make specific uses simpler, I guarantee it. Speed will come, especially as Canvas gains focus. It's still very new. Was Flash this fast/capable in pre-1.0 days? I have no idea if it'll catch up / surpass Flash, but it's far from its optimum right now.

I'm not calling for the death of Flash, and I seriously doubt it'll ever supersede Flash on everything, so Flash has it's uses and will continue to do so. Just pointing out that they're not on equal playing grounds in terms of development.

1 comments

Actually I think you just agreed with everything I was saying!

My point was canvas isn't quite there yet, not that it never will be, and also that I think the Flash-has-an-editor argument isn't the reason why canvas isn't ready yet.

As a side note, I'm already one of the people writing a library/framework to overcome the things I mentioned, the problem is I don't think it's going to be fast enough to do much with for a while.

Aaah, ok. I was keying in on the "There is no way of..." and "have to..." to mean you thought it was impossible, not that it just wasn't easy currently.