HTML 5 Canvas Experiment Hints At Things To Come
An anonymous reader writes with an interesting and impressive demonstration of modern browsers' HTML 5 capabilities. "From the 9elements blog: 'HTML5 is getting a lot of love lately. With the arrival of Firefox 3.5, Safari 4 and the new 3.0 beta of Google Chrome, browsers support some great new features including canvas and the new audio/video tags. [...] We've created a little experiment which loads 100 tweets related to HTML 5 and displays them using a javascript-based particle engine.' The site warns "(beware: sophisticated browser needed)"; Firefox 3.5 seems to work fine.
It's sad that it has to eat an entire core's worth of processing time, the whole time I was on the page I had an extremely powerful GPU sitting idle.
I think before anything like that can truly take off, they need a means of taking advantage of the hardware we have.
This demo reminds me of fancy flash sites with horrible usability.
How about some actual cool examples like this instead?
I don't need to test my programs.. I have an error correcting modem.
KDE4's Konqueror handled the page for me much better than did Firefox. I have Firefox 3.5.1 and Konqueror 4.2.98. While Konqueror gave me no sound and Firefox did, when I tried it with Firefox, it ate up so many resources that I couldn't even get my key combo for xkill to work. Fortunately, I was able to get to a virtual terminal and kill it, but it wound up crashing my window manager. Konqueror did much better. I need to try it with Opera (which I understand is supposed to be very good).
Anyway, it's pretty neat. I think I'll start making some pages for the heck of it and put it on my local network.
Omnes tuae crepidines sunt nobis sunt. Ascendo tuum!
The demo uses processing.js - essentially a Java library. Whether this has any more utility than Flash (remembering that the flash of today is not the monstrosity most of /. seems to remember and think it still is) could be debated, but it's definitely more in line with standards compliance.
More control for one. Flash is essentially a self contained program running in your browser. HTML5 will allow things like audio volume per tab, or per domain, more interaction between the page itself, the content, and the user.
Here's a fantastic example of the sorts of things this'll make possible, which simply can't be done with flash:
http://www.double.co.nz/video_test/video.svg
I actually think this is a better HTML5 example than the article. There you have video transparency, which can be a variable, you can selective audio based on the last thing you clicked, it can be moved, rotated, and resized freely by dragging the corners, etc. You can pause, play, mute, and adjust volume to each one completely independently of the other (though the volume control is blocked by the draggable corners, remember you can right click the video and click Show Controls in firefox). I once even saw a demo where the edges of video were distortable, allowing you to skew it, etc, and it was smoothly done too, better than most compiled applications I've seen. Not to mention effects like reflecting video content below the video in real-time (like it's on a glassy surface).
What'll be really impressive is when SVG is finally fully implemented, because that'll give us an open standard for filters and many other things (you can alter colors in a video on the fly, generate images, gradients, and effects dynamically, etc, as well as animations without any javascript at all.
What it comes down to is changing the notion of what's possible with just a browser... If you think that AJAX webapps are impressive now, just you wait...
Come now, that's merely a toy!
Explore the raw power of the canvas on an Apple II emulated in Javascript!
http://scripple-2.appspot.com/
Paste this in and press enter:
10 TEXT : HGR
20 HCOLOR=3
30 FOR I = 0 to 279 step 4
40 HPLOT I,0 TO 279-I,191
50 NEXT I
RUN
(Only hires is on the canvas.)
SLM
main() {1;}
Gotta be something wrong with your machine then.. since it runs just fine on my Sempron 3500 laptop with a GeForce Go 6150, 1.5 gigs of ram, ff 3.0.13, ubuntu jaunty.
Yeah, right.
The only problem with game development is that javascript doesn't support sound. You can use background music with , but the only way games have been using sound in canvas so far is by using an additional flash applet controlled by javascript =\
'For we walk by faith, not by sight.' II Corinthians 5:7
I've got ff 3.0.13 on windows XP. Worked for me.