--- /dev/null
+<scene width="1920" height="1080" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/CasparCG/Server/2.1.0/core/producer/scene/scene.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!--
+ An example crawler scene. Does not support the "tail" on screen at the same
+ time as the "head", but otherwise a good demonstration of combined use of
+ timeline for intro, outro animations and the frame variable for "infinite"
+ animations.
+ -->
+ <variables>
+ <variable type="string" id="text" public="true">Needs "text", Use "speed" to set pixels per frame, Use "iterations" to specify how many times the crawler should repeat.</variable>
+ <variable type="number" id="speed" public="true">4</variable>
+ <variable type="number" id="iterations" public="true">2</variable>
+
+ <!-- The scrolling is done without the timeline, only with the use of the global frame counter. -->
+ <variable type="number" id="text_num_pixels_wait">${20 * speed}</variable>
+ <variable type="number" id="scroll_distance"> ${layer.text.width + scene_width + variable.text_num_pixels_wait}</variable>
+ <variable type="number" id="current_text_pos"> ${(-frame * speed) % variable.scroll_distance + scene_width + variable.text_num_pixels_wait}</variable>
+ <variable type="number" id="current_iteration"> ${( frame * speed) / variable.scroll_distance}</variable>
+
+ <!-- Controlled by timeline. -->
+ <variable type="number" id="animation_pos_x">0</variable>
+ </variables>
+
+ <layers>
+ <layer id="plate">
+ <producer>RED</producer>
+ <x>${variable.animation_pos_x}</x>
+ <y>50</y>
+ <width>${scene_width}</width>
+ <height>60</height>
+ <adjustments>
+ <opacity>0.8</opacity>
+ </adjustments>
+ </layer>
+
+ <!-- Mask of text needed on out animation to not make the rest of the text visible -->
+ <layer id="mask">
+ <producer>WHITE</producer>
+ <x>${layer.plate.x}</x>
+ <y>${layer.plate.y}</y>
+ <width>${layer.plate.width}</width>
+ <height>${layer.plate.height}</height>
+ <is_key>true</is_key>
+ </layer>
+
+ <layer id="text">
+ <producer>[TEXT] "" 0 0 size 35 color white font Roboto-Regular</producer>
+ <x>${variable.current_text_pos + variable.animation_pos_x}</x>
+ <y>${layer.plate.y + layer.plate.height - 18}</y>
+ <parameters>
+ <text>${text}</text>
+ </parameters>
+ </layer>
+ </layers>
+
+ <marks>
+ <mark at="0" type="start" label="intro" />
+ <mark at="20" type="stop" />
+ <mark at="20" type="start" label="outro" />
+ <mark at="40" type="remove" />
+ </marks>
+
+ <tasks>
+ <goto_mark when="${variable.current_iteration > iterations}" label="outro" />
+ </tasks>
+
+ <timelines>
+ <timeline variable="variable.animation_pos_x">
+ <keyframe at="0">${scene_width}</keyframe>
+ <keyframe at="20" easing="easeoutsine">0</keyframe>
+ <keyframe at="40" easing="easeoutsine">${-scene_width}</keyframe>
+ </timeline>
+ <timeline variable="layer.mask.adjustment.brightness">
+ <keyframe at="20">1</keyframe>
+ <keyframe at="40" easing="linear">0</keyframe>
+ </timeline>
+ </timelines>
+</scene>