Animation settings

The functionality appeared in version 3.5.7. The animation is stored as PNG files. Such files should be placed in the CarWebGuru/cfg/anim/loop or CarWebGuru/cfg/anim/shutter folder. When you call the menu command “Change loop animation” all PNG files from the CarWebGuru/cfg/anim/loop folder will be shown. The same for the shutter. If no files are found, there will be a message and the exact folder for your device.

The initial animation setup is done in the application itself, where you can specify global parameters for the entire animation (long click / animation properties).

It is possible to customize each animation file and set it:

  • frame size (fs)
  • maximum speed (ms)
  • operation mode — cyclic or by value (loop)
  • initial value for triggering (ps)
  • end value for triggering (pe)

To set the settings, it is necessary to write some control commands in the file name. This method allows you to customize each animation file, transfer it to another device without losing the animation playback settings. For the settings, it is mandatory to have a marker for the beginning of the settings and a marker for the end of the settings. Markers are Latin small letters:

  • Beginning of the config: c-
  • End of the config: -c
  • The general appearance is approximately as follows: file name c- commands -c.png

Now a detailed description of each command and then several examples of their use.

Loop

The animation has a control parameter that is set by the user with a long click. For example, speed or seconds. The control parameter affects the animation. To make the animation play in a loop mode (when it ends, it starts from the beginning, the value of the control parameter sets the animation speed), you need to add the word loop to the config. The presence of such a word will enable the loop, the absence of the word will enable the playback mode “by value”. By value – means that at the minimum value of the control parameter (for example, speed = 0), the first frame of the animation will be shown, then with an increase in the control parameter, the corresponding frame will be shown. And at the maximum value of the control parameter (for example, speed 220), the last frame of the animation will be shown. Frames are recalculated as a percentage of the minimum and maximum value of the control parameter.

Frame Size (fs)

By default, the frame size for shutter animation is 250×250 pixels, and for cyclic animation 200×200 pixels. If you need to change the animation frame size, you can set it via the config. Only one value is set and the frame size will be square. To set the size to 300×300 pixels, add the command to the config: fs300.

Max Speed (ms)

The control parameter in the cyclic mode controls the animation playback speed. Thus, you can achieve that when we stop, the animation (for example, roads) also stops. And when accelerating, it is played faster according to the current speed. The playback speed depends on the number of frames, so to adjust the speed, you can control the maximum speed using the ms parameter. The speed is set as the number of animation cycles per minute. For example, if one animation cycle displays one revolution of the engine pistons, then we set the number of revolutions per minute. To set the max speed to 30 rpm, you need to enter the parameter ms30

Initial value for triggering – ps (Percent Start)

You can specify the start of the triggering zone for the animation. For example, you want the animation to stop when the control parameter is less than 30%. Then you need to add ps30 to the config. The result for cyclic animation will be that from the value 0 to 30% the animation will be paused. And from 30% to 100% it will be played according to the calculations and maximum speed. The zone value is specified as a percentage. If you want to bind to a specific number (for example, 50 km / h), then first recalculate this value into percentages.

End value for triggering – pe (Percent End)

You can specify the end of the triggering zone for the animation. For example, you want the animation to spin up as much as possible when the control parameter is greater than 60%. Then you need to add pe60 to the config. The result for cyclic animation will be that from the value 0 to 60% the animation will be played according to the calculations and maximum speed. And from 60% to 100% will be at maximum speed. You can set both border parameters together in one config.

Some real examples:

  • City7-c-ms50-loop-c.png — The maximum animation speed is set to 50 and the loop mode is set.
  • Desert1-c-ms20-loop-fs250-c.png — The frame size is set to 250×250 pixels, the maximum speed is 20 and the loop mode is set.
  • Road-c-ms20-loop-ps10-pe70-c.png — The maximum speed is set to 20, the loop mode and the start border is 10% and the end border is 70%.