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
.
Top border element / template
Top border element / template
Top border element / template
Border template
Top border element / template
Border width
Width of bottom border
Width of left border
Width of right border
Width of top border
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.
Set the children of this Element
Clipbox
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
Border color
When patched, this sets the width of all borders
Color of bottom border
Color of left border
Color of right border
Color of top border
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
Content can be any Element / Component
It is patched into the BorderComponent
Hover cursor
See the keyword values at cursor
CSS property (MDN) for valid values.
See PR #356 for more information on this feature.
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.
Height of this Element
The maximum expected texture source height.
Texture mountpoint
Texture mountpoint on horizontal axis
Texture mountpoint on vertical axis
The maximum expected texture source width.
???
Callback called after the Element's flexbox layout is updated.
Callback called before the Element's flexbox layout is updated.
Gets/sets the Pass Signals for this Component.
See Pass Signals for more information.
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
Forces 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.
Rotation 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
Set a shader on this Element
Sets the Signals for this Component.
See (Signals)[https://lightningjs.io/docs/#/lightning-core-reference/Communication/Signal?id=signal] for more information.
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
:
Image source URI
When set, this Element adopts an ImageTexture as its Texture and loads/displays the image located at the URI.
Creates a tag context
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.
Set this Element's texture
See Texture Types for more information.
Setup one or more transitions
This is the same as calling Element.transition for each property.
Defines 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.
Width of this Element
X position of this Element
Y position of this Element
Z-index
See Z-Indexing for more information.
Base strongly-typed TemplateSpec for a Component
Example
If you inherit from this, follow this example closely: