Skip to main content

<pc-screen>

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

note

Attributes

AttributeDescription
blendValueless attribute. If present, the screen component blends.
priorityThe priority of the screen component. Must be an integer between 0 and 255. If not specified, 0 is used.
reference-resolutionThe reference resolution of the screen component. Specified as a space-separated list of Width and Height values. If not specified, 640 320 is used.
resolutionThe resolution of the screen component. Specified as a space-separated list of Width and Height values. If not specified, 640 320 is used.
scale-blendThe scale blend of the screen component. Must be a number between 0 and 1. If not specified, 0.5 is used.
screen-spaceValueless attribute. If present, the screen component is 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.