[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Best JavaScript graphics library

John J. Hughes II

7/5/2015 1:01:00 PM

Thanks for the first advices. Good to have this kind of forum to get
directions.

I have a C++ background and know about graphics programming. Now want to
learn to do graphics with js. What are your opinions about the best
graphics library for general drawing? Like moving sprites, drawing
lines, curves, bitmaps and other basics. Am not really into special
effects so much or 3D ... more like 2D and all the basics there.

I found this JSGL http:.... Is that a good one? I like it, but is
what js programmers normally use? Looks simple for me, but do you people
recommend it? I would like to have a simple to use library as well. This
one seems like that, but is its quality good enough? thanks

I did a small js graphics test (a card folllowing mouse), and seems to
me that the graphics is quite fast and good enough.
8 Answers

Michael Haufe (\"TNO\")

7/5/2015 6:30:00 PM

0

On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
> Thanks for the first advices. Good to have this kind of forum to get
> directions.
>
> I have a C++ background and know about graphics programming. Now want to
> learn to do graphics with js. What are your opinions about the best
> graphics library for general drawing? Like moving sprites, drawing
> lines, curves, bitmaps and other basics. Am not really into special
> effects so much or 3D ... more like 2D and all the basics there.
>
> I found this JSGL http:.... Is that a good one? I like it, but is
> what js programmers normally use? Looks simple for me, but do you people
> recommend it? I would like to have a simple to use library as well. This
> one seems like that, but is its quality good enough? thanks
>
> I did a small js graphics test (a card folllowing mouse), and seems to
> me that the graphics is quite fast and good enough.

My first suggestion is to learn the standard CANVAS API before looking at a library:

<https://developer.mozilla.org/en-US/docs/Web/API/Canv...

After that, if you are unwilling and/or unable to build a library for your specific needs, let's go from there.

Christoph M. Becker

7/5/2015 9:48:00 PM

0

Michael Haufe (TNO) wrote:

> On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
>> Thanks for the first advices. Good to have this kind of forum to get
>> directions.
>>
>> I have a C++ background and know about graphics programming. Now want to
>> learn to do graphics with js. What are your opinions about the best
>> graphics library for general drawing? Like moving sprites, drawing
>> lines, curves, bitmaps and other basics. Am not really into special
>> effects so much or 3D ... more like 2D and all the basics there.
>>
>> I found this JSGL http:.... Is that a good one? I like it, but is
>> what js programmers normally use? Looks simple for me, but do you people
>> recommend it? I would like to have a simple to use library as well. This
>> one seems like that, but is its quality good enough? thanks
>>
>> I did a small js graphics test (a card folllowing mouse), and seems to
>> me that the graphics is quite fast and good enough.
>
> My first suggestion is to learn the standard CANVAS API before looking at a library:
>
> <https://developer.mozilla.org/en-US/docs/Web/API/Canv...
>
> After that, if you are unwilling and/or unable to build a library for your specific needs, let's go from there.

ACK.

However, SVG may be an interesting alternative:
<https://developer.mozilla.org/en/docs/W....

--
Christoph M. Becker

John J. Hughes II

7/5/2015 10:02:00 PM

0

On 05/07/2015 19:29, Michael Haufe (TNO) wrote:
> On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
>> the graphics is quite fast and good enough.
> My first suggestion is to learn the standard CANVAS API before looking at a library:
>
> <https://developer.mozilla.org/en-US/docs/Web/API/Canv...

thanks, looks like a serious option. looks like pretty simple

>
> After that, if you are unwilling and/or unable to build a library for your specific needs, let's go from there.

Thomas 'PointedEars' Lahn

7/5/2015 11:11:00 PM

0

Christoph M. Becker wrote:

> Michael Haufe (TNO) wrote:
>> On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
>>> [â?¦]
>>> I found this JSGL http:.... Is that a good one? I like it, but is
>>> what js programmers normally use? Looks simple for me, but do you people
>>> recommend it? I would like to have a simple to use library as well. This
>>> one seems like that, but is its quality good enough? thanks
>>>
>>> I did a small js graphics test (a card folllowing mouse), and seems to
>>> me that the graphics is quite fast and good enough.
>>
>> My first suggestion is to learn the standard CANVAS API before looking at
>> a library:
>>
>> <https://developer.mozilla.org/en-US/docs/Web/API/Canv...

Different to the SVG DOM, the Canvas *API* (everything that builds on the
return value of the getContext() method) is _not_ (yet) part of a Web
standard. Only the â??canvasâ? element and corresponding interface is, in W3C
HTML5 (and not the referred pseudo-standard of WHATWG HTML).

<http://www.w3.org/TR/2011/REC-SVG11-20110816/svgdo...
<http://www.w3.org/TR/2014/REC-html5-20141028/scripting-1.html#the-canvas-e...

>> After that, if you are unwilling and/or unable to build a library for
>> your specific needs, let's go from there.
>
> ACK.
>
> However, SVG may be an interesting alternative:
> <https://developer.mozilla.org/en/docs/W....

AIUI, JSGL uses either SVG or VML, whichever is supported first (VML would
be used for IE/MSHTML < 9 only, which do not support SVG). Therefore, the
observed graphics speed and quality must be attributed to the layout engines
of the used Web browser, not the script library. You can have the same
result without the library.

Obviously, the OP has not read the FAQ and has not understood the difference
between a programming language like C++, and its libraries, and a scripting
language like JavaScript: â??A scripting language is a programming language
that is used to manipulate, customise, and automate the facilities *of an
existing system*.� (from the ECMAScript Language Specification; emphasis by
me)

However, without having a look at the underlying code, I already see two
problems with it: the code has been last updated three years ago, which may
indicate that it is no longer maintained, and certainly it cannot consider
the recent browser developments; and then, as you indicated, if you are
using SVG, what do you need a client-side script library for? Just use SVG
as it is, generate it server-side, and manipulate it with plain
ECMAScript+SVG DOM, if necessary.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Erwin Moller

7/6/2015 12:52:00 PM

0

On 7/6/2015 12:01 AM, JiiPee wrote:
> On 05/07/2015 19:29, Michael Haufe (TNO) wrote:
>> On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
>>> the graphics is quite fast and good enough.
>> My first suggestion is to learn the standard CANVAS API before looking
>> at a library:
>>
>> <https://developer.mozilla.org/en-US/docs/Web/API/Canv...
>
> thanks, looks like a serious option. looks like pretty simple

That is what I thought until I wrecked my brain over the transformation
matrix and the things I was trying to accomplish with it.
;-)

But if you are better with (matrix) math than me, that shouldn't pose a
big problem.

Good luck!

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens

danca

7/6/2015 1:03:00 PM

0

Il 07/05/2015 03:00 PM, JiiPee ha scritto:
> Thanks for the first advices. Good to have this kind of forum to get
> directions.
>
> I have a C++ background and know about graphics programming. Now want to
> learn to do graphics with js. What are your opinions about the best
> graphics library for general drawing? Like moving sprites, drawing
> lines, curves, bitmaps and other basics. Am not really into special
> effects so much or 3D ... more like 2D and all the basics there.
>
> I found this JSGL http:.... Is that a good one? I like it, but is
> what js programmers normally use? Looks simple for me, but do you people
> recommend it? I would like to have a simple to use library as well. This
> one seems like that, but is its quality good enough? thanks
>
> I did a small js graphics test (a card folllowing mouse), and seems to
> me that the graphics is quite fast and good enough.

Time ago I tried a library called Raphael or something similar. It was
an impressive vector graphic library.
I think it deserves to be named.

--
"People should pay taxes with a smile"
I tried, but they want money.

Erwin Moller

7/6/2015 2:33:00 PM

0

On 7/5/2015 3:00 PM, JiiPee wrote:
> Thanks for the first advices. Good to have this kind of forum to get
> directions.
>
> I have a C++ background and know about graphics programming. Now want to
> learn to do graphics with js. What are your opinions about the best
> graphics library for general drawing? Like moving sprites, drawing
> lines, curves, bitmaps and other basics. Am not really into special
> effects so much or 3D ... more like 2D and all the basics there.
>
> I found this JSGL http:.... Is that a good one? I like it, but is
> what js programmers normally use? Looks simple for me, but do you people
> recommend it? I would like to have a simple to use library as well. This
> one seems like that, but is its quality good enough? thanks
>
> I did a small js graphics test (a card folllowing mouse), and seems to
> me that the graphics is quite fast and good enough.


The following link might give you a few leads to different packages
assisting in (canvas)graphics.


http://stackoverflow.com/questions/8938969/current-state-of-javascript-canvas...

Be sure to read Kangax response (he is the author of Fabric.js)

Regards,
Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens

John J. Hughes II

7/6/2015 8:04:00 PM

0

On 06/07/2015 13:52, Erwin Moller wrote:
> On 7/6/2015 12:01 AM, JiiPee wrote:
>> On 05/07/2015 19:29, Michael Haufe (TNO) wrote:
>>> On Sunday, July 5, 2015 at 8:00:45 AM UTC-5, JiiPee wrote:
>>>> the graphics is quite fast and good enough.
>>> My first suggestion is to learn the standard CANVAS API before looking
>>> at a library:
>>>
>>> <https://developer.mozilla.org/en-US/docs/Web/API/Canv...
>>
>> thanks, looks like a serious option. looks like pretty simple
>
> That is what I thought until I wrecked my brain over the
> transformation matrix and the things I was trying to accomplish with it.
> ;-)
>
> But if you are better with (matrix) math than me, that shouldn't pose
> a big problem.

I am a mathematician :) - read matrixes in an university. but would need
to update memory by reading a math book a bit to know details. ye i know
matrix calculations are in these libaries and that is good/ok.

>
> Good luck!
>
> Regards,
> Erwin Moller
>
>