1 <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">
3 An example crawler scene. Does not support the "tail" on screen at the same
4 time as the "head", but otherwise a good demonstration of combined use of
5 timeline for intro, outro animations and the frame variable for "infinite"
9 <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>
10 <variable type="number" id="speed" public="true">4</variable>
11 <variable type="number" id="iterations" public="true">2</variable>
13 <!-- The scrolling is done without the timeline, only with the use of the global frame counter. -->
14 <variable type="number" id="text_num_pixels_wait">${20 * speed}</variable>
15 <variable type="number" id="scroll_distance"> ${layer.text.width + scene_width + variable.text_num_pixels_wait}</variable>
16 <variable type="number" id="current_text_pos"> ${(-frame * speed) % variable.scroll_distance + scene_width + variable.text_num_pixels_wait}</variable>
17 <variable type="number" id="current_iteration"> ${( frame * speed) / variable.scroll_distance}</variable>
19 <!-- Controlled by timeline. -->
20 <variable type="number" id="animation_pos_x">0</variable>
25 <producer>RED</producer>
26 <x>${variable.animation_pos_x}</x>
28 <width>${scene_width}</width>
31 <opacity>0.8</opacity>
35 <!-- Mask of text needed on out animation to not make the rest of the text visible -->
37 <producer>WHITE</producer>
38 <x>${layer.plate.x}</x>
39 <y>${layer.plate.y}</y>
40 <width>${layer.plate.width}</width>
41 <height>${layer.plate.height}</height>
46 <producer>[TEXT] "" 0 0 size 35 color white font Roboto-Regular</producer>
47 <x>${variable.current_text_pos + variable.animation_pos_x}</x>
48 <y>${layer.plate.y + layer.plate.height - 18}</y>
56 <mark at="0" type="start" label="intro" />
57 <mark at="20" type="stop" />
58 <mark at="20" type="start" label="outro" />
59 <mark at="40" type="remove" />
63 <goto_mark when="${variable.current_iteration > iterations}" label="outro" />
67 <timeline variable="variable.animation_pos_x">
68 <keyframe at="0">${scene_width}</keyframe>
69 <keyframe at="20" easing="easeoutsine">0</keyframe>
70 <keyframe at="40" easing="easeoutsine">${-scene_width}</keyframe>
72 <timeline variable="layer.mask.adjustment.brightness">
73 <keyframe at="20">1</keyframe>
74 <keyframe at="40" easing="linear">0</keyframe>