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.

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

Attributes

AttributeTypeDefaultDescription
alphaBoolean"true"Whether the application allocates an alpha channel in the frame buffer
antialiasBoolean"true"Whether the application uses anti-aliasing
backendEnum"webgl2"Graphics engine backend: "webgpu" | "webgl2" | "null"
depthBoolean"true"Whether the application allocates a depth buffer
high-resolutionBoolean"true"Whether to render using physical resolution or CSS resolution
stencilBoolean"true"Whether the application allocates a stencil buffer

Example

JavaScript Interface

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