Display Scale - Scaling
This behavior allows you to drive the "scale" of an agent from another property field on the agent. This is done by specifying the endpoints of two ranges: one of the "scale" array, and one of numeric values of the driving field. This behavior automatically maps the value of the specified field to a corresponding "scale" array within the range. The scaling between the two can be specified as either linear or logarithmic.
Published by
Shortname
@hash/display_scale_scaling.js
Description

This behavior allows you to drive the "scale" of an agent from another property field on the agent. This is done by specifying the endpoints of two ranges: one of the "scale" array, and one of numeric values of the driving field. This behavior automatically maps the value of the specified field to a corresponding "scale" array within the range. The scaling between the two can be specified as either linear or logarithmic.

Agent Properties

An agent with this behavior needs the following corresponding agent properties:

{
  ...
  "scale_scaling": {
    "field": string, // the field whose values will drive the "scale" values of the agent
    "field_bounds": [number], // the endpoints of the range of expected values of the field
    "bounds": [[number]], // the endpoints of the range for the "scale" values
    "scale": string // the type of scaling - "linear" or "log"
  }
}

Since "scale" values are an array, the endpoints will each be an array of 3 values as well.