Community Place browser supports the functions, which VRML2.0 does not support, as extension nodes. These nodes have "Sony_" prefix. and are defined as a PROTO. Therefore, if your VRML file contains the nodes, other VRML2.0 browsers can load the file. The following nodes are supported:
Again, these nodes are defined as PROTO, you should use them with their PROTO definition when you use them. For example, when you set FALSE to the Sony_WorldInfo node's floatButtonAvailable field, you should do as follows;
e.g. #VRML V2.0 utf8 # PROTO definition PROTO Sony_WorldInfo [ field MFString archive [] field SFInt32 armLength -1 field SFBool avatarRoom FALSE field SFInt32 backgroundImageType 0 field SFString cpBureau "" field SFString cpBureauWLS "" field SFBool collisionSound TRUE field SFBool collisionDisplay TRUE exposedField SFBool turnButtonAvailable TRUE exposedField SFBool floatButtonAvailable TRUE exposedField SFBool homeButtonAvailable TRUE field SFInt32 soundDeviceRate 22050 field SFInt32 soundDeviceBits 8 ]{} # Entity of the PROTO with value Sony_WorldInfo { floatButtonAvailable FALSE} # Other VRML nodes ...
Or, the following is also availabel;
#VRML V2.0 utf8 # PROTO definition PROTO Sony_WorldInfo [ exposedField SFBool floatButtonAvailable TRUE ]{} # Entity of the PROTO with value Sony_WorldInfo { floatButtonAvailable FALSE} # Other VRML nodes ...
Extends the original Appearance node by putting two new fields:
The definition is as follows:
PROTO Sony_Appearance [ field SFBool backface FALSE exposedField SFString description "" exposedField SFNode material NULL exposedField SFNode texture NULL exposedField SFNode textureTransform NULL ] { Appearance { material IS material texture IS texture textureTransform IS textureTransform } }
Sony_WorldInfo is a description of world configurations which is only valid for Sony Community Place Browser. The prototype declaration is following,
PROTO Sony_WorldInfo [ field MFString archive [] field SFInt32 armLength -1 field SFBool avatarRoom FALSE field SFInt32 backgroundImageType 0 field SFString cpBureau "" field SFString cpBureauWLS "" field SFBool collisionSound TRUE field SFBool collisionDisplay TRUE exposedField SFBool turnButtonAvailable TRUE exposedField SFBool floatButtonAvailable TRUE exposedField SFBool homeButtonAvailable TRUE field SFInt32 soundDeviceRate 22050 field SFInt32 soundDeviceBits 8 ]{}
These fields are explained in the following sections.
Specifies an archive which contains all files used in this VRML file. After retrieving the archive by CommunityPlace browser, the browser extracts these files and places them in appropriate local directories before parsing the VRML file. So the browser can access them using relative paths from the place where this VRML file is placed. This method reduces the necessary connections during loading the entire content. For the compatibility with other browsers, these files should be placed in approriate remote directories as well.
The archive itself is created using LHA archiver and must be placed in the same directory as this VRML file is placed. The LHA command which is used to create the archive needs to keep case. For example, LHA command for UNIX can do that.
e.g.
Sony_WorldInfo { archive ["foo.lzh"] }
In addition, you must register the following MIME type to WWW server.
application/x-lha
Specifies how far your virtual arm can reach in a world. This parameter is used to decide if an object can be touched. This parameter is specified by "meter".If this is set to -1, the arm length is set to long enough.
e.g.
Sony_WorldInfo { armLength 5 }
This field is used for CommunityPlace's multi-user function.
Specifies if an avatar room (for changing avatar color) description file is provided for this world. You can specifiy TRUE or FALSEas the value. If the value is TRUE, a file named avtroom.wrl must be supplied in the same place as this VRML file. The avtroom.wrl is expected to provide the functionality of changing avatar part colors.
e.g.
Sony_WorldInfo { avatarRoom TRUE }
Specifies the type of background image format. you can specify one of following numbers.
e.g.
Sony_WorldInfo { backgroundImageType 0 }
This field is used for CommunityPlace's multi-user function. Specifies address and port number of Bureau of the world.
e.g.
Sony_WorldInfo { cpBureau "vsserver.foo.com:5000" }
or
Sony_WorldInfo { cpBureau "12.23.34.45:5000" }
This field is used for CommunityPlace's multi-user function.
Specifies address and port number of World Location Server of the world. Also you must specify 'title' in WorldInfo when you use the WorldLocationServer.
e.g.
Sony_WorldInfo { cpBureauWLS "vsserver.foo.com:6000" }
or
Sony_WorldInfo { cpBureauWLS "12.23.34.45:6000" }
If you set this TRUE, Browser will play collision sound when you collide something.
e.g.
Sony_WorldInfo { collisionSound FALSE }
If you set this TRUE, Browser will display red frame when you collide something.
e.g.
Sony_WorldInfo { collisionDisplay FALSE }
Specifies availability of Turn, Float, Home button of Community Place Browser. If you set this TRUE, the button is available.
e.g.
Sony_WorldInfo { turnButtonAvailable FALSE floatButtonAvailable FALSE homeButtonAvailable FALSE }
Specifies sound device parameters which Community Place open.
e.g.
Sony_WorldInfo { soundDeviceRate 22050 soundDeviceBits 8 }
This node extends the original Viewpoint node by putting two new fields:
The definition is as follows:
PROTO Sony_Viewpoint [ eventIn SFBool snapshot eventOut SFImage snappedImage eventIn SFBool set_bind exposedField SFFloat fieldOfView 0.785398 exposedField SFBool jump TRUE exposedField SFRotation orientation 0 0 1 0 exposedField SFVec3f position 0 0 10 field SFString description "" eventOut SFTime bindTime eventOut SFBool isBound ] { Viewpoint { fieldOfView IS fieldOfView jump IS jump orientation IS orientation position IS position description IS description } }
Here is an example:
Shape { appearance Appearance { texture DEF PICTURE PixelTexture {} ... } geometry ... } Transform { children [ ... DEF CLICK TouchSensor{} DEF CAMERA Sony_Viewpoint {} ] } ROUTE CLICK.isActive TO CAMERA.snapshot ROUTE CAMERA.snappedImage TO PICTURE.set_image
Notice: This node is available in CommunityPlace browser's RenderWare version.
This node is used for CommunityPlace's multi-user function. This node is used
Prototype definition of this node is:
PROTO Sony_BindSharedNode [ field SFNode transformNode NULL field SFNode scriptNode NULL field MFString action "SonyActionPanel: Hello,sonybrowser:Hello,,,; Smile,sonybrowser:Smile,,,; Wao!,sonybrowser:Wao,,Wao,; Umm...,sonybrowser:Umm,,Umm,; Wooo!!,sonybrowser:Wooo,,Wooo,; Bye,sonybrowser:Bye,,,;" ] {}
This node is defined to be expanded to nothing so that VRML 2.0 browsers other than Community Place can safely ignore the node.
In the Community Place browser, this node is treated in a special way. A transform node specified for transformNode field of this node is made sharable among clients. In other words, nodes other than those specified in this field are not shared. The field transformNode must be specified and its value must be a Transform node.
If the value of the scriptNode field is not NULL, the value must be a Script node. The Script node's eventIns can be called remotely. You can call sendApplSpecific() or sendApplSpecificWithDist() Java APIs with specifying the target (the first argument) to be the Transform node specified in the transformNode field and eventIn name (the second argument) to be the eventIn names that appear in the Script node.
The third argument of the APIs is a string value, which will be the value of eventIns of the Script node. The eventIns must be of type SFString to accept the values sent using the APIs.
The action fileld is used to customize the action buttons in multi-user window(see action-panel-j.html).
Here is an example:
PROTO Sony_BindSharedNode [ field SFNode transformNode NULL field SFNode scriptNode NULL field MFString action "SonyActionPanel: Hello,sonybrowser:Hello,,,; Smile,sonybrowser:Smile,,,; Wao!,sonybrowser:Wao,,Wao,; Umm...,sonybrowser:Umm,,Umm,; Wooo!!,sonybrowser:Wooo,,Wooo,; Bye,sonybrowser:Bye,,,;" ] {} DEF T1 Transform { ... } DEF S1 Script { eventIn SFString IN1 eventIn SFString IN2 ... } Sony_BindSharedNode { transformNode USE T1 scriptNode USE S1 }