contents.gifindex.gif

pueblo00000000.gif event

This is an <img> field attribute which modifies commands that are automatically sent from Pueblo to the world. The format to turn on these commands is as follows:

<img event="name" [params="parameters"] [optional parameters]>

In this case, name is the name of the event as described below. params is used to indicate the parameters that will be sent with the automatic command and the order in which they should be sent. In addition, individual commands may have additional parameters associated with them. (These are described below.)

An automatic command for a specific event may be turned off using the following syntax:

<img event="name" xch_cmd="">

MOVE event

This event instructs the VRML viewer to notify the MUD server when the viewpoint is moved. This is usually caused by the user navigating through the scene. Notification consists of the PUEBLOMOVE command being sent to the MUD, followed by the parameters specified in the params attribute. Except for xch_cmd, omitting an optional field leaves that setting unchanged. Loading a new VRML scene resets all values to their scene defaults, which are specified in the table below.

<img event="move"

[xch_minTime=nnn]

[xch_maxTime=nnn]

[xch_maxMove=nnn.nn]

[xch_startTime=nnn]

[xch_maxRotation=nnn]

[xch_cmd=""]

[params="[position] [look] [up] [time] [orientation]">

where the optional fields and their default settings are as follows:

xch_cmd
If the value of this attribute is an empty string (“”), this turns notification off. If xch_cmd is omitted, this command will cause the notification command PUEBLOMOVE to be sent to the server. By default, scene notification is off. Non-empty string values are not supported.
xch_minTime
The minimum interval for notification. Default scene setting is 1000 milliseconds.
xch_maxTime
The maximum notification interval. Notification will be sent this often even if no movement has occurred. Default scene setting is 10000 milliseconds.
xch_maxMove
The movement distance which will trigger a notification. Default scene setting is 0.5 meters.
xch_startTime
The base time for notification. The notification clock is set to this value upon receipt. Default scene setting is 0.
xch_maxRotation
The movement rotation which will trigger a notification, in radians. Default scene setting is 1/12 radian or 15 degrees.
params
Specifies what arguments to pass in the PUEBLOMOVE command, and their order. The default scene setting is “position”. Note that the order specified is the order in which the notification arguments will be emitted. A blank string (i.e., params=“”) causes just the PUEBLOMOVE command with no arguments.


The notification fields specified in the params field are as follows:

position
Current x,y,z position, as “float float float”.
look
Current camera look direction, as “float float float”.
up
Current camera up direction, as “float float float”.
time
is the milliseconds since startTime as “long”.
orientation
Current camera orientation, as “float float float float”; the camera orientation axis and rotation angle.


Note

pueblo00000026.gif
All distance units are in meters.
pueblo00000026.gif
All angles are in radians.
pueblo00000026.gif
All times are in milliseconds.
pueblo00000026.gif
Velocities are in meters per second or radians per second, as appropriate.


Examples

Either of the following HTML commands turns on default notification:

<img xch_event="move">

<img xch_event="move" params="position">

After any of these, if the viewpoint is at the VRML default location of (0, 0, 1), the MUD server will receive this default notification every 10 seconds.

PUEBLOMOVE 0.000 0.000 1.000

The following HTML sequence turns off notification:

<img xch_event="move" xch_cmd="">