Simple Z-Index Property for Draw Order Management

Currently, Rive offers robust draw order controls that allow targeting specific objects to render above or below others. This system is powerful and flexible for intricate scenarios. However, I've found that in projects with a large number of elements, layers, or nested artboards, managing draw order using only the target-based system can become quite complex and difficult to track visually. Keeping track of which object is targeted by which, especially when making changes later on, can be time-consuming and sometimes confusing.

Proposed Feature:

My suggestion is to introduce an optional, simpler draw order mechanism analogous to the z-index property commonly used in web development (CSS).

  • Each object (shape, group, component instance, etc.) could have an optional numerical property.

  • Objects would then be rendered based on this numerical value: higher numbers draw on top of lower numbers.

  • Objects without this property set, or objects with the same z-index value, could perhaps default to the current hierarchy/list order within their parent container, or follow the existing target-based rules if defined.

Benefits:

  1. Simplicity: Provides a straightforward, numerical way to control stacking order, which is very intuitive, especially for those coming from web or other design tool backgrounds.

  2. Manageability: In large documents, it would be much easier to understand and adjust the stacking order by simply looking at or changing a numerical value, rather than tracing complex targeting relationships.

  3. Efficiency: Could potentially speed up the workflow when dealing with many overlapping elements that require frequent draw order adjustments.

  4. Flexibility: This wouldn't necessarily need to replace the existing system. Perhaps they could coexist, allowing users to choose the best method for their needs, or use the z-index for general layering and the target system for specific exceptions.