www.pudn.com > vrmlExample.rar > Control.wrl


#VRML V2.0 utf8 
 
 Viewpoint 
{ 
	position 0 0 15 
	orientation 0 0 1 0 
	fieldOfView 0.8 
} 
 
Background 
{ 
	skyColor		 
			[	0 	0 	0.2, 
				0.1 	0.1 	0.8, 
				0.7 	0.8 	0.9 
			] 
 
	skyAngle 	[1 	1.57] 
	groundColor 	 
			[	0.0 	0.0 	0.0, 
				0.5 	0.4 	0.3, 
				0.3 	0.3 	0.3 
			] 
	groundAngle 	[1	1.57] 
} 
 
 
DEF Box Transform  
{ 
    children [ 
	DEF	touch TouchSensor {} 
    Shape 
	{ 
		appearance Appearance 
		{ 
			material DEF Mat Material{} 
		} 
		geometry Box{} 
      } 
   ] 
} 
 
DEF Control Script 
{ 
   url	   "Control.class" 
   eventIn SFBool   clicked 
   field   SFBool	status	TRUE 
   field   SFNode   mat 	USE 	Mat 
   field   SFNode	box 	USE		Box 
 
} 
 
ROUTE touch.isActive TO Control.clicked