Welcome! Log In Create A New Profile

Advanced

[PHP] HTML5 canvas tag

Posted by Richard Heyes 
Richard Heyes
[PHP] HTML5 canvas tag
October 12, 2008 07:25PM
Hi,

Not quite PHP, but since you're all web developers you may well be
interested in this:

http://www.phpguru.org/static/canvas.html

It's a short piece on the new HTML5 canvas tag. Bonza.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
Re: [PHP] HTML5 canvas tag
October 12, 2008 07:50PM
On Sun, 2008-10-12 at 18:21 +0100, Richard Heyes wrote:
> Hi,
>
> Not quite PHP, but since you're all web developers you may well be
> interested in this:
>
> http://www.phpguru.org/static/canvas.html
>
> It's a short piece on the new HTML5 canvas tag. Bonza.
>
> --
> Richard Heyes
>
> HTML5 Graphing for FF, Chrome, Opera and Safari:
> http://www.rgraph.org
>
Hmm, it doesn't mention which versions of the browsers it lists are
capable of displaying the canvas tag. I'm still using Firefox 2 on this
computer, and all I got was 5 horizontal bands of grey and blue.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nathan Rixham
[PHP] Re: HTML5 canvas tag
October 12, 2008 08:10PM
Richard Heyes wrote:
> Hi,
>
> Not quite PHP, but since you're all web developers you may well be
> interested in this:
>
> http://www.phpguru.org/static/canvas.html
>
> It's a short piece on the new HTML5 canvas tag. Bonza.
>

very fine work mr heyes, I've been most impressed by you're RGraph - a
great use for the canvas!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown
Re: [PHP] HTML5 canvas tag
October 12, 2008 08:20PM
On Sun, Oct 12, 2008 at 1:50 PM, Ashley Sheridan
<[email protected]> wrote:
>>
> Hmm, it doesn't mention which versions of the browsers it lists are
> capable of displaying the canvas tag. I'm still using Firefox 2 on this
> computer, and all I got was 5 horizontal bands of grey and blue.

Check your addons and such, Ashley. Gecko itself (the HTML
rendering engine used in Firefox) has supported <canvas> since 1.8 I
believe, which equated to Firefox 1.5.

--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
Re: [PHP] HTML5 canvas tag
October 12, 2008 08:20PM
On Sun, 2008-10-12 at 14:15 -0400, Daniel Brown wrote:
> On Sun, Oct 12, 2008 at 1:50 PM, Ashley Sheridan
> <[email protected]> wrote:
> >>
> > Hmm, it doesn't mention which versions of the browsers it lists are
> > capable of displaying the canvas tag. I'm still using Firefox 2 on this
> > computer, and all I got was 5 horizontal bands of grey and blue.
>
> Check your addons and such, Ashley. Gecko itself (the HTML
> rendering engine used in Firefox) has supported <canvas> since 1.8 I
> believe, which equated to Firefox 1.5.
>
What add-ons would I be looking for? I was under the impression canvas
support is built in at browser level, not plugin level.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown
Re: [PHP] HTML5 canvas tag
October 12, 2008 08:35PM
On Sun, Oct 12, 2008 at 2:21 PM, Ashley Sheridan
<[email protected]> wrote:
>>
> What add-ons would I be looking for? I was under the impression canvas
> support is built in at browser level, not plugin level.

And that impression would be correct, but some plugins extend and
alter the final result. Try disabling all plugins and addons, then
view the RGraph display. Before I left the Mozilla project, this was
pretty much the standard response, and was usually the fix.

--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jonesy
[PHP] Re: HTML5 canvas tag
October 12, 2008 10:55PM
On Sun, 12 Oct 2008 14:15:10 -0400, Daniel Brown wrote:
> On Sun, Oct 12, 2008 at 1:50 PM, Ashley Sheridan
><[email protected]> wrote:
>>>
>> Hmm, it doesn't mention which versions of the browsers it lists are
>> capable of displaying the canvas tag. I'm still using Firefox 2 on this
>> computer, and all I got was 5 horizontal bands of grey and blue.
>
> Check your addons and such, Ashley. Gecko itself (the HTML
> rendering engine used in Firefox) has supported <canvas> since 1.8 I
> believe, which equated to Firefox 1.5.

Probably not Firefox 1.5. I have FF 1.5 without _any_ add-ons here and
all I got were the same "5 horizontal bands of grey and blue."

Opera 9.5 works ok.

Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
Re: [PHP] Re: HTML5 canvas tag
October 12, 2008 11:45PM
On Sun, 2008-10-12 at 20:53 +0000, Jonesy wrote:
> On Sun, 12 Oct 2008 14:15:10 -0400, Daniel Brown wrote:
> > On Sun, Oct 12, 2008 at 1:50 PM, Ashley Sheridan
> ><[email protected]> wrote:
> >>>
> >> Hmm, it doesn't mention which versions of the browsers it lists are
> >> capable of displaying the canvas tag. I'm still using Firefox 2 on this
> >> computer, and all I got was 5 horizontal bands of grey and blue.
> >
> > Check your addons and such, Ashley. Gecko itself (the HTML
> > rendering engine used in Firefox) has supported <canvas> since 1.8 I
> > believe, which equated to Firefox 1.5.
>
> Probably not Firefox 1.5. I have FF 1.5 without _any_ add-ons here and
> all I got were the same "5 horizontal bands of grey and blue."
>
> Opera 9.5 works ok.
>
> Jonesy
> --
> Marvin L Jones | jonz | W3DHJ | linux
> 38.24N 104.55W | @ config.com | Jonesy | OS/2
> * Killfiling google & XXXXbanter.com: jonz.net/ng.htm
>
>
Just disable the add-ons for Fx, and no such luck. Opera 9.2 doesn't
work with it either. I think it goes back to my original point that
version numbers next to the browsers that the tag will work on might be
helpful. It's a bit like saying CSS works on such-and-such browser,
without knowing what version of the browser, and what CSS property.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yeti
Re: [PHP] Re: HTML5 canvas tag
October 12, 2008 11:55PM
I'm not very familiar with the whole thing yet but after looking at
your site I find it quite interesting.
So is it possible to render 3d vector based objects in the canvas and
if so an entire 3d based website?
Are there any 3d libraries yet like OpenGL for applications?
It would be quite handy to describe 3d/2d objects or styles with a
language like CSS. Do you think that will be possible in the near
future?

A yeti.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 12:05AM
On Sun, 2008-10-12 at 14:50 -0700, Yeti wrote:
> I'm not very familiar with the whole thing yet but after looking at
> your site I find it quite interesting.
> So is it possible to render 3d vector based objects in the canvas and
> if so an entire 3d based website?
> Are there any 3d libraries yet like OpenGL for applications?
> It would be quite handy to describe 3d/2d objects or styles with a
> language like CSS. Do you think that will be possible in the near
> future?
>
> A yeti.
>
The best thing I've seen so far for 3D on the web is Papervision. It's
Flash based, but the donkey work is in Actionscript 3.

The best thing I've seen so far in terms of what it's capable of is
probably http://lab.zupko.info/reflection/realz/ which is displaying
real-time reflections for an X-wing starfighter on some sort of ice cube
mirror. You have to see it to understand it. It's also damn fast as
libraries go.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
TG
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 12:10AM
This is the coolest thing I've seen using canvas so far:

http://www.abrahamjoffe.com.au/ben/canvascape/


----- Original Message -----
From: Ashley Sheridan <[email protected]>
To: Yeti <[email protected]>
Cc: PHP - General <[email protected]>
Date: Sun, 12 Oct 2008 23:08:30 +0100
Subject: Re: [PHP] Re: HTML5 canvas tag

> On Sun, 2008-10-12 at 14:50 -0700, Yeti wrote:
> > I'm not very familiar with the whole thing yet but after looking at
> > your site I find it quite interesting.
> > So is it possible to render 3d vector based objects in the canvas and
> > if so an entire 3d based website?
> > Are there any 3d libraries yet like OpenGL for applications?
> > It would be quite handy to describe 3d/2d objects or styles with a
> > language like CSS. Do you think that will be possible in the near
> > future?
> >
> > A yeti.
> >
> The best thing I've seen so far for 3D on the web is Papervision. It's
> Flash based, but the donkey work is in Actionscript 3.
>
> The best thing I've seen so far in terms of what it's capable of is
> probably http://lab.zupko.info/reflection/realz/ which is displaying
> real-time reflections for an X-wing starfighter on some sort of ice cube
> mirror. You have to see it to understand it. It's also damn fast as
> libraries go.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 12:35AM
On Sun, 2008-10-12 at 18:08 -0400, TG wrote:
> This is the coolest thing I've seen using canvas so far:
>
> http://www.abrahamjoffe.com.au/ben/canvascape/
>
>
> ----- Original Message -----
> From: Ashley Sheridan <[email protected]>
> To: Yeti <[email protected]>
> Cc: PHP - General <[email protected]>
> Date: Sun, 12 Oct 2008 23:08:30 +0100
> Subject: Re: [PHP] Re: HTML5 canvas tag
>
> > On Sun, 2008-10-12 at 14:50 -0700, Yeti wrote:
> > > I'm not very familiar with the whole thing yet but after looking at
> > > your site I find it quite interesting.
> > > So is it possible to render 3d vector based objects in the canvas and
> > > if so an entire 3d based website?
> > > Are there any 3d libraries yet like OpenGL for applications?
> > > It would be quite handy to describe 3d/2d objects or styles with a
> > > language like CSS. Do you think that will be possible in the near
> > > future?
> > >
> > > A yeti.
> > >
> > The best thing I've seen so far for 3D on the web is Papervision. It's
> > Flash based, but the donkey work is in Actionscript 3.
> >
> > The best thing I've seen so far in terms of what it's capable of is
> > probably http://lab.zupko.info/reflection/realz/ which is displaying
> > real-time reflections for an X-wing starfighter on some sort of ice cube
> > mirror. You have to see it to understand it. It's also damn fast as
> > libraries go.
> >
> >
> > Ash
> > www.ashleysheridan.co.uk
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
That's cool! It is a little slow though, speed is not half as good as
Papervision.

I don't know why, but that works for me yet the graph doesn't.


Ash
www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Heyes
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 10:00AM
> very fine work mr heyes, I've been most impressed by you're RGraph - a great
> use for the canvas!

Thank you!

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Heyes
Re: [PHP] HTML5 canvas tag
October 13, 2008 10:00AM
> Check your addons and such, Ashley. Gecko itself (the HTML
> rendering engine used in Firefox) has supported <canvas> since 1.8 I
> believe, which equated to Firefox 1.5.

Older versions may well have issues though. An example of
inconsistencies would that FF3 doesn't seem to have a problem with
negative sizes for rectangles, whereas Chrome did. This one's easy to
fix though.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Heyes
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 10:05AM
> Probably not Firefox 1.5. I have FF 1.5 without _any_ add-ons here and
> all I got were the same "5 horizontal bands of grey and blue."

So it does support it, bit not very well... :-)

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Per Jessen
Re: [PHP] HTML5 canvas tag
October 13, 2008 10:10AM
Ashley Sheridan wrote:

> Hmm, it doesn't mention which versions of the browsers it lists are
> capable of displaying the canvas tag. I'm still using Firefox 2 on
> this computer, and all I got was 5 horizontal bands of grey and blue.

Same here.


/Per Jessen, Z├╝rich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Heyes
Re: [PHP] Re: HTML5 canvas tag
October 13, 2008 10:10AM
Hi,

> I'm not very familiar with the whole thing yet

I think that's a common position.

> but after looking at
> your site I find it quite interesting.
> So is it possible to render 3d vector based objects in the canvas and
> if so an entire 3d based website?

Well before you start calling the methods which actually do something,
you need to get a "context" and specify '2d' (the only one that's
supported right now), so the door has been left open for a '3d'
context. And if it doesn't materialise, then no biggie.

> Are there any 3d libraries yet like OpenGL for applications?

Don't think so. Though there is a 3d Doom-esque game which you'll find
if you look around.

> It would be quite handy to describe 3d/2d objects or styles with a
> language like CSS. Do you think that will be possible in the near
> future?

Probably not. But the drawing API is very easy to use with methods
like lineTo() and arc() etc. The drawing is all done using Javascript
so if you're familiar with that, then you're in.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login