ParallelGraphics Forums
Cortona VRML Client
You are here: [Forums]::[Browsers]::[Cortona VRML Client]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   Browsers - Cortona VRML Client

Subject: JavaScript problem in Cortona client only
Sender: DevinDow@gmail.com 25.08.08 08:33

I'm having a problem where the Cortona client is not performing some javascript. VRMLPad seems to handle it fine and the Flux Player renders it correctly.

The "PinScript" is not successfully changing the size parameters (but the "TransformScript" is successfully transforming). So the box is drawn .1 x .1 x .1 in the Cortona client instead of l x h x w like the Flux Player.

See below for code.
Can anyone see a problem here, or has anyone seen this before, or what?


#VRML V2.0 utf8

PROTO GullwingPin [
field SFColor color .8 .8 .8
field    SFFloat    h 0
field    SFFloat    l 0
field    SFFloat    w 0
field    SFFloat    t 0
]

{
    DEF PinTransform Transform { children [
        DEF Pin Shape {
            appearance Appearance {    material Material { diffuseColor IS color shininess 1 ambientIntensity .5 } }
            geometry Box { size .1 .1 .1 }
        }
    ]}

    DEF TransformScript Script {
        field SFNode pinTransform USE PinTransform
        field SFFloat l IS l
        directOutput TRUE
        url "javascript:
            function initialize() {
                pinTransform.translation = new SFVec3f(-l/2, 0, 0);
            }
        "
    }

    DEF PinScript Script {
        field SFNode pin USE Pin
        field SFFloat h IS h
        field SFFloat l IS l
        field SFFloat w IS w
        field SFFloat t IS t
        directOutput TRUE
        url "javascript:
            function initialize () {
                pin.geometry.size = new SFVec3f(l, h, w);
            }
        "
    }
}

 


JavaScript problem in Cortona client only / DevinDow@gmail.com / 25.08.08 08:33
     Re: JavaScript problem in Cortona client only / nalex@parallelgraphics.com / 25.08.08 09:01

Messages in thread: 2


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.