World Wind Forums

Go Back   World Wind Forums > Community > WorldWind General

WorldWind General General WorldWind discussions.
Note: This is not a technical support forum. It is for World Wind topics that don't fit into other categories.

Reply
 
Thread Tools Display Modes
Old 02-08-2010, 02:01 PM   #1
fintler
I3 Developer
 
Join Date: Nov 2008
Location: Philadelphia, PA
Posts: 7
Default WorldWind JavaSCRIPT

It's still a *long*, *long* way off from even having basic functionality.

However, I've started a project to get WWJ ported to JavaScript and WebGL.

My current goal is to create a solid, well tested and documented geometry library based on WWJ geoms. I'll worry about the rest later. Just porting the geometries is difficult enough.

I really only have time to work on this during the weekend as it's just a personal project. You can view the current progress (there's not much) at:

http://code.google.com/p/lanyard/sou...trunk/src/geom

It's currently using jsunit, jsdoc, and the closure compiler all held together with a simple ant build script.

If you'd like to contribute, I'm looking for code that matches the style of the following object:

http://code.google.com/p/lanyard/sou.../geom/Angle.js

Also, unit testers are appreciated.

P.S. "lanyard" is just a code name I picked. I really have no idea what the final product name is going to be.
fintler is offline   Reply With Quote
Old 02-08-2010, 02:35 PM   #2
nlneilson
Super Member
 
Join Date: Nov 2006
Location: 35.0376,-117.9688
Posts: 1,519
Default

Why do you want to use JavaScript, do you see ANY advantage over Java???

If you want to do something constructive you should consider C++.
http://forum.worldwindcentral.com/sh...ad.php?t=24093

I tried using Excelsior Jet trial for an .exe. AOT compiled and it seems faster and smoother.

With a C++ port of WWJ I think there would be more interest.
nlneilson is offline   Reply With Quote
Old 02-08-2010, 05:22 PM   #3
fintler
I3 Developer
 
Join Date: Nov 2008
Location: Philadelphia, PA
Posts: 7
Default

Quote:
Originally Posted by nlneilson View Post
Why do you want to use JavaScript, do you see ANY advantage over Java???
Of course I do, or I wouldn't be making the attempt.

Java is good for some things, JavaScript is good for others, they're both pretty nice languages. However, I think it would be really cool to have the ability to manipulate a map that is integrated into the DOM. Imagine using CSS to style placemarks, or the ability to reference surfaceshapes by document.getElementById().

Also, I want a reason to learn the closure compiler and related libraries. It's a really neat library that google recently released. (http://code.google.com/closure/)

Quote:
Originally Posted by nlneilson View Post
If you want to do something constructive you should consider C++.
http://forum.worldwindcentral.com/sh...ad.php?t=24093

I tried using Excelsior Jet trial for an .exe. AOT compiled and it seems faster and smoother.

With a C++ port of WWJ I think there would be more interest.
I'm not really sure what you mean by constructive. I can think of many uses for a nice 3d JavaScript based map (just think of all of the sites that have embedded google maps for various purposes) Other than speed, I really don't see much purpose for a C++ map over the current .Net and Java versions.
fintler is offline   Reply With Quote
Old 02-09-2010, 04:09 AM   #4
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
Default

Have you considered using WWJ as an applet with a javascript API?
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 02-09-2010, 02:09 PM   #5
fintler
I3 Developer
 
Join Date: Nov 2008
Location: Philadelphia, PA
Posts: 7
Default

Quote:
Originally Posted by patmurris View Post
Have you considered using WWJ as an applet with a javascript API?
Hey Pat,

I actually use the (very nice) wwj applet at my day job. We have it integrated into a webapp with a ton of custom liveconnect-based APIs setup.

I haven't considered using wwj as an applet for this personal project, because porting the map *is* the project. I'm just doing this for fun to see if it leads anywhere.
fintler is offline   Reply With Quote
Old 02-09-2010, 05:19 PM   #6
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
Default

I wasn't aware you could do 3D with javascript... Any pointer to examples?

How about building a 3D extension to Open Layers?
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 02-10-2010, 05:09 PM   #7
fintler
I3 Developer
 
Join Date: Nov 2008
Location: Philadelphia, PA
Posts: 7
Default

Quote:
Originally Posted by patmurris View Post
I wasn't aware you could do 3D with javascript... Any pointer to examples?

How about building a 3D extension to Open Layers?
Hey Pat,

This might be a good place to start: http://learningwebgl.com/

It's a tutorial series based on the classic NeHe articles. It'll walk you through how to setup your shaders (GLSL based) and buffers. It'll also point you towards what browsers to use (Currently only nightly builds of Firefox work).

WebGL is based on the OpenGL ES 2 spec for the most part, except for a few odd things.

You can view a few examples at: http://khronos.org/webgl/wiki/Demo_Repository

Make sure you take a look at the "shiny-teapot" demo. It's pretty sweet.

A 3d extension to openlayers might be something to look into, I need to read up on that.
fintler is offline   Reply With Quote
Old 02-11-2010, 01:27 AM   #8
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
Default

Quote:
Originally Posted by fintler View Post
If you'd like to contribute, I'm looking for code that matches the style of the following object:

http://code.google.com/p/lanyard/sou.../geom/Angle.js
Looking at that code, i'm wondering whether there would be a way (or a tool) to automate the port from Java to JS?
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 02-23-2010, 02:17 PM   #9
fintler
I3 Developer
 
Join Date: Nov 2008
Location: Philadelphia, PA
Posts: 7
Default

Quote:
Originally Posted by patmurris View Post
Looking at that code, i'm wondering whether there would be a way (or a tool) to automate the port from Java to JS?
I looked into this a while back while I was still trying to figure out how to build out the class structure. I couldn't find anything useful. There is an uncanny similarity between the two. Maybe once Javascript becomes a bit more mature in regards to larger designs a project will pop up to ease porting from Java.

For now, I don't mind going line by line. It's helping me brush up on my linear algebra.

On a side note, I just moved things from google code to github...

git@github.com:fintler/lanyard.git
fintler is offline   Reply With Quote
Reply

Tags
javascript, webgl


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Does Worldwind auto-render? gadmyth Development Help 4 11-23-2009 04:53 PM
Reg compiling the source code Raj Developers' Corner 10 08-26-2008 06:58 PM
Dependency injection instead of static singleton WorldWind stolsvik Feature Discussion 19 08-06-2007 02:57 PM
WorldWind Compiling Guide Without Visual Studio rnielsen Developers' Corner 28 12-09-2006 08:33 PM
Newbies guide to worldwind Llynix WorldWind General 14 12-25-2004 02:55 PM


All times are GMT +1. The time now is 10:42 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.