ParallelGraphics Forums
General
You are here: [Forums]::[General]

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:
  General

Subject: Using Javascript
Sender: grungefreak1@gmail.com 5.10.08 03:46

Hi,

I have the following code:

*****************************************
#VRML V2.0 utf8
Group
{
    
    children
    [
        DEF ps ProximitySensor { size 7 7 7}# this is the size of the virtual box surrounding the sphere in this case it is non-existant due to 0 0 0 values.
        DEF sl SpotLight { on FALSE location 0 0 4}
        
        Shape
        {
            appearance Appearance
            {
                material Material {}
            }
            geometry Sphere {}
        }
    

    
]# end of group children
}#end of group

Group
{
    children
    [
        
         Transform
        {
    
    translation 3 0 0 # the position of the sphere along the x axiz
    
    children
    [
        DEF ps1 ProximitySensor { size 7 7 7}# this is the size of the virtual box surrounding the sphere in this case it is non-existant due to 0 0 0 values.
        
        Shape
        {
            appearance Appearance
            {
                material Material {emissiveColor 1 0 0 }
            }
            geometry Sphere {}
        }
    ]
    
}

    
]# end of group children
}#end of group

ROUTE ps.isActive TO sl.set_on
*****************************************

I want to be able to add a ROUTE instruction so that when you walk through the red sphere, the first spotlight sl becomes active?

Can anybody help out please?

GF

 


Using Javascript / grungefreak1@gmail.com / 5.10.08 03:46

Messages in thread: 1


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