more powerful and didactic. This enables web pages
to display interactive 2D and 3D content as well as
other advanced capabilities such as immersive audio
and video, thus improving the user’s experience. A
brief description of the most commonly used tech-
nologies has been exposed in (Martnez-Dur, 2009).
For this purposes, Adobe Flash is an excellent
option since it’s a popular standard for rich inter-
net content (www.adobe.com) powered by the Ac-
tionScript scripting language (www.actionscript.org).
Flash files (.swf), also known as Flash movies,
run on a virtual machine that displays animations
and executes ActionScript code. This virtual ma-
chine, also called Flash Player, can be embedded
into a web page as a browser plugin. Adobe Flex
(www.adobe.com/products/flex) is a framework built
on top of the Flash API consisting of an XML-based
language and a set of libraries for building Flash-
based RIAs very quickly. In summary, it’s a really
well-suited development tool for building rich GUIs
and 2D content that runs on almost every browser.
Last versions of the Flash API allow raster op-
erations on 2D polygons, which has been the start-
ing point for emerging Flash-based 3D rendering en-
gines, like PaperVision (www.papervision3d.org) or
Away3D (away3d.com). However, Flash-based 3D
rendering engines can’t take full advantage of the
hardware graphics pipeline due to the lack of support
in the Flash API. That leads to the implementation of
most ”‘hardware”’ tasks in ActionScript, which is a
slow language for the extremely heavy load that these
calculations represent.
In order to find a technology capable of supporting
a real-time 3D interactive environment, the main re-
quirements was the ability of handling a scene graph
and OpenGL or DirectX graphics. This way, we have
found several alternatives to take into consideration.
Firstly, Java allows to build web-based simula-
tion applications. Hardware-accelerated 3D graph-
ics in Java are possible through native bind-
ings like jOGL (jogl.dev.java.net) or jMonkey
(www.jmonkeyengine.com), that export operating
system-dependent APIs such as the OpenGL imple-
mentation to the language.
Other alternative developed by Google is
O3D (code.google.com/apis/o3d), an open-source
JavaScript API for creating interactive 3D graphics
applications that run within a browser window, such
as games or virtual worlds. It uses OpenGL or
DirectX through scene graph data structures and API.
Another interesting possibility is OSG4Web
(Calori et al., 2009) (Pescarin et al., 2005), wich
provides an open-source framework for in-browser
OpenGL-based application wrapping. The frame-
work allows the development of OpenGL and Open-
SceneGraph (www.openscenegraph.org) based appli-
cations, that open windows within the browser, allow-
ing bidirectional interaction with page elements via
JavaScript. OSG4Web decouples the application code
from the rendering engine, therefore the same plu-
gin can run totally different applications, also called
cores. Cores are dynamic OS libraries that are loaded
and linked in run-time, making it very efficient but
absolutely dependent on the operating system.
3 ARCHITECTURE
The architecture that is presented in this paper sup-
ports both 2D and 3D contents. 2D graphics are used
to display interactive menus, interface controls and
theoretical content, while 3D graphics provide qual-
ity practice exercises. Our requirements for the 2D
part have been to make an usable, easy and intuitive
interface by means of clear and simple buttons and or-
ganized layouts without sacrificing compatibility. The
Adobe Flex IDE, based on Eclipse, provides an easy
way of designing layout-based GUIs with a visual ed-
itor. It also incorporates all the capabilities and versa-
tility of Flash and ActionScript. Due to this features,
the choice has been to use this tool for all the 2D-
related parts.
Regarding 3D content, the main goal has been to
display fast and neat graphics that supported the for-
mative goal of every e-Learning application. Unfortu-
nately, as mentioned before, Flash can’t provide qual-
ity 3D graphics at this moment. That implied two
main aspects: it would be necessary to choose a sep-
arate platform for rendering only the 3D part, and it
would be needed some kind of integration between
Flash and the former. Thus, OSG4Web has been the
choice for that task due to its high speed OpenScene-
Graph (OSG) infrastructure. It allows quick porting
of existing OSG applications. The fact that the plugin
implements JavaScript bidirectional communication,
as it does Flash, allows a JavaScript-based integration.
Thus, the architecture is composed of four basic
blocks (Figure 1):
• HTML Container. Instantiates both browser plu-
gins. Contains the JavaScript bridge and some
other handy code to manage on-screen elements.
• Flash Plugin. Displays 2D contents and incorpo-
rates the application logic.
• JavaScript Bridge. Supports the communication
between Flash and OSG4Web.
• OSG4Web Plugin. Displays 3D contents, and in-
corporates the 3D scene graph management code
CSEDU 2010 - 2nd International Conference on Computer Supported Education
308