Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Rect (Legacy)

  • Last UpdatedDec 16, 2023
  • 3 minute read

The Rect node is a 2D node that can be combined together to create a complex interface to present to the user in overlay.

Note: The legacy 2D nodes hierarchy has been replaced with a new and better performing hierarchy: 2D nodes. You should no longer use these older 2D nodes, except for very specific tasks.

Use the Rect node to display:

  • A colored rectangle

  • An image

  • A movie

  • A Spout received channel

The Rect node inherits from RectBase (Legacy).

Platform support

This node is supported on XR-Windows platform only.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

No support

No support

No support

No support

Full support

No support

No support

No support

No support

Supported content types

The Rect node supports these content types in the images field.

Content type

Description

images

.png, .tga, .dds, .gif

Texture2D nodes

with the syntax: internal:texture2DNodeName

The Rect node supports these content types in the movie field.

Content type

Description

movies

.ogg .ogv

Spout received channels

with the syntax:

_SpoutST@channelName (for singlethread receivers) _SpoutMT@channelName (for multithread receivers)

Code example

This is a code example for the Rect node.

<rect name="menu" image="menu_fondo.png" show="false" position="1152 672" center="256 384" size="512 512" scale="0.5 0.5">

<button name="buttonZoomOut" show="true" position="112 256" center="64 64" size="128 128" propagateMouse="false">

<rect image="menu_zoom_out_off.png" order="2" opacity="1" size="128 128" />

<rect image="menu_zoom_out_on.png" order="2" opacity="1" size="128 128" />

</button>

<button name="buttonZoomIn" show="true" position="388 256" center="64 64" size="128 128" propagateMouse="false">

<rect image="menu_zoom_in_off.png" order="2" opacity="1" size="128 128" />

<rect image="menu_zoom_in_on.png" order="2" opacity="1" size="128 128" />

</button>

</rect>

Position

The 2D nodes can be positioned inside a context node, such as Context or Global, or be children of other 2D nodes.

Fields

These are the parameters for Rect (Legacy) node. Only the node-specific fields are indicated, not fields obtained by inheritance.

Field inheritance: NodeBase > RectBase (Legacy) > Rect

Fields

Type

Use

Default value

Description

bilinear

sbool

Optional

true

Specifies whether to use bilinear filtering when scaling the image.

color

svec4

Optional

1 1 1 1

If no image or movie is set, use this field to define RGBA color.

image

sstring

Optional

Not set

The name of the image to display.

isMoviePlaying

sbool

Read only

Not set

Checks whether the movie is playing.

movie

sstring

Optional

Not set

The name of the video to display or the name of a spout movie texture.

movieLoop

sbool

Optional

false

When set to true, the movie runs in a loop.

moviePlay

sevent

Optional

Not set

Starts playing the movie.

moviePause

sevent

Optional

Not set

Pauses the movie.

movieStop

sevent

Optional

Not set

Stops the movie.

opacity

sfloat

Optional

1

Sets the Rect opacity in the range 0-1.

uv0

svec2

Optional

0 0

Defines the top left normalized uv coordinate for texturing. Seldom modified.

uv1

svec2

Optional

1 1

Defines the bottom right normalized uv coordinate for texturing. Seldom modified.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in