InitialObjectDescriptor { objectDescriptorID 1 audioProfileLevelIndication 255 visualProfileLevelIndication 254 sceneProfileLevelIndication 1 graphicsProfileLevelIndication 1 ODProfileLevelIndication 1 esDescr [ ES_Descriptor { ES_ID 1 decConfigDescr DecoderConfigDescriptor { streamType 3 decSpecificInfo BIFSConfig { isCommandStream true pixelMetric true pixelWidth 400 pixelHeight 400 } } } ] } PROTO P0 [ field SFVec2f trans 0 0 ] { Transform2D { translation IS trans children [ DEF TS TouchSensor {} DEF TR1 Transform2D { children [ Shape { appearance Appearance { material Material2D { lineProps DEF LP LineProperties { lineColor 0.2 0.5 0.8 width 0 } } } geometry Circle { radius 8 } } ] } DEF TIMER TimeSensor { cycleInterval 0.5 startTime -1 } ] } DEF SC Script { eventIn SFBool set_over eventIn SFFloat set_fraction eventIn SFBool set_active field SFNode tim USE TIMER field SFNode line USE LP eventOut SFFloat frac_changed url ["javascript: function set_active(value, timestamp) { line.width = value ? 2 : 0; } function set_over(value, timestamp) { is_over = value; if (!tim.isActive) tim.startTime = timestamp; } function set_fraction(value, timestamp) { if (is_over) { frac_changed = value; } else { frac_changed = 1 - value; } } " ] } DEF PI PositionInterpolator2D { key [0 1] keyValue [1 1 4 4] } ROUTE TS.isOver TO SC.set_over ROUTE TIMER.isActive TO SC.set_active ROUTE TIMER.fraction_changed TO SC.set_fraction ROUTE SC.frac_changed TO PI.set_fraction ROUTE PI.value_changed TO TR1.scale } PROTO P1 [ field SFVec2f trans 0 0 ] { Transform2D { translation IS trans children [ P0 { trans -180 0 } P0 { trans -160 0 } P0 { trans -140 0 } P0 { trans -120 0 } P0 { trans -100 0 } P0 { trans -80 0 } P0 { trans -60 0 } P0 { trans -40 0 } P0 { trans -20 0 } P0 {} P0 { trans 20 0 } P0 { trans 40 0 } P0 { trans 60 0 } P0 { trans 80 0 } P0 { trans 100 0 } P0 { trans 120 0 } P0 { trans 140 0 } P0 { trans 160 0 } P0 { trans 180 0 } ] } } OrderedGroup { children [ Background2D { backColor 0.2 0.4 0.7 } WorldInfo { info ["This shows script used in proto for a bubble-like effect" "" "GPAC Regression Tests" "(C) 2002-2004 GPAC Team"] title "Script and Proto test" } Transform2D { children [ P1 { trans 0 180 } P1 { trans 0 160 } P1 { trans 0 140 } P1 { trans 0 120 } P1 { trans 0 100 } P1 { trans 0 80 } P1 { trans 0 60 } P1 { trans 0 40 } P1 { trans 0 20 } P1 {} P1 { trans 0 -20 } P1 { trans 0 -40 } P1 { trans 0 -60 } P1 { trans 0 -80 } P1 { trans 0 -100 } P1 { trans 0 -120 } P1 { trans 0 -140 } P1 { trans 0 -160 } P1 { trans 0 -180 } ] } ] }