VRML Beans Proposal

Dmitri Kondratiev
[email protected]

Created : 2/5/97
Last Modified : 2/13/97
Location : http://aldan.paragraph.com/VrmlBeans/vrmlbean.htm

Abstract

In this document I am trying to evaluate how the advantages of Java Beans architecture can be used in VRML2.0 builder tools. The goal is to create reusable VRML components with behavior which properties can be easily manipulated and customized in VRML2.0 builder tools. These reusable 3D components I call "VRML Beans", don't know if somebody has already used this term. I am working on the prototype now for JDK1.02 using Liquid Reality Toolkit from DimensionX, which is the best implementation of VRML/Java package I know about.

I plan to publish on net all VRML Beans prototype sources and architecture documentation soon. Next in this message goes some very preliminary outline of VRML Beans, in fact some ideas I would be very much interested to get any comments on from everybody interested in the VRML Beans idea.

Goals that VRML Beans address

VRML bean is a 3D object with well defined visual properties and behaviors. The main idea behind VRML bean architecture is to provide for reusable VRML components that can be manipulated visually in a builder tool. Such tools should allow create Java applets/applications with VRML-based GUI from VRML bean components.

VRML Bean architecture and design

VRML bean framework is based on Java Beans - Sun software component model for Java. VRML bean should contain all necessary tools to modify its 3D appearance and behavior visually. This requirement is essential for VRML bean architecture. To make visual operation possible, VRML bean provides user with bean's own VRML-based 3D GUI. This GUI presents to the user standard VRML2.0 scene, as VRML browser does. Scene consists of VRML nodes which appearance and behavior can be customized by the user in the builder tool. To customize VRML bean user performes actions on scene nodes by clicking, dragging or passing over them. The results of user modifications are immediately shown in the scene. User can navigate the scene the same way as in VRML browser, which allows to see the modified bean appearance and behavior right away, without any recompilation or VRML file reloading.

VRML events : sources, listeners and state objects

All scene customization is done by VRML2.0 script node. Along with visual modification/editing of the GUI scene, VRML bean provides general mechanism that makes it a VRML Event Source for other Java beans. Any bean can register as a listener for VRML events with VRML Bean. This allows, for example, to display the changes of VRML node position values while user drags the node across the scene, in a dialog window, that some other bean creates.

To register for VRML Events, listener should provide distinct interfaces derived from VRMLEventListener interface for each VRMLEvent type. VRMLEventListener in turn inherits from java.util.EventListener.

VRMLEvent class contains as a member vrml.Event class, dfined in VRML2.0 Java Scripting Reference and provides the same access methods that vrml.Event does :

Persistent storage

VRML Bean internal state is defined by VRML node field values and event routing information that VRML file contains. To store its state VRML Bean can use different schemes : Future versions of Java Bean API will provide an "externalization" stream mechanism which VRML Bean may use as a uniform way to store its state.

Packaging

VRML Beans are stored in JAR files. Each VRML Bean JAR file includes the following entries :
  1. A set of classes to provide behavior and customization algorithm for the VRML Bean. These entries will include Script node classes and interface adaptor classes. E.g. "foo/bah/MyCustomizerScript.class".
  2. VRML template file with 3D scene (GUI) bean provides.

Multi-user VRML Beans

I think that discussing examples of VRML Beans may help to evaluate their use in different applications. Next I try to give some examples illustrating the use of VRML Beans in VRML worlds using Living Worlds API for multi-user communications.

Providing VRML Beans the ability to communicate with distributed worlds on the net by means of multi-user API, such as Living Worlds, gives the following possibilities :

These features make Multi-user VRML Beans a really "live" reusable component.

Example

1) User buys some VRML Bean components from Advanced VRML Component Store. He gets a floppy containing beans in JAR file. This includes ParaGraph NetWriter white board and "WebTV Set" component.

User can install NetWriter white board in his virtual living room to communicate with others in handwritten messages and drawings on the net. NetWriter board is VRML Bean which appearance (size, orientation in the room) and drawing properties (pallet, drawing style) user can customize. Having NetWriter board "installed" in virtual room user can start communicating with server that provides NetWriter service.

To communicate with server NetWriter VRML Bean uses the central concept of "SharedObjects" that Living Worlds API is built on. NetWriter board is an object which state is shared among users on the net.

WebTV Set vrml bean is a virtual programmable WEB television set, ready to use in user virtual living room. From user point of view WebTV Set consists of TV screen and control panel vrml models allowing to view and tune WebTV channels. User can assign numbers to the channel buttons on the panel or attach cool 3D pictograms to them. Having this WebTV Set installed and tuned , user gets the latest Web news on his favorite channels.

To communicate with the server that provides these channels, WebTV VRML Bean may use Living Worlds Information Exchange API. In this example the following types of information exchange would be used :

2) To utilize the new NetWriter and WebTV Set components user needs to add them to his virtual living room environment. This can be done "manually" by user or by means of VRML Bean Builder, which doesn't exist yet.

Multi-user VRML Bean properties

Before explaining how VRML Beans can be added to user virtual living room, we need to examine properties of these beans. NetWriter and WebTV beans exhibit both local and multi-user shared properties :

NetWriter and WebTV Set vrml beans are contained in JAR files with the same basic components differing only by bean content. It is important to understand that VRML Beans may also contain other beans, such as those providing 2D GUI used to convey user selections to classes actually performing customization.

So, for example, NetWriter white board VRML Bean will include :

WebTV VRML Bean may include :

Design-time script classes

These classes address the following goals :

Run-time script classes, MUTech classes

These classes perform actual VRML Bean behavior when user communicates with the world by means of Java-enabled browser.

Adding beans to virtual environment

Hosted by www.Geocities.ws

1