Asset Array
Intro
Create a list of assets that can be assigned to other Shapes via their indices.
UI
Auto Index - When checked, the layer will automatically output all indices.
Index - The index to be used from the Assets list.
Reverse - Invert the order the indices are output in. For example, where there are 3 indices 0,1,2
, their order will be reversed to 2,1,0
.
Count - Output the number of indices in the array.
- Use this button to add more rows (indices) to the UI.0: Asset - The first index in the array. Connect or drag an Asset or Assets (.svg/ .csv/ .png etc) into this attribute.
- Drag 2 .png files from Finder/Explorer into the Assets Window.
- Right click on the Group that was created on import containing the .png files and choose Create Array from Group. This will create an Asset Array with 2 indices and a .png file connected to each one.
- Create a Rectangle.
- Open the Fill tab.
- Right click on the Shaders attribute and select **Add Shader > Image Shader.
- Connect the Asset Array to the Image slot on the Image Shader.
- Select the Rectangle in the Scene Window and click on the Duplicator icon in the Shelf.
This will create a grid of 9 rectangles each with alternating images. If you wanted to randomise this sequence you could add a Random Behaviour with a Minimum of 0 and Maximum of 1 and connect it to the Index of the Asset Array.
See the Dynamic Rendering section for some examples of how this layer can be put to good use.
Double clicking on a indices' row will set the Index to that value.