Appearance
types/tween.proto
Table of Contents
types/tween.proto
Tween
An in-progress transition between two values. The values themselves should be defined in an enclosing message.
Typically an enclosing message will define three properties, the value, the tween, and the target value.
Example definition
message WaterHeight { // The current or expected height of water, in meters float height = 1; // Describe how the height changes or should change over time Tween height_tween = 2; // Read-only, the target height at the end of a transition float target_height = 3; }
Field | Type | Label | Description |
---|---|---|---|
progress | float | Read-only [0-100], how far along the transition (in time) are we. | |
total_duration | google.protobuf.Duration | how long the transition will last in total |
TweenSupport
Denote different types of tween support. Clients may use this to control performance sensitive areas by enabling or disabling tweening when support is not native, for example
Name | Number | Description |
---|---|---|
TWEEN_SUPPORT_UNSPECIFIED | 0 | Tween support is not specified. |
NO_SUPPORT | 1 | The device does not support tweening |
NATIVE | 2 | The device natively supports tweening. Natively typically means with minimal performance impact (i.e. no network) |
EMULATED | 3 | The device supports tweening via emulation. Typically tweening is implemented by the Smart Core driver or a supervisor node and not the device itself. |
FIXED | 4 | The device tweens values, but the duration or rate is fixed and cannot be adjusted. For example a motor might only have one speed when operating an adjustable desk |