diff --git a/Dynamic-properties.md b/Dynamic-properties.md new file mode 100644 index 0000000..207ed44 --- /dev/null +++ b/Dynamic-properties.md @@ -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) \ No newline at end of file