!!! WANTED: VRML 1.0 Objects and Environments for Multi-User Voice Chat Server 
Author Message
 !!! WANTED: VRML 1.0 Objects and Environments for Multi-User Voice Chat Server

Hi Everybody,

Yes, I realize vrml 1.0 is passe', but these are for a Multi-User
VRML Voice Chat server called OzGate. You can download the app at
http://www.*-*-*.com/ Go to the Sitemap to enter after rebooting.

I have been running OzGate for three years now, and it is a living
community for many of us to make friends globally. Please seriously
consider submitting some of your old artwork to our community.

If you have any questions at all, feel free to ask here or write me.

My eternal thanks to all those whose models or spaces make the cut.

Brian Thomasson a.k.a. -=Oz=- of OzGate



Thu, 02 Oct 2003 01:53:37 GMT  
 !!! WANTED: VRML 1.0 Objects and Environments for Multi-User Voice Chat Server
hello,
I have written a small javaScript-function to add a node to a scene from a
html page:

function loadObject(){
var i=0;
var id= "t0s"+i;
var st_cross = "[ -1 -1,-1 1 ]"
var st_spine= "[ 0 0 -1, 0 0 -0.9736.... 0 0 0.9736, 0 0 1 ] "
var st_scale= "[ 1e-020 1e-010, ... 0.2291,1e-020 1e-010 ] "
var st_orient = "[ 0 0 1 0 ]"
document.browser.createNodeFromString(
"DEF "+id+"_all Transform {children "+
"DEF "+id+"_sw Switch {whichChoice 0 choice "+
"DEF "+id+"_tr Transform {children [ "+
"DEF "+id+"_ob Transform {children Shape {appearance "+
"DEF "+id+"_app Appearance {material "+
"DEF "+id+"_mat Material {}}geometry "+
"DEF "+id+"_ext Extrusion { "+
"crossSection "+st_cross+" "+
"spine "+st_spine+" "+
"scale "+st_scale+" "+
"orientation"+st_orient +" "+
"beginCap FALSE "+
"endCap FALSE "+
"solid FALSE "+
"creaseAngle 0}}} " +
"DEF "+id+"_ts TouchSensor {} "+
"DEF "+id+"_vp Viewpoint { position 0 0 0 description "+id+"_vp}]}}}"
);
var root = document.browser.getNodeByName('prim');
root.addChildren(id+'_all');

Quote:
}

browser is the applets name and prim the name of an empty group node
but all I get is an unknown error in IE 5.0 and mozilla 0.8.1

if I write
document.browser.setScene(document.browser.createNodeFromString("DEF "+id+"_
....))
instead the object shows up....but I want to add these nodes dynamically.
I have also tried
to use a second function with it:
function setObject()
{
var newnode = document.browser.getNodeByName(id+'_all');
document.browser.getScene().addChildren(newnode);

Quote:
}

without result

what am I doing wrong?

greetings
m



Thu, 02 Oct 2003 02:34:45 GMT  
 !!! WANTED: VRML 1.0 Objects and Environments for Multi-User Voice Chat Server
Sorry for posting in wrong thread, I am bit nervous...

hello,
I have written a small javaScript-function to add a node to a scene from a
html page:

function loadObject(){
var i=0;
var id= "t0s"+i;
var st_cross = "[ -1 -1,-1 1 ]"
var st_spine= "[ 0 0 -1, 0 0 -0.9736.... 0 0 0.9736, 0 0 1 ] "
var st_scale= "[ 1e-020 1e-010, ... 0.2291,1e-020 1e-010 ] "
var st_orient = "[ 0 0 1 0 ]"
document.browser.createNodeFromString(
"DEF "+id+"_all Transform {children "+
"DEF "+id+"_sw Switch {whichChoice 0 choice "+
"DEF "+id+"_tr Transform {children [ "+
"DEF "+id+"_ob Transform {children Shape {appearance "+
"DEF "+id+"_app Appearance {material "+
"DEF "+id+"_mat Material {}}geometry "+
"DEF "+id+"_ext Extrusion { "+
"crossSection "+st_cross+" "+
"spine "+st_spine+" "+
"scale "+st_scale+" "+
"orientation"+st_orient +" "+
"beginCap FALSE "+
"endCap FALSE "+
"solid FALSE "+
"creaseAngle 0}}} " +
"DEF "+id+"_ts TouchSensor {} "+
"DEF "+id+"_vp Viewpoint { position 0 0 0 description "+id+"_vp}]}}}"
);
var root = document.browser.getNodeByName('prim');
root.addChildren(id+'_all');

Quote:
}

browser is the applets name and prim the name of an empty group node
but all I get is an unknown error in IE 5.0 and mozilla 0.8.1

if I write
document.browser.setScene(document.browser.createNodeFromString("DEF "+id+"_
....))
instead the object shows up....but I want to add these nodes dynamically.
I have also tried
to use a second function with it:
function setObject()
{
var newnode = document.browser.getNodeByName(id+'_all');
document.browser.getScene().addChildren(newnode);

Quote:
}

without result

what am I doing wrong?

greetings
m



Thu, 02 Oct 2003 02:38:10 GMT  
 !!! WANTED: VRML 1.0 Objects and Environments for Multi-User Voice Chat Server
The solution
Just for the case anyone else might face that problem too

"the problem is that the addChildren() method requires an array of Nodes.
You can pass a Node using JavaScript, but not an array of nodes.
Here's a workaround that's a little tricky, but works.
The idea is to create a Group node with one element in its children array,
and then replace that element with a the node you want to add. Then you can
use this edited node array to pass to the addChildren() method of a
Transform already in the scene.
The following code adds a Sphere to a existing Transform within a vrml file
with the DEF name "trans".

var node = document.Shout3D.createNodeFromString("Transform { children Shape
{ appearance Appearance { material Material {} } geometry Sphere {}}}");
var group = document.Shout3D.createNodeFromString("Group { children Group
{} }");
group.children.set1Value(0, node);
trans =
document.Shout3D.getNodeByName("trans");trans.addChildren(group.children.get
Value());  "

as Rob from shout 3d wrote me

greez
m



Sat, 04 Oct 2003 23:08:20 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Multi user chat

2. WANTED...VRML CHAT ROOM

3. TPS file driver in multi-user environment

4. TPS file driver in multi-user environment

5. Eiffel in a multi user environment.

6. Clipper screen problems multi-user environment

7. Oberon in a multi user environment

8. multi user environment

9. Common client for multi-user environments?

10. python voice chat

11. Guidance using VA Web Connect - taking fat client and making it a multi-user server app

 

 
Powered by phpBB® Forum Software