Skip to main content

<pc-app>

The <pc-app> tag is the root element for your PlayCanvas application. It is used to initialize the PlayCanvas application and provide a container for your scene.

note
  • It must be a descendant of the document's body element.

Attributes

AttributeDescription
alphaBoolean attribute. Determines whether the application allocates an alpha channel in the frame buffer. Defaults to true.
antialiasBoolean attribute. Determines whether the application uses anti-aliasing. Defaults to true.
depthBoolean attribute. Determines whether the application allocates a depth buffer. Defaults to true.
high-resolutionBoolean attribute. Determines whether the application renders using physical resolution or CSS resolution. Defaults to true.
stencilBoolean attribute. Determines whether the application allocates a stencil buffer. Defaults to true.

Example

JavaScript Interface

You can programmatically create and manipulate <pc-app> elements using the AppElement API.