Skip to main content

<pc-screen>

The <pc-screen> tag is used to define a screen component.

Usage

Attributes

AttributeTypeDefaultDescription
blendFlag-Whether to enable alpha blending
enabledBoolean"true"Enabled state of the component
priorityNumber"0"Rendering priority (0-255)
reference-resolutionVector2"640 320"Reference resolution as "Width Height" values
resolutionVector2"640 320"Screen resolution as "Width Height" values
scale-blendNumber"0.5"Scale blending factor (0-1)
screen-spaceFlag-Whether to render in screen space

Example

<pc-entity>
<!-- define a 2d screen -->
<pc-screen></pc-screen>
<!-- render some text on the parent screen -->
<pc-entity>
<pc-element type="text" asset="arial" text="Hello, World!"></pc-element>
</pc-entity>
</pc-entity>

JavaScript Interface

You can programmatically create and manipulate <pc-screen> elements using the ScreenComponentElement API.