Fits

data class Fits(val instances: Int, val exact: Boolean) : RenderCost

The surface fits, and drawing it composes instances component instances.

Parameters

exact

whether instances is the count itself rather than a bound on it. It is the count whenever the traversal met no ChildReference.Template: every other reference names a fixed number of children, so counting the paths is counting the instances. A template is the one place the components stop saying, because how many instances it yields is the agent's data model talking -- so a surface holding one is reported as fitting, and not as exact.

The distinction is what lets a renderer stop dividing. An estimate that is exact and fits has already proved the whole subtree composes within the bound, so a budget carried down it can only take children away from a surface that was never going to exceed anything.

Constructors

Link copied to clipboard
constructor(instances: Int, exact: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard