ComponentProperty class
The properties of a component that can be animated.
Signature:
export declare abstract class ComponentProperty
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
BoundsOffset |
| (not declared) | The translation of the component's bounds from the layout defined position, in viewport pixels. This is retained when the component is reused in another layout. |
BoundsSizeDelta |
| (not declared) | The change in the size of the component's bounds from its original size, in viewport pixels, applied around its pivot point defined in the layout. This is retained when the component is reused in another layout. |
ColorTint |
| (not declared) | A tint color applied to the component's contents. This is multiplied with the color of the content pixels. |
ContentRotation |
| (not declared) | The rotation applied to the component's contents around its center, expressed as an angle in degrees (positive is counterclockwise). |
ContentScale |
| (not declared) | The scale applied to the component's contents around its center. This is applied in addition to the content scale mode specified by calling Component.setContentScaleMode(). |
ContentTranslation |
| (not declared) | The translation of the component's contents, in viewport pixels. |
MaskRotation |
| (not declared) | The rotation applied to the component's mask around its center, expressed as an angle in degrees (positive is counterclockwise). Has no effect when the component does not have a mask. |
MaskScale |
| (not declared) | The scale applied to the component's mask around its center. |
MaskTranslation |
| (not declared) | The translation of the component's mask, in viewport pixels. Has no effect when the component does not have a mask. |
ComponentProperty.BoundsOffset property
The translation of the component's bounds from the layout defined position, in viewport pixels. This is retained when the component is reused in another layout.
Signature:
static readonly BoundsOffset = 0;
ComponentProperty.ColorTint property
A tint color applied to the component's contents. This is multiplied with the color of the content pixels.
Signature:
static readonly ColorTint = 8;
Remarks
The value is specified as a hex string or and object with r/g/b/a properties. It can have an alpha value which can be used e.g. for fading effects.
ComponentProperty.BoundsSizeDelta property
The change in the size of the component's bounds from its original size, in viewport pixels, applied around its pivot point defined in the layout. This is retained when the component is reused in another layout.
Signature:
static readonly BoundsSizeDelta = 1;
ComponentProperty.ContentRotation property
The rotation applied to the component's contents around its center, expressed as an angle in degrees (positive is counterclockwise).
Signature:
static readonly ContentRotation = 4;
ComponentProperty.ContentScale property
The scale applied to the component's contents around its center. This is applied in addition to the content scale mode specified by calling Component.setContentScaleMode().
Signature:
static readonly ContentScale = 3;
Remarks
The value of this property can be specified as a number or a Vector2 with x and y values. If a number is specified it will be applied to both x and y.
ComponentProperty.ContentTranslation property
The translation of the component's contents, in viewport pixels.
Signature:
static readonly ContentTranslation = 2;
ComponentProperty.MaskRotation property
The rotation applied to the component's mask around its center, expressed as an angle in degrees (positive is counterclockwise). Has no effect when the component does not have a mask.
Signature:
static readonly MaskRotation = 7;
ComponentProperty.MaskScale property
The scale applied to the component's mask around its center.
Signature:
static readonly MaskScale = 6;
Remarks
If the mask was applied with ComponentMaskOptions.preserveAspect set to true, this will be applied in addition to any scaling needed to maintain the aspect ratio. Has no effect when the component does not have a mask.
The value of this property can be specified as a number or a Vector2 with x and y values. If a number is specified it will be applied to both x and y.
ComponentProperty.MaskTranslation property
The translation of the component's mask, in viewport pixels. Has no effect when the component does not have a mask.
Signature:
static readonly MaskTranslation = 5;
Updated 7 months ago