Digital Space Commons: Welcome to Meet2D
    DigitalSpace.com
 · 
Talkspace.com
 · 
 · 
MeetingPage.com
 · 
Meet2d.com
 · 
Meet3d.com
 

Meet2D Java Thin Client Edition

Exposed methods for Oworld & Meet3D

The Meet3D Applet and Oworld kernel is designed to support Javascript and other direct invokations of exposed methods at the client side. The following is the current list of exposed methods. Examples will follow.

Newer Methods

New Applet Exposed Methods for JavaScript: controls processing of text logs
(basic question here: is JavaScript efficient enough to do this kind of string processing for the applet?)

document.applets.oworld.logControl("commence") an exposed method that could be accessed by JS to request Oworld to "commence", "pause" and "complete" recording to a given log file of ID defined in the above parameters (logControl is used for run-time UI-based control of log recording rather than the automatic startup logging of setModeLog). When the method is called to pause recording in Oworld, strings are no longer passed out the to the method processLogText and the method onLogPause is called. When this method is called to complete logging, Oworld will call method onLogCompletion and close the file on the server.

b) another exposed method "onLogCommence" that is called once by Oworld, when a Log process of a given ID is "commenced". This method has a chance to get a string back from the JS attached to the method. That string could be anything, including the date/time of the log (for a simple text log) right up to good old HTML header tags to format the log file. Note that if the parameter setAccessLog is set to "append" then a parameter to this effect is passed out through this method. This allows onLogCommence to create a "middle of the file" formatting rather than expecting the file to be at the top.

c) another exposed method "onLogPause" that is called once, when a Log process of a given ID is "paused". This method also has a chance to get a string back from the JS attached to the method. That string could be anything, including a note to write to the log saying "logging paused at [time]" or good old HTML footer tags to record the pausing in an HTML-formatted log file.

d) another exposed method "onLogComplete" that is called once, when a Log process of a given ID is "completed". This method also has a chance to get a string back from the JS attached to the method. That string could be anything, including good old HTML footer tags to complete an HTML formatted log. Note that if the parameter setAccessLog is set to "append" then a parameter to this effect is passed out through this method. This allows onLogCommence to create a "middle of the file" formatting rather than expecting the file to be at the bottom (and to terminate the file). onLogComplete is called on applet closure to permit shutting down of log files. Log files should be closed by the applet after writing this last string.

e) yet another an exposed method "processLogText" that, when logging is in a "commenced" state, Oworld will then be directed to export each line of text entered into the chat buffer out to running Javascript attached to processLogText. Along with the text, the ID of the log file is passed to allow the JS to switch to different processing for the text. If more than one log of unique IDs are defined and "commenced" then the JS could be called twice, with the same text for each ID (or both IDs passed to the JS via the method). This JS could then be free to process the given text with its own logic and pass it back to Oworld, along with the log ID. In this manner we give a JS "logger bot" the ability to process and possibly filter out or format (by inserting HTML tags) any entered chat. If the JS passes the string back in it is written to the log file of the given defined ID. The JS might not pass this string back at all, in which case it is not written to the log (allowing filtering of meeting logs, so that, say, only a certain citizen's text is actually saved. This all allows the website designer to have control over how the logs look, using basic primitives and the power of JavaScript. Note that all text written to logs is assumed to have a carriage return and linefeed at the end of each returned text string. Also, text passed by Oworld to processLogText will contain user names, entered text gestures and anything else that appears to the user in the chatpanel. Welcome messages and any bot or system message will also be sent to processLogText.

Example:

function commence() {
document.applets.oworld.logControl("commence");
}

function endchat() {
document.applets.oworld.logControl("complete");
}

function pause() {
document.applets.oworld.logControl("pause");
}

function resume() {
document.applets.oworld.logControl("resume");

</TD></TR><TR><TD>
<input type="button" value="Whisper" onclick="whisper()">
<input type="button" value="Everyone" onclick="everyone()">
<TABLE BORDER=1><TR><TH COLSPAN=4>Chat Controls</TH></TR><TR>
<TD><input type="button" value="Start" onclick="commence()"></TD>
<TD><input type="button" value="Pause" onclick="pause()"></TD>
<TD><input type="button" value="Resume" onclick="resume()"></TD>
<TD><input type="button" value="Complete" onclick="endchat()"></TD>
</TR></TABLE>

JavaScript calls into OWorld Applets - Available Methods (so far):

To move camera forward by speed amount:
document.applets.oworld.goForward(var speed)

To move camera back by speed amount:
document.applets.oworld.goBack(var speed)

To turn camera left by speed amount:
document.applets.oworld.turnLeft(var speed)

To turn camera right by speed amount:
document.applets.oworld.turnRight(var speed)

To slide camera left by speed amount:
document.applets.oworld.slideLeft(var speed)

To slide camera right by speed amount:
document.applets.oworld.slideRight(var speed)

To move camera up by speed amount:
document.applets.oworld.goFloat(var speed)

To move camera down by speed amount:
document.applets.oworld.goSink(var speed)

To turn camera up by one degree:
document.applets.oworld.lookUp()

To turn camera down by one degree:
document.applets.oworld.lookDown()

To reset camera to look parallel to horizon:
document.applets.oworld.straighten()

To stop moving the camera:
document.applets.oworld.stopMove()

To cycle to the next viewpoint:
document.applets.oworld.nextViewpoint()

To add text to the chat output area:
document.applets.oworld.addToChat(String str);

To toggle Avatar camera offset:
document.applets.oworld.setVP(var see_me)

To turn collision on or off:
document.applets.oworld.setCollision(var collide)

To start/hold the wave gesture:
document.applets.oworld.waveGesture()

To stop the wave gesture:
document.applets.oworld.endGesture()

To ask if the archive has finished downloading:
document.applets.oworld.isInitializing();

To ask if the world is done loading:
document.applets.oworld.isLoading();

To get the Meet3D build number and date:
document.applets.oworld.getVersion();

To get the current loaded world name:
document.JSForm.worldName.value=worldName;

To get the filename of the loaded world:
document.JSForm.worldFile.value=worldFile;

To get the number of avatars currently in the world:
document.applets.oworld.getNumInWorld();

To get the name of the current user:
document.applets.oworld.getUserName();

To get the stock avatar name of the user's avatar:
document.applets.oworld.getUserAvatar();

To get the current world coordinates of the camera:
document.applets.oworld.getCoordinates();

To get the current camera viewing angle around the Y axis:
document.applets.oworld.getHeading();

To get the current camera avatar offset name:
document.applets.oworld.getPOV();

 Back to Support Index


  (cc) 1995-2003 The Digital Space Commons, some rights reserved (see our notice). Send site comments to our webmaster.