Table of Contents
Extends: Node
Description
Group is the base class of all renderable nodes. Group also provides fields that control the transformation, visibility and opacity of themselves and all of their children.
Each Group defines a local coordinate system relative to the coordinate system of its parent node. A 2D matrix that describes how points in the local coordinate system can be transformed into the parent node coordinate system is constructed from the values of the translation
, rotation
, scale
, and scaleRotateCenter
fields.
The 2D matrix is computed using the values of these four fields in the following order:
- translating by the negative of the
scaleRotateCenter
field value - scaling by the the
scale
field value - rotating by the
rotation
field value - translating by the the
scaleRotateCenter
field value - translating by the
translation
field value
In matrix math terms, the overall 2D matrix is:
M = C(-1) S R C T
Where:
- M is the total matrix
- C is a 2D translation matrix that describes the location of the scale/rotation center in the node's local coordinate system
- C(-1) is the inverse of C
- S is a 2D scaling matrix
- R is a 2D rotation matrix
- T is a 2D translation matrix
Fields
Field | Type | Default | Use | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
visible | Boolean | true | If true, the node and its children are rendered. If false, the node and its children do not render. | ||||||||
opacity | float | 1.0 | Sets the opacity of the node and its children. Opacity is the opposite of transparency. Opacity values range from 0.0 (fully transparent) to 1.0 (fully opaque). As the SceneGraph is traversed, the opacity values are combined by multiplying the current accumulated opacity with the node opacity, so that if the accumulated opacity of a node ancestors is 0.25 (75% transparent), the node will have opacity of 0.25 or less. This allows entire branches of the SceneGraph to fade in and out by animating the opacity of the node at the root of the branch. | ||||||||
translation | vector2d | [0.0,0.0] | Defines the origin of the node local coordinate system relative to its parent node. | ||||||||
rotation | float | 0.0 | Defines the rotation angle about the scaleRotateCenter point (in radians) of the node local coordinate system. Positive values specify a counterclockwise rotation, negative values specify a clockwise rotation. For some Roku Player hardware, specifically Roku Players without OpenGL graphics support, only rotations of 0, 90, 180 and 270 degrees (in equivalent radians) are supported. (See Roku Models and Features for information on OpenGL support.) | ||||||||
scale | vector2d | [1.0,1.0] | Defines the scale factor to be applied to the node local coordinate | ||||||||
scaleRotateCenter | vector2d | [0.0,0.0] | Describes the location of a point in the node local coordinate that serves as the center of the scale and rotation operations | ||||||||
childRenderOrder | option as string | "renderLast" |
| ||||||||
inheritParentTransform | Boolean | true | If true, the node overall transformation is determined by combining the accumulated transformation matrix of all of its ancestors in the SceneGraph with the node local 2D transformation matrix described by its translation , rotation , scale and scaleRotateCenter fields. If false, the accumulated transformation of all of its ancestors in the SceneGraph is ignored and only the node local transformation matrix is used. This causes the node to be transformed relative to the root of the SceneGraph (that is, the Scene component). | ||||||||
inheritParentOpacity | Boolean | true | If true, the node opacity is determined by multiplying opacity attribute of the node by the opacity of the parent node, which may have been determined by multiplying the opacity of its ancestor nodes. If false, the node opacity is determined by the opacity attribute set for the node or the default opacity attribute value. | ||||||||
clippingRect | array of float | [ 0.0, 0.0, 0.0, 0.0 ] | Specifies a rectangle in the node local coordinate system that is used to limit the region where this node and its children can render. If a non-empty rectangle is specified, then all drawing by this node and its children will be limited to that rectangular area.
| ||||||||
renderPass | integer | 0 | Used in combination with the numRenderPasses field of nodes extended from the ArrayGrid abstract node class, to optimize rendering of lists and grids. This should never be set to a non-zero value unless you are optimizing the performance of a list or grid rendering by specifying the sequence of rendering operations for sub-elements of the list or grid items, and have set the numRenderPasses field value for the list or grid to a value greater than 1. If the numRenderPasses field value for the list or grid is set to a value greater than 1, you must set this field to a value greater than 0 for all sub-elements of the list or grid items, and not greater than the numRenderPasses field value. If the numRenderPasses field is set to a value greater than 1, and you set this field for a list or grid item sub-element to 0 (the default), or a value greater than the numRenderPasses field value, the list or grid item sub-element will not render. | ||||||||
muteAudioGuide | Boolean | false | Set to Available since firmware v7.5 | ||||||||
enableRenderTracking | Boolean | false | If true, renderTracking will be set to a string describing how much of the node is rendered on screen. Available since firmware v7.6 | ||||||||
renderTracking | option as string | "disabled" | renderTracking is set to
Available since firmware v7.6 |