InitialObjectDescriptor {
  objectDescriptorID 1
  ODProfileLevelIndication 0xFF
  sceneProfileLevelIndication 0xFE
  audioProfileLevelIndication 0xFF
  visualProfileLevelIndication 0xFF
  graphicsProfileLevelIndication 0xFE

  esdescr [
    ES_Descriptor {
      es_id 1
      decConfigDescr DecoderConfigDescriptor {
				streamType 3
				decSpecificInfo BIFSConfig {
				  isCommandStream true
				  pixelMetric false
				  pixelWidth 400
				  pixelHeight 200
				}
      }
    }
  ]
}

Group { 
 children [
	Background2D { backColor 1 1 1}
  WorldInfo {
   title "Collision Test"
   info ["This shows the collision node  " "used without proxy" "" "GPAC Regression Tests" "$Date: 2008-06-26 07:55:39 $ - $Revision: 1.3 $" "(C) 2002-2004 GPAC Team"]
  }
  DEF C Collision {
  	children [
     DEF B Shape {
     	appearance Appearance {
     		material DEF MAT Material { diffuseColor 0 1 0 }
     	}
      geometry Box {size 20 0.5 0.1}
     }
    ]
  }
  DEF S Script {
  	eventIn SFTime on_collide
  	eventOut MFString outText
  	eventOut SFColor outCol
  	url "javascript:
  	function on_collide(value) {
  		v = new SFColor(1, 0, 0);
  		outCol = v;
  		outText[0] = 'collision time: ' + value;
  	}
  	"
  }
  
  Transform {
  	translation 0 0 0.055
  	children [
  		Shape {
  			appearance Appearance {
  				material Material2D { emissiveColor 0 0 0 filled TRUE }
  			}
  			geometry DEF T Text {
  				string "no collision"
  				fontStyle FontStyle {
  					size 2
  					justify "MIDDLE"
  				}
  			}
  		}
  	]
  }
  			
 ]
}

ROUTE C.collideTime TO S.on_collide
ROUTE S.outText TO T.string
ROUTE S.outCol TO MAT.diffuseColor

