1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Created Dynamic properties (markdown)

Robert Beekman 2016-12-08 12:10:12 +01:00
parent e792904716
commit 061033666e

23
Dynamic-properties.md Normal file

@ -0,0 +1,23 @@
Dynamic properties allow you to change a layer's properties based on a certain value.
Dynamic properties can be bound to a layer's height, width and opacty.
## Spotify example
In this example we're going to bind a layer's width to how far along a track is. The Windows Profile datamodel offers a ```SongPercentCompleted``` property, which indicates how much of the track has played.
### 1 - Create the layer
We'll start by creating a layer spanning from the Esc key to F12, this will be the maximum length of the layer when the song is finished.
![layer](http://i.imgur.com/dY3WU1Y.png)
### 2 - Bind the dynamic property
Next head into the layer's properties and under the dynamic section bind Width to ```Spotify -> SongPercentCompleted```
![layer props](http://i.imgur.com/wOyKwGo.png)
### 3 - Setup maximum value
Now we need to tell Artemis what the maximum value is.
This can either be a set number by setting the second dropbox to ```% of```
Or it can be another property by setting it to ```% of property```
Since the maximum value of is ```SongPercentCompleted``` 100, that's what we'll fill in. In this case we want the layer to fill up from left to right, like a progress bar, so we can leave the last dropbox as it is.
This results in the following layer:
![result](http://i.imgur.com/WWIX6M8.png)