aboutsummaryrefslogtreecommitdiffhomepage
path: root/animations/lines#1.xml
blob: fe120a17baee93d026c1653167606d2333bde7fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="utf-8" ?> 
<screenplay xmlns="urn:screenplay">
	<line id="line" x1="0" y1="0" x2="100" y2="0" />
	<random id="rRed" min="0" max="255" seed="1900"  />
	<random id="rBlue" min="0" max="255" seed="50000"  />
	<random id="rGreen" min="0" max="255" seed="99"  />
	
	<event kind="onLoad" >
		<matrix id="initialMatrix" translate="[120,100]" />
		<paint id="basePaint" strokeWidth="2" antiAlias="true" textAlign="center" 
				textSize="24" linearText="false" >
			<color color="lightblue" />
		</paint>
		<apply mode="immediate" steps="17" >
			<post target="addLine" />
			<animate field="delay" from="0.1" to="0.95" />
		</apply>
		<post id="postAddCaptionFade" target="addCaptionFade" delay="1" />
		<post id="postAddLineCaption"  target="addLineCaption" delay="1" />
		<post target="scaleInitial" delay="2" />
		<apply scope="basePaint"  begin="3">
			<set begin="0" field="linearText" to="false" />
		</apply>
	</event>

	<event kind="user" id="addLine" >
		<matrix rotate="20" />
		<apply restore="true" >
			<paint >
				<color id="ramp" />
			</paint>
			<set target="ramp" field="color" to="rgb(rRed.random,rBlue.random,rGreen.random)" />
		</apply>
		<add use="line" />
	</event>
	
	<event kind="user" id="addCaptionFade" >
		<apply>
			<paint>
				<color id="captionFade" alpha="0" />
			</paint>
			<animate target="captionFade" field="alpha" from="0" to="1" dur="1" />
		</apply>
	</event>
	
	<event kind="user" id="addLineCaption" >
		<text id="linescaption" text="Lines" x="0" y="120" />
	</event>
	
	<event kind="user" id="scaleInitial" >
		<apply scope="basePaint" >
			<set field="linearText" to="true" dur="1" reset="true" />
		</apply>
		<apply scope="initialMatrix" >
			<animate field="scale" from="1" to=".5" dur="1"/>
			<animate field="translateX" from="120" to="60" dur="1"/>
			<animate field="translateY" from="100" to="60" dur="1"/>
		</apply>
	</event>
		
<!--
	<event kind="keyChar" key="d" >
		<dump />
	</event>
-->
</screenplay>