Components – Aspire Only: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
===.IsTilted=== | ===.IsTilted=== | ||
'''Interaction:''' Read Only | '''Interaction:''' Read Only | ||
'''Returns:''' (bool) true if the component is tilted | '''Returns:''' (bool) true if the component is tilted | ||
===.UseTilt=== | ===.UseTilt=== | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) Is the component using tilt | '''Returns:''' (bool) Is the component using tilt | ||
===.IsFaded=== | ===.IsFaded=== | ||
'''Interaction:''' Read Only | '''Interaction:''' Read Only | ||
'''Returns:''' (bool) true if the component is faded | '''Returns:''' (bool) true if the component is faded | ||
===.UseFade=== | ===.UseFade=== | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) Is the component using fade | '''Returns:''' (bool) Is the component using fade | ||
==Methods== | ==Methods== | ||
Line 58: | Line 58: | ||
===:SetTilt(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)=== | ===:SetTilt(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)=== | ||
'''Returns:''' (bool) true if the component was tilted successfully | '''Returns:''' (bool) true if the component was tilted successfully | ||
anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction tilt_angle(double) The angle to tilt at in degrees | anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction tilt_angle(double) The angle to tilt at in degrees | ||
===:GetTiltData(Point2D anchor_pt, Point2D direction_pt)=== | ===:GetTiltData(Point2D anchor_pt, Point2D direction_pt)=== | ||
'''Returns:''' the tilt angle and the passed points are updated to contain the components tilt anchor and directions points | '''Returns:''' the tilt angle and the passed points are updated to contain the components tilt anchor and directions points | ||
anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction | anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction | ||
Line 70: | Line 70: | ||
===:FadeWouldChange(Point2D anchor_pt, Point2D direction_pt, double end_fade_val, bool do_fade)=== | ===:FadeWouldChange(Point2D anchor_pt, Point2D direction_pt, double end_fade_val, bool do_fade)=== | ||
'''Returns:''' (bool) true if the parameters would change the current fade | '''Returns:''' (bool) true if the parameters would change the current fade | ||
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade do_fade(bool) If true we want to apply a fade | anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade do_fade(bool) If true we want to apply a fade | ||
===:SetFade(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)=== | ===:SetFade(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)=== | ||
'''Returns:''' (bool) true if the component was faded successfully | '''Returns:''' (bool) true if the component was faded successfully | ||
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade | anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade | ||
===:GetFadeData(Point2D anchor_pt, Point2D direction_pt)=== | ===:GetFadeData(Point2D anchor_pt, Point2D direction_pt)=== | ||
'''Returns:''' the end fade value and the passed points are updated to contain the components fade anchor and directions points | '''Returns:''' the end fade value and the passed points are updated to contain the components fade anchor and directions points | ||
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction | anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction | ||
Line 86: | Line 86: | ||
===:GetRelief()=== | ===:GetRelief()=== | ||
'''Returns:''' the Relief for the component. If the component is a ComponentGroup then this will return nil. Please note any changes made to this relief will affect the appearance of any other components that reference this Relief | '''Returns:''' the Relief for the component. If the component is a ComponentGroup then this will return nil. Please note any changes made to this relief will affect the appearance of any other components that reference this Relief | ||
[[File:Back.jpg|right|50px|link=Aspire Only]] | [[File:Back.jpg|right|50px|link=Aspire Only]] | ||
==References== | ==References== | ||
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information] | '''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information] |
Latest revision as of 17:51, 1 May 2024
This object is the base class for all the different types of components managed by the ComponentManager. There are two classes of Component available to Lua; Component itself and ComponentGroup. Components reference the Reliefs that were used to create them. It is possible to have multiple Components referring to the same original Relief and this should be kept in mind while manipulating Component data.
Properties
.Id
Interaction: Read Only
Returns: (UUID) the id of the component
.CombineMode
Interaction: Read and Write
Note: The combine mode of the component
.IsTilted
Interaction: Read Only
Returns: (bool) true if the component is tilted
.UseTilt
Interaction: Read and Write
Returns: (bool) Is the component using tilt
.IsFaded
Interaction: Read Only
Returns: (bool) true if the component is faded
.UseFade
Interaction: Read and Write
Returns: (bool) Is the component using fade
Methods
:Transform(Matrix2D xform, bool update_all)
Tranforms the component xform(Matrix2D)The transform update_all (bool) Update the entire bounds of the component tree
:SetZScaleAuto(bool auto_scale)
Determine whether transforming the component using:Transform() will automatically scale it in the Z axis, as well. auto_scale(bool) Flag which determine whether Z is scaled.
:SetZOffset(float z_offset)
Set the Z offset of the component
z_offset (float) The amount by which to offset the component
:SetZScale(float scale)
Scale the Z heights of the component
scale (float) The amount by which to scale the heights of the component
:TiltWouldChange(Point2D anchor_pt, Point2D direction_pt, double tilt_angle, bool do_tilt)
Returns: (bool) true if the parameters would change the current tilt anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction tilt_angle(double) The angle to tilt at in degrees do_tilt (bool) If true we want to apply a tilt
:SetTilt(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)
Returns: (bool) true if the component was tilted successfully
anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction tilt_angle(double) The angle to tilt at in degrees
:GetTiltData(Point2D anchor_pt, Point2D direction_pt)
Returns: the tilt angle and the passed points are updated to contain the components tilt anchor and directions points
anchor_pt(Point2D)Start of vector determining tilt direction direction_pt (Point2D) End of vector determining tilt direction
local anchor_pt = Point2D() local direction_pt = Point2D() local tilt_angle = component:GetTiltData(anchor_pt, direction_pt)
:FadeWouldChange(Point2D anchor_pt, Point2D direction_pt, double end_fade_val, bool do_fade)
Returns: (bool) true if the parameters would change the current fade
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade do_fade(bool) If true we want to apply a fade
:SetFade(Point2D anchor_pt, Point2D direction_pt, double tilt_angle)
Returns: (bool) true if the component was faded successfully
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction end_fade_val(double) The final value of the fade
:GetFadeData(Point2D anchor_pt, Point2D direction_pt)
Returns: the end fade value and the passed points are updated to contain the components fade anchor and directions points
anchor_pt(Point2D)Start of vector determining fade direction direction_pt (Point2D) End of vector determining fade direction
local anchor_pt = Point2D() local direction_pt = Point2D() local tilt_angle = component:GetTiltData(anchor_pt, direction_pt)
:GetRelief()
Returns: the Relief for the component. If the component is a ComponentGroup then this will return nil. Please note any changes made to this relief will affect the appearance of any other components that reference this Relief
References
Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information