Readonly
__$type_Readonly
activeActive State
Defines the opacity of this Element and its descendants. This can be any number
between 0.0
(0% opacity) and 1.0
(100% opacity).
0.0
:
1.0
(default):
The visible property takes prescendence over alpha
.
Readonly
attachedAttached State
Sets a Bounds Margin for this Element.
Format:
[left margin, top margin, right margin, bottom margin]
null
(default):
Note: If no bounds margins are set in the render tree, the default on all
sides is 100
.
The Bounds Margin influences whether an Element will be rendered as if it were
on screen. If the Bounds Margin is 0
on all sides, then this Element will only be
rendered if exactly any part of it's rectangle is potentially visible on screen. Adding
to the Bounds Margin allows an Element to be rendered as it gets closer to becoming
visible on screen.
Readonly
childClipbox
Defines whether clipping should be turned on or off for this element
true
:
false
(default):
Setting this property might increase the performance, as descendants outside the clipping region are detected and not rendered.
Clipping is implemented using the high-performance WebGL operation scissor. As a
consequence, clipping does not work for non-rectangular areas. So, if the Element
is rotated (by itself or by any of its ancestors), clipping is not applied. In such
situations, you can use the advanced renderToTexture
property which applies clipping
as a side effect.
Mouse pointer collision
If set true
, then it allows a Mouse Pointer
to click/hover over this Element.
Rectangle Color
This and the other color*
properties are used to change the color of the
Element when rect is set to true
.
This property sets all of the corners/sides to the same color.
The color value is expressed as an ARGB hexadecimal value:
A R G B
| | | |
0xffeeddcc
Bottom-left Corner Rectangle Color
Bottom Side Rectangle Color
Bottom-right Corner Rectangle Color
If set to true
, applies a colorization effect to the resulting texture when rtt is on.
This property has no effect if rtt is not enabled.
Left Side Rectangle Color
Right Side Rectangle Color
Top Side Rectangle Color
Upper-left Corner Rectangle Color
Upper-right Corner Rectangle Color
Readonly
coreHover cursor
See the keyword values at cursor
CSS property (MDN) for valid values.
See PR #356 for more information on this feature.
Readonly
displayedThe currently displayed texture. While this.texture is loading, this one may be different.
Readonly
enabledEnabled State
Readonly
finalHIf flexbox is enabled for this Element, contains the final height of the Element after the layout update operation has been done.
See Flexbox - Final Coordinates for more information.
Readonly
finalWIf flexbox is enabled for this Element, contains the final width of the Element after the layout update operation has been done.
See Flexbox - Final Coordinates for more information.
Readonly
finalXIf flexbox is enabled for this Element, contains the final X position of the Element after the layout update operation has been done.
See Flexbox - Final Coordinates for more information.
Readonly
finalYIf flexbox is enabled for this Element, contains the final Y position of the Element after the layout update operation has been done.
See Flexbox - Final Coordinates for more information.
Flexbox container properties
See Flexbox documentation for more information.
Flexbox item properties
See Flexbox documentation for more information.
Forces a new z-index context for children of this Element.
See Z-Indexing for more information.
Readonly
isThe maximum expected texture source height.
Texture mountpoint
Texture mountpoint on horizontal axis
Texture mountpoint on vertical axis
The maximum expected texture source width.
??? (make sure matches literal version)
Callback called after the Element's flexbox layout is updated.
Callback called before the Element's flexbox layout is updated.
Readonly
pAlias of parent
Readonly
parentParent Element of this Element
Rotational Pivot Position
Controls the pivot that the rotation property rotates around along
both the horizontal and vertical axis. Can be any floating point number between
0.0
and 1.0
.
Examples
0.0
= top-left0.5
(default) = center1.0
= bottom-rightRotational Pivot Position (horizonal axis)
Controls the pivot that the rotation property rotates around along
the horizontal axis. Can be any floating point number between 0.0
and 1.0
.
Examples
0.0
= left0.5
(default) = center1.0
= rightRotational Pivot Position (vertical axis)
Controls the pivot that the rotation property rotates around along
both the vertical axes. Can be any floating point number between 0.0
and 1.0
.
Examples
0.0
= top0.5
(default) = center1.0
= bottomRectangle texture mode
When set, this Element adopts a RectangleTexture as its Texture
and displays a rectangle colored by the various color*
properties.
Cannot be set at the same time as src or text.
See Texture Types for more information.
Element's reference key
Readonly
renderForces the Element's contents to be rendered to an offscreen frame buffer. If set to true
,
the Element will not be drawn onto the screen.
You can use this offscreen texture as a sampler for drawing other elements. So, renderToTexture must be set to true for this to work.
Readonly
renderRotation Transform (in radians)
If set to true
, enables Render-to-Texture mode on this Element
Determines if the texture is always updated or only when necessary
Scale Tranform
Scale Horizontal Tranform
Scale Vertical Tranform
Image source URI
When set, this Element adopts an ImageTexture as its Texture and loads/displays the image located at the URI.
Readonly
stageApplication's Global Stage
Creates a tag context
Readonly
texturizerDefines the visibility of this Element and its descendents.
true
(default):
false
:
If an element is invisible, the off-screen Elements are invisible as well, so you do not have to hide those manually to maintain a good performance.
This property takes prescendence over the alpha property.
Readonly
withintrue
if Element is within the bounds margin
Z-index
See Z-Indexing for more information.
Set/get the children of this Element
Set the children of this Element
Height of this Element
Height of this Element
Get/set a shader of/on this Element
Set a shader on this Element
Starts a smooth transition for all the included properties of the object
This is the same as calling Element.setSmooth for each property.
For each property:
number
:
WARNING: DO NOT read from this property. It is WRITE-ONLY. It will always return undefined
.
Text settings / texture
Text settings / texture
When set, the Element adopts a TextTexture
and renders the text / settings
laid out in this property.
Cannot be set at the same time as rect or src.
See Texture Types for more information.
Get/set the Element's texture
See Texture Types for more information.
Set this Element's texture
See Texture Types for more information.
Setup one or more transitions
WARNING: DO NOT read from this property. It is WRITE-ONLY. It will always return undefined
.
See Transitions for more information.
Width of this Element
Width of this Element
X position of this Element
X position of this Element
Y position of this Element
Y position of this Element
Add element to end of this Element's childList
Add element to end of this Element's childList
Add element to end of this Element's childList
Add element to end of this Element's childList
Attach an animation to this Element
See Animations for more information.
Synchronously calls each of the listeners registered for the event named name
,
in the order they were registered, passing the supplied arguments to each.
Sets the TextTexture on this Element, replacing any already set texture
Fast-forward a currently transitioning property
to its target value
immediately.
Gets the ancestor of this Element that is l
levels back.
Number of levels to go back
Gets the ancestor of this Element that has the depth of depth
in the render tree.
depth
=== 0
:
depth
=== 1
:
depth
=== this.getDepth()
Depth in the render tree from the root Element
Gets an array of this Element's ancestors (including this Element).
Order:
[
This Element,
This Element's Parent,
This Element's Grandparent,
... And so on
]
Get child directly by ref name
Get the corner points of this Element
Format:
[
topLeftX, topLeftY,
topRightX, topRightY,
bottomRightX, bottomRight,
bottomLeftX, bottomLeftY
]
Get Settings object representing this Element
Gets the first common ancestor Element that this Element and another Element c
share.
Element to find common ancestor with
Get the current target value of an active transition.
property
is not actively transitioning:
value
, if provided.undefined
.Get the current target value of an active transition.
property
is not actively transitioning:
value
, if provided.undefined
.Returns true
if the listeners array for the event named name
includes listener
Returns true if this Element is an ancestor of Element c
Element to test
Load the texture that was set by Element.TemplateSpec.texture
Returns all Elements from the subtree that have this tag.
Removes the specified listener from the listener array for the event named name
.
Adds the listener function to the end of the listeners array for the event named name
.
Adds a one-time listener function for the event named name
. The next time name
is triggered, this listener is removed and then invoked.
Patches settings of this Element plus child Elements of the render tree.
See Patching for more information.
Alias for off
Start a smooth transition of property
to the target value
. Optionally
you may provide transition settings
. If settings
is not provided the
default transition will be used.
Property to transition
Target value
Optional
settings: Lightning.types.TransitionSettings.LiteralTransition settings
Returns one of the Elements from the subtree that has this tag path.
.
separated tag path
Using getByRef may be slightly more performant, but only works one level at a time.
In strongly typed Components, only fully qualified paths are supported in a type-safe way
(i.e. 'MyChild.MyGrandChild.MyGreatGrandChild'). If you'd like to reference a deep element
by its ref name (i.e. just 'MyGreatGrandChild') you can opt into this by asserting as any
:
// No error and is typed
this.tag('MyChild.MyGrandChild.MyGreatGrandChild')
// Needs `any` assertion and is typed as `any`
this.tag('MyGreatGrandChild' as any)
See Tags for more information.
Get/set Transition for property
This method has 2 overloads:
settings
param is provided:
settings
for property
settings
param is NOT provided:
property
See Transitions for more information.
Get/set Transition for property
Transition settings to configure property
with in this Element (optional)
This method has 2 overloads:
settings
param is provided:
settings
for property
settings
param is NOT provided:
property
See Transitions for more information.
Static
add
Phantom type that holds the LiteralType.
NOT AVAILABLE AT RUNTIME.