| apple 2004-09-01, 12:17 pm |
| Hi all,
i am searching resources to implement a multi-user world with java
component and vrml, and have find an example as below:
Separator {
DEF bar BoxProximitySensor { } # To detect our own position
DEF foo Separator { } # Avatars are added here
}
DEF baz Script {
eventIn SFVec3f position
eventIn SFRotation orientation
field SFNode avatarRoot IS foo
behavior "http://xyz.com/mynetworkprotocol.java"
}
ROUTE bar.position -> baz.position
ROUTE bar.orientation -> baz.orientation
---------------------------------------------------------
class MyNetworkProtocol extends VRMLApplet implements Runnable {
void start() {
# spawn thread to monitor network
}
void eventIn(Event e) {
# send position and orientation events to server
}
void run {
# monitors network,
# on receipt of appropriate events from network calls
# sends add, delete, change events to avatarRoot.
}
}
from the example, the avatar add in vrml,if i create a box in java using
createvrmlfromstring,starting animations simultaneously and detect its
position in multiuser world, then how...
can anybody give an useful links about how to do that?
thanks..
|