forked from synapticsim/BehaveStd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnimation.xml
77 lines (73 loc) · 2.82 KB
/
Animation.xml
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
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<ModelBehaviors>
<!--
An animation that is controlled by running some code.
This is slower than using `Beh_Animation_Var`, so use that if your animation depends only on a SimVar.
-->
<Template Name="Beh_Animation_Code">
<Parameters Type="Default">
<!-- The name of the animation in your GLTF file(s). -->
<Name/>
<!-- The code to run to get the target frame of the animation. -->
<Code/>
<!-- The scalar to divide the output of `Code` by. After dividing, the output value should be between 0 and 1. -->
<Length>100</Length>
<!--
The number of 'virtual frames' that can be played in one second.
The number of 'virtual frames' in the animation is equal to `Length`.
Essentially, this means that going from 0 to 1 in the animation will take `Length` / `Lag` seconds.
Between these two points, the simulator will linearly interpolate between your animation keyframes.
-->
<Lag>400</Lag>
<!-- Whether the animation should wrap around if the output value (after dividing) goes out of the range. -->
<Wrap>False</Wrap>
</Parameters>
<Animation Name="#Name#" Guid="" Length="#Length#" Type="Sim" TypeParam="AutoPlay">
<Parameter>
<Code>#Code#</Code>
<Lag>#Lag#</Lag>
<Wrap>#Wrap#</Wrap>
</Parameter>
</Animation>
</Template>
<!--
An animation that is controlled by a SimVar. (Only A: vars are supported.)
-->
<Template Name="Beh_Animation_Var">
<Parameters Type="Default">
<!-- The name of the animation in your GLTF file(s). -->
<Name/>
<!-- The variable that contains the target frame of the animation (without the `A:` prefix). -->
<Var/>
<!-- The unit of the SimVar. -->
<Unit/>
<!-- The value to scale the variable by. -->
<Scale>1</Scale>
<!-- The bias to add to the scaled variable. -->
<Bias>0</Bias>
<!-- The scalar to divide the output (Var * Scale + Bias) by. After dividing, the output value should be between 0 and 1. -->
<Length>100</Length>
<!--
The number of 'virtual frames' that can be played in one second.
The number of 'virtual frames' in the animation is equal to `Length`.
Essentially, this means that going from 0 to 1 in the animation will take `Length` / `Lag` seconds.
Between these two points, the simulator will linearly interpolate between your animation keyframes.
-->
<Lag>400</Lag>
<!-- Whether the animation should wrap around if the output value (after dividing) goes out of the range -->
<Wrap>False</Wrap>
</Parameters>
<Animation Name="#Name#" Guid="" Length="#Length#" Type="Sim" TypeParam="AutoPlay">
<Parameter>
<Sim>
<Variable>#Var#</Variable>
<Units>#Unit#</Units>
<Scale>#Scale#</Scale>
<Bias>#Bias#</Bias>
</Sim>
<Lag>#Lag#</Lag>
<Wrap>#Wrap#</Wrap>
</Parameter>
</Animation>
</Template>
</ModelBehaviors>