[Go back to index]

Asobo\Misc\SimObjects.xml

Source XML
<ModelBehaviors> <Include ModelBehaviorFile="Asobo\Generic.xml"/> <Template Name="ASOBO_WindTurbine_Template"> <DefaultTemplateParameters> <ANIM_NAME>WindMil_Rotate</ANIM_NAME> <SPEED_RATIO>1</SPEED_RATIO> <STARTANGLE Process="float">rand 360 *</STARTANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(O:XMLVAR_IsInit) 0 == if{ 1 (&gt;O:XMLVAR_IsInit) #STARTANGLE# sp0 } l0 (A:AMBIENT WIND VELOCITY,feet per second) #SPEED_RATIO# * (A:ANIMATION DELTA TIME, seconds) * +</ANIM_CODE> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_DELTA>1</ANIM_DELTA> </UseTemplate> </Template> <Template Name="ASOBO_WindDirection_Template"> <DefaultTemplateParameters> <ANIM_NAME>Orientation</ANIM_NAME> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(A:AMBIENT WIND DIRECTION,degrees) 180 + dnor</ANIM_CODE> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_LENGTH>360</ANIM_LENGTH> </UseTemplate> </Template> <Template Name="ASOBO_SimObject_Smooth_VarEvolution"> <DefaultTemplateParameters> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>0</MAX_POSITION> <SPEED>0.1</SPEED> <ANIMATION_BASE_CODE></ANIMATION_BASE_CODE> <!-- Necessary : VAR_CURRENT, VAR_TARGET, ANIM_NAME --> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE> #ANIMATION_BASE_CODE# (#VAR_TARGET#) #MAX_POSITION# &gt; if{ #MAX_POSITION# (&gt;#VAR_TARGET#) } (#VAR_TARGET#) #MIN_POSITION# &lt; if{ #MIN_POSITION# (&gt;#VAR_TARGET#) } (#VAR_CURRENT#) #MAX_POSITION# &gt; if{ #MAX_POSITION# (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) #MIN_POSITION# &lt; if{ #MIN_POSITION# (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) (#VAR_TARGET#) - abs 0.01 &gt; if{ (#VAR_CURRENT#) (#VAR_TARGET#) &gt; if{ (#VAR_CURRENT#) #SPEED# (A:ANIMATION DELTA TIME,seconds) * - (#VAR_TARGET#) max (&gt;#VAR_CURRENT#) } els{ (#VAR_CURRENT#) #SPEED# (A:ANIMATION DELTA TIME,seconds) * + (#VAR_TARGET#) min (&gt;#VAR_CURRENT#) } } els{ (#VAR_TARGET#) (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) #MIN_POSITION# - 100 #MAX_POSITION# #MIN_POSITION# - / * </ANIM_CODE> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Left_Bend"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <PERCENT_PER_SECOND>50</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodLeftBendCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD LEFT BEND,percent</VAR_TARGET> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND#</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Left_Deployment"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <DEGREE_PER_SECOND>20</DEGREE_PER_SECOND> <MIN_ANGLE>0</MIN_ANGLE> <MAX_ANGLE>45</MAX_ANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodLeftDeploymentCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD LEFT DEPLOYMENT,degrees</VAR_TARGET> <MIN_POSITION>#MIN_ANGLE#</MIN_POSITION> <MAX_POSITION>#MAX_ANGLE#</MAX_POSITION> <SPEED>#DEGREE_PER_SECOND#</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Right_Bend"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <PERCENT_PER_SECOND>50</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodRightBendCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD RIGHT BEND,percent</VAR_TARGET> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND#</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Right_Deployment"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <DEGREE_PER_SECOND>20</DEGREE_PER_SECOND> <MIN_ANGLE>0</MIN_ANGLE> <MAX_ANGLE>45</MAX_ANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodRightDeploymentCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD RIGHT DEPLOYMENT,degrees</VAR_TARGET> <MIN_POSITION>#MIN_ANGLE#</MIN_POSITION> <MAX_POSITION>#MAX_ANGLE#</MAX_POSITION> <SPEED>#DEGREE_PER_SECOND#</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Top_Horizontal"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <PERCENT_PER_SECOND>100</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodTopHorizontalCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD TOP HORIZONTAL,percent</VAR_TARGET> <MIN_POSITION>-100</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND# 2 *</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Hood_Top_Vertical"> <DefaultTemplateParameters> <!-- Required : ANIM_NAME --> <PERCENT_PER_SECOND>100</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodTopVerticalCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD TOP VERTICAL,percent</VAR_TARGET> <MIN_POSITION>-100</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND# 2 *</SPEED> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Wheel_Roll"> <DefaultTemplateParameters> <ANIM_NAME>Wheel_Rotation</ANIM_NAME> <WHEEL_RADIUS>0.5</WHEEL_RADIUS> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(A:JETWAY WHEEL SPEED,meters per second) (A:ANIMATION DELTA TIME, seconds) * 2 pi * #WHEEL_RADIUS# * / 100 *</ANIM_CODE> <ANIM_DELTA>1</ANIM_DELTA> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template> <Template Name="ASOBO_Jetway_Wheel_Orientation"> <DefaultTemplateParameters> <ANIM_NAME>Wheel_Orientation</ANIM_NAME> <MIN_ANGLE>-90</MIN_ANGLE> <MAX_ANGLE>90</MAX_ANGLE> <MIN_TO_MAX>1</MIN_TO_MAX> <!-- 1 if the anim starts at min and ends at max --> <SPEED>30</SPEED> <!-- degrees per sec --> <SMOOTH_TIME_FACTOR>0.5</SMOOTH_TIME_FACTOR> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE> (* Target is in [-90,90]. Moves smoothed target to be closer *) (A:JETWAY WHEEL ORIENTATION TARGET,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) - abs 90 &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION TARGET,degrees) &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 - (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } els{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } } (* Smooth the target to avoid wobble *) (A:ANIMATION DELTA TIME, seconds) #SMOOTH_TIME_FACTOR# / (&gt;O:XMLVAR_JetwayWheelOrientation_SmoothFactor) (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) 1 > if{ 1 (&gt;O:XMLVAR_JetwayWheelOrientation_SmoothFactor) } (O:XMLVAR_JetwayWheelOrientationTarget) 1 (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) - * (A:JETWAY WHEEL ORIENTATION TARGET,degrees) (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) * + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) (* Move the smoothed target to [-90,90] *) (O:XMLVAR_JetwayWheelOrientationTarget) 90 &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 - (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } (O:XMLVAR_JetwayWheelOrientationTarget) -90 &lt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } (* Move the current to [-90,90] *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 90 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) -90 &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* Target is in [-90,90]. Moves current to be closer *) (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - abs 90 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } } (* If target is close enough, match it with current, otherwise add the delta in the correct direction *) (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - abs (A:ANIMATION DELTA TIME, seconds) #SPEED# * &lt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (A:ANIMATION DELTA TIME, seconds) #SPEED# * - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (A:ANIMATION DELTA TIME, seconds) #SPEED# * + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } } (* Move current back to [-180,180] *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 360 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) -180 &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 360 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* if anim is [-90,90] or [0,180], it is symmetric with a 180 deg rotation, so add +-180 to match the [min,max] interval (hopefully) *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MAX_ANGLE# &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MIN_ANGLE# &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* first frame of animation might be min_angle or max_angle, match the angle to frame accordingly *) #MIN_TO_MAX# 1 == if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MIN_ANGLE# - 100 #MAX_ANGLE# #MIN_ANGLE# - / * } els{ #MAX_ANGLE# (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - 100 #MAX_ANGLE# #MIN_ANGLE# - / * } </ANIM_CODE> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template> </ModelBehaviors>

Includes

Templates

Template list
  • ASOBO_WindTurbine_Template

    Definition from XML
    <Template Name="ASOBO_WindTurbine_Template"> <DefaultTemplateParameters> <ANIM_NAME>WindMil_Rotate</ANIM_NAME> <SPEED_RATIO>1</SPEED_RATIO> <STARTANGLE Process="float">rand 360 *</STARTANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(O:XMLVAR_IsInit) 0 == if{ 1 (&gt;O:XMLVAR_IsInit) #STARTANGLE# sp0 } l0 (A:AMBIENT WIND VELOCITY,feet per second) #SPEED_RATIO# * (A:ANIMATION DELTA TIME, seconds) * +</ANIM_CODE> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_DELTA>1</ANIM_DELTA> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • ANIM_NAME
      • SPEED_RATIO
      • STARTANGLE

    Templates used:

    • ASOBO_GT_Anim_Code

      Parameters set:

      • ANIM_CODE (using STARTANGLE, SPEED_RATIO)
      • ANIM_WRAP
      • ANIM_DELTA
  • ASOBO_WindDirection_Template

    Definition from XML
    <Template Name="ASOBO_WindDirection_Template"> <DefaultTemplateParameters> <ANIM_NAME>Orientation</ANIM_NAME> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(A:AMBIENT WIND DIRECTION,degrees) 180 + dnor</ANIM_CODE> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_LENGTH>360</ANIM_LENGTH> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • ANIM_NAME

    Templates used:

  • ASOBO_SimObject_Smooth_VarEvolution

    Definition from XML
    <Template Name="ASOBO_SimObject_Smooth_VarEvolution"> <DefaultTemplateParameters> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>0</MAX_POSITION> <SPEED>0.1</SPEED> <ANIMATION_BASE_CODE/> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE> #ANIMATION_BASE_CODE# (#VAR_TARGET#) #MAX_POSITION# &gt; if{ #MAX_POSITION# (&gt;#VAR_TARGET#) } (#VAR_TARGET#) #MIN_POSITION# &lt; if{ #MIN_POSITION# (&gt;#VAR_TARGET#) } (#VAR_CURRENT#) #MAX_POSITION# &gt; if{ #MAX_POSITION# (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) #MIN_POSITION# &lt; if{ #MIN_POSITION# (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) (#VAR_TARGET#) - abs 0.01 &gt; if{ (#VAR_CURRENT#) (#VAR_TARGET#) &gt; if{ (#VAR_CURRENT#) #SPEED# (A:ANIMATION DELTA TIME,seconds) * - (#VAR_TARGET#) max (&gt;#VAR_CURRENT#) } els{ (#VAR_CURRENT#) #SPEED# (A:ANIMATION DELTA TIME,seconds) * + (#VAR_TARGET#) min (&gt;#VAR_CURRENT#) } } els{ (#VAR_TARGET#) (&gt;#VAR_CURRENT#) } (#VAR_CURRENT#) #MIN_POSITION# - 100 #MAX_POSITION# #MIN_POSITION# - / * </ANIM_CODE> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • MIN_POSITION
      • MAX_POSITION
      • SPEED
      • ANIMATION_BASE_CODE

    Templates used:

    • ASOBO_GT_Anim_Code

      Parameters set:

      • ANIM_CODE (using ANIMATION_BASE_CODE, VAR_TARGET, MAX_POSITION, MIN_POSITION, VAR_CURRENT, SPEED)
      • ANIM_LENGTH
  • ASOBO_Jetway_Hood_Left_Bend

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Left_Bend"> <DefaultTemplateParameters> <PERCENT_PER_SECOND>50</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodLeftBendCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD LEFT BEND,percent</VAR_TARGET> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND#</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • PERCENT_PER_SECOND

    Templates used:

  • ASOBO_Jetway_Hood_Left_Deployment

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Left_Deployment"> <DefaultTemplateParameters> <DEGREE_PER_SECOND>20</DEGREE_PER_SECOND> <MIN_ANGLE>0</MIN_ANGLE> <MAX_ANGLE>45</MAX_ANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodLeftDeploymentCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD LEFT DEPLOYMENT,degrees</VAR_TARGET> <MIN_POSITION>#MIN_ANGLE#</MIN_POSITION> <MAX_POSITION>#MAX_ANGLE#</MAX_POSITION> <SPEED>#DEGREE_PER_SECOND#</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • DEGREE_PER_SECOND
      • MIN_ANGLE
      • MAX_ANGLE

    Templates used:

  • ASOBO_Jetway_Hood_Right_Bend

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Right_Bend"> <DefaultTemplateParameters> <PERCENT_PER_SECOND>50</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodRightBendCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD RIGHT BEND,percent</VAR_TARGET> <MIN_POSITION>0</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND#</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • PERCENT_PER_SECOND

    Templates used:

  • ASOBO_Jetway_Hood_Right_Deployment

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Right_Deployment"> <DefaultTemplateParameters> <DEGREE_PER_SECOND>20</DEGREE_PER_SECOND> <MIN_ANGLE>0</MIN_ANGLE> <MAX_ANGLE>45</MAX_ANGLE> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodRightDeploymentCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD RIGHT DEPLOYMENT,degrees</VAR_TARGET> <MIN_POSITION>#MIN_ANGLE#</MIN_POSITION> <MAX_POSITION>#MAX_ANGLE#</MAX_POSITION> <SPEED>#DEGREE_PER_SECOND#</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • DEGREE_PER_SECOND
      • MIN_ANGLE
      • MAX_ANGLE

    Templates used:

  • ASOBO_Jetway_Hood_Top_Horizontal

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Top_Horizontal"> <DefaultTemplateParameters> <PERCENT_PER_SECOND>100</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodTopHorizontalCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD TOP HORIZONTAL,percent</VAR_TARGET> <MIN_POSITION>-100</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND# 2 *</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • PERCENT_PER_SECOND

    Templates used:

  • ASOBO_Jetway_Hood_Top_Vertical

    Definition from XML
    <Template Name="ASOBO_Jetway_Hood_Top_Vertical"> <DefaultTemplateParameters> <PERCENT_PER_SECOND>100</PERCENT_PER_SECOND> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_SimObject_Smooth_VarEvolution"> <VAR_CURRENT>O:XMLVAR_JetwayHoodTopVerticalCurrent</VAR_CURRENT> <VAR_TARGET>A:JETWAY HOOD TOP VERTICAL,percent</VAR_TARGET> <MIN_POSITION>-100</MIN_POSITION> <MAX_POSITION>100</MAX_POSITION> <SPEED>#PERCENT_PER_SECOND# 2 *</SPEED> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • PERCENT_PER_SECOND

    Templates used:

  • ASOBO_Jetway_Wheel_Roll

    Definition from XML
    <Template Name="ASOBO_Jetway_Wheel_Roll"> <DefaultTemplateParameters> <ANIM_NAME>Wheel_Rotation</ANIM_NAME> <WHEEL_RADIUS>0.5</WHEEL_RADIUS> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE>(A:JETWAY WHEEL SPEED,meters per second) (A:ANIMATION DELTA TIME, seconds) * 2 pi * #WHEEL_RADIUS# * / 100 *</ANIM_CODE> <ANIM_DELTA>1</ANIM_DELTA> <ANIM_WRAP>1</ANIM_WRAP> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • ANIM_NAME
      • WHEEL_RADIUS

    Templates used:

    • ASOBO_GT_Anim_Code

      Parameters set:

      • ANIM_CODE (using WHEEL_RADIUS)
      • ANIM_DELTA
      • ANIM_WRAP
      • ANIM_LENGTH
  • ASOBO_Jetway_Wheel_Orientation

    Definition from XML
    <Template Name="ASOBO_Jetway_Wheel_Orientation"> <DefaultTemplateParameters> <ANIM_NAME>Wheel_Orientation</ANIM_NAME> <MIN_ANGLE>-90</MIN_ANGLE> <MAX_ANGLE>90</MAX_ANGLE> <MIN_TO_MAX>1</MIN_TO_MAX> <SPEED>30</SPEED> <SMOOTH_TIME_FACTOR>0.5</SMOOTH_TIME_FACTOR> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Anim_Code"> <ANIM_CODE> (* Target is in [-90,90]. Moves smoothed target to be closer *) (A:JETWAY WHEEL ORIENTATION TARGET,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) - abs 90 &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION TARGET,degrees) &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 - (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } els{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } } (* Smooth the target to avoid wobble *) (A:ANIMATION DELTA TIME, seconds) #SMOOTH_TIME_FACTOR# / (&gt;O:XMLVAR_JetwayWheelOrientation_SmoothFactor) (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) 1 &gt; if{ 1 (&gt;O:XMLVAR_JetwayWheelOrientation_SmoothFactor) } (O:XMLVAR_JetwayWheelOrientationTarget) 1 (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) - * (A:JETWAY WHEEL ORIENTATION TARGET,degrees) (O:XMLVAR_JetwayWheelOrientation_SmoothFactor) * + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) (* Move the smoothed target to [-90,90] *) (O:XMLVAR_JetwayWheelOrientationTarget) 90 &gt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 - (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } (O:XMLVAR_JetwayWheelOrientationTarget) -90 &lt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) 180 + (&gt;O:XMLVAR_JetwayWheelOrientationTarget) } (* Move the current to [-90,90] *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 90 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) -90 &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* Target is in [-90,90]. Moves current to be closer *) (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - abs 90 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } } (* If target is close enough, match it with current, otherwise add the delta in the correct direction *) (O:XMLVAR_JetwayWheelOrientationTarget) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - abs (A:ANIMATION DELTA TIME, seconds) #SPEED# * &lt; if{ (O:XMLVAR_JetwayWheelOrientationTarget) (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (O:XMLVAR_JetwayWheelOrientationTarget) &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (A:ANIMATION DELTA TIME, seconds) #SPEED# * - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } els{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) (A:ANIMATION DELTA TIME, seconds) #SPEED# * + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } } (* Move current back to [-180,180] *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 360 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) -180 &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 360 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* if anim is [-90,90] or [0,180], it is symmetric with a 180 deg rotation, so add +-180 to match the [min,max] interval (hopefully) *) (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MAX_ANGLE# &gt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 - (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MIN_ANGLE# &lt; if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) 180 + (&gt;A:JETWAY WHEEL ORIENTATION CURRENT,degrees) } (* first frame of animation might be min_angle or max_angle, match the angle to frame accordingly *) #MIN_TO_MAX# 1 == if{ (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) #MIN_ANGLE# - 100 #MAX_ANGLE# #MIN_ANGLE# - / * } els{ #MAX_ANGLE# (A:JETWAY WHEEL ORIENTATION CURRENT,degrees) - 100 #MAX_ANGLE# #MIN_ANGLE# - / * } </ANIM_CODE> <ANIM_LENGTH>100</ANIM_LENGTH> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • ANIM_NAME
      • MIN_ANGLE
      • MAX_ANGLE
      • MIN_TO_MAX
      • SPEED
      • SMOOTH_TIME_FACTOR

    Templates used:

    • ASOBO_GT_Anim_Code

      Parameters set:

      • ANIM_CODE (using SMOOTH_TIME_FACTOR, SPEED, MAX_ANGLE, MIN_ANGLE, MIN_TO_MAX)
      • ANIM_LENGTH