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 with a sphere proxy" "" "GPAC Regression Tests" "(C) 2002-2004 GPAC Team"] } DEF C Collision { proxy Shape { geometry Sphere { radius 6 } } children [ Shape { appearance Appearance { material DEF MAT Material { diffuseColor 0 1 0 } } geometry Box {size 20 2 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 2 0 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