Javascript api

Discussion about everything. New games, 3d math, development tips...
Post Reply
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Javascript api

Post by MikeR »

Does anyone know of a good javascript api that can be integrated with Irrlicht?
I've been searching the forum and haven't found anything.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

Irrlicht isn't an ActiveX component, so I doubt it can easily be integrated with javascript. WildTangent offers such capabilities though...
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Hmm, ok. Then I guess to add interactivity to Irrlicht one would have to make xml files instead of javascript?
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

Or any scripting in general...LUA comes in mind...
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Thanks. I'll check it out.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

A Javascript binding wouldn't be that much more or less trouble than any other high level binding, really. Assuming that's what you want...

If you wanted to use Microsoft's JScript, you could wrap the parts of Irrlicht you're interested in with a COM interface, which would also let you use it with about a zillion other ActiveScript scripting languages (VBScript, Perl and TCL to name three) or any language that can use COM/Automation (VB and Delphi to name two).

Or you could use the Javascript engine that's part of Mozilla (known as the Spidermonkey engine -- google that), which would be more similar to doing a Lua binding.

Or you could probably use Irrlicht's .Net binding with Microsoft JScript.Net (possibly requiring writing some additional glue), which would probably be the easiest.


If you just wanted to have some scriptability in your app using Javascript, you could use any of those too. Personally, I'd favor JScript (the ActiveScript one) as I prefer automatic reference counting to scanning GC which the other two use.
XargoL
Posts: 22
Joined: Sun Aug 01, 2004 7:55 pm

Post by XargoL »

I've recently done some simple stuff using the Mozilla SpiderMonkey engine (available at: http://www.mozilla.org/js/spidermonkey/):

Image
Guest

Post by Guest »

care to make a simple tutorial on how to set it up? :D
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

XargoL wrote:I've recently done some simple stuff using the Mozilla SpiderMonkey engine (available at: http://www.mozilla.org/js/spidermonkey/):
Hey, I like the Applesoft BASIC style prompt. ;)


To clarify what I said about doing it with JScript.Net probably being the easiest... this is because the .Net binding for Irrlicht is already maintained by Niko. In theory you'd only have to tweak/extend it, and it'd probably be a lot easier to keep current than if you were doing your own binding.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Interesting stuff here. I looked at spidermonkey yesterday. I found it impressive.

My only problem with using jscript with .net as a binding, is that it's windows only. (the .net framework) and I'm looking for more cross platform application. I like Irrlicht enough to learn C++ so that I can use it. I do plan on starting out windows only, but have a mac port in mind for a future date, so want to stick to things that are already ported, or are in the process.
Thankyou all for your replies. They've been quite helpful.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Post Reply