Measures are used to obtain some information in Rainmeter, from your computer's system, text files, web sites, and other sources. This tutorial will introduce using Measures in a skin. Don't load the skin just yet, we need to add some code first. This will open the new skin file in your default text editor. Find Clock.ini in the list, right-click it and say "Edit". Click on the Refresh all button on the bottom left, and you should see your new Tutorials / Clock config in the list. Now, left-click the Rainmeter icon in the Windows notification area on your taskbar, to open the Manage dialog. In Windows explorer, you can simply right-click in the folder and say "New / Text document". In that Tutorials\Clock folder, create a new empty text file. Under Skins\Tutorials\ create a new folder called Clock. We are going to add a new folder under that one to create our new skin. Perhaps you can make something of it.In the previous tutorial, you should have already created a folder under Skins called Tutorials. When you use real images instead of SolidColor, you would have to put the values into a ColorMatrix. You can have two different sides of the flag. I have the suspiction you are a native German speaker and it would be much easier to explain and understand if we talked about this in German.ĮDIT: I have thrown together code that displays a "flag" rotating about a line. If you want to do some of this and need help, write me a PM. It was just my feeling that the animation could be improved by this. I don't know how exactly to do this in Rainmeter nor do I know if it will actually look better. Now all I have written here is pure theoretical speculation. When the other side gets visible, it has to be bright again. Of course only up to the middle of the animation. I don't really know how to do this, but you could use a ColorMatrix to make the page a little darker as it flips. If the animation that results of this is too fast, just make it slower by adding more counter steps.Īnd a third suggestion: as the "page" flips down, its angle to a potential light source would get flatter, resulting in a darker surface. Scale=cos((counter/max_counter)*(counter/max_counter)*PI) For us this means that we have to apply a square somewhere: This means, they start off slow and get faster the longer they are falling. Things that are falling down must do this according to gravity. In clocks like these you see on train stations or airports, the "pages" are flipped by letting them fall down rather than using a motor to rotate them. As a next step, you could add some physics Now if you can somehow apply these functions to your skin, you will have clock pages (or whatever you call them) that look like they are rotating. Scale is the value you put into the transformation matrix. Max_counter is the value the counter will have when the animation is complete In that case applying a cosine function will work:Ĭounter is a counter that increments as the animation progresses. I will assume your scaling of the y direction starts at factor 1 and ends at factor -1. This will make the scaling be slower at the beginning and end and faster in the middle. I'll just show you the maths I imagine will work.īasically, you have to take a sine or cosine function to simulate the rotation. Okay, this is too complicated to explain. If you take a small sheet of paper and rotate it in front of your eyes like the clock numbers do, you will notice that at the beginning and the end of the rotation the movement of the. This looks a little unnatural, because what you are trying to simulate is really something that is "rotated" around the middle axis of the numbers. Right now, you are creating the "flip" effect by a linear scaling in y direction. There are a small number of suggestions I have, regarding the animation: I like the look of these kinds of clocks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |