Wednesday, March 2, 2022

Mesmerizer 1.6.6

Another small Mesmerizer update, version 1.6.6, is in vendors and on Marketplace.  Mesmerizer 1.6.6 increases the options for image display.  Previously, the Mesmerizer could display images using the show family of commands.  These commands were (and still are) limited to using a square aspect ratio for display; they also don't support animated textures.  Mesmerizer 1.6.6 adds variants of the show commands - show2, showflash2, showlong2 and showstart2 - that each take an additional string parameter that allows the behavior to be changed.

The new parameter is a series of keyword=value assertions, separated by semicolons.  The following keywords are supported:

  • aspect - set the aspect ratio, or the image width divided by its height.  So a 16x9 display would have an aspect ratio of about 1.78, whereas the default image display has an aspect ratio of 1.0.  If omitted, 1.0 is assumed.  The image is always displayed to fill the screen height, and the width of the image is adjusted according to the aspect ratio.

  • alpha - set the alpha or opacity of this image.  1.0 is fully opaque; 0 is completely transparent.  If you don't specify an alpha value, the default image alpha will be used (which can in turn be set via the regular alpha command).
  • animate - animate the image.  The associated value is closely related to the string that defines how a custom spiral is animated in the setspiral command.   Images can be animated either by having them rotate, or by treating the image as a series of frames that are displayed in sequence.  Here are some examples:

animate=2.0 - rotate the texture at 2 radians per second

animate=4:8:10.0 - treat the texture as an array of 8 rows each containing 4 frames, and display the frames in sequence at 10 frames per second.  Loop back to the start after all 32 frames have been displayed

animate=[6]4:2:8.0 - treat the texture as an array of 2 rows of 4 frames, but only show the first 6 frames before repeating; display at 8 frames per second. 

Any of these animations may be played in reverse by putting a "-" symbol at the start.

If the animate keyword is omitted, then the full image will be displayed as a static picture.

So a command like:

/99 showstart2 306942ab-2bda-bd53-6d18-5dda710af8a6 "alpha=1.0;animate=7:8:10"

will treat the texture as 8 rows of 7 frames, and display those frames in sequence at 10 frames per second, with an opacity of 1.0 (fully opaque).

Each of the original showshowflashshowlong and showstart commands is equivalent to the corresponding new command, with the extra parameter given as an empty string.  So, for instance:

/99 show texture

is exactly equivalent to 

/99 show2 texture ""

Bugfix

In addition to the new show2 family of commands, Mesmerizer 1.6.6 includes a small refactorization to give more memory to the code that manipulates the #RLV folder.  Previously, a very large #RLV folder could sometimes cause this code to run out of memory.

A timing bug when restoring RLV restrictions on login is also partially addressed, although I'm not particularly happy with the way I solved the issue and will probably address it in a different way in a future release.

No comments:

Post a Comment