<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
Attribute | Type | Default | Description |
---|---|---|---|
alpha | Boolean | "true" | Whether the application allocates an alpha channel in the frame buffer |
antialias | Boolean | "true" | Whether the application uses anti-aliasing |
backend | Enum | "webgl2" | Graphics engine backend: "webgpu" | "webgl2" | "null" |
depth | Boolean | "true" | Whether the application allocates a depth buffer |
high-resolution | Boolean | "true" | Whether to render using physical resolution or CSS resolution |
stencil | Boolean | "true" | Whether the application allocates a stencil buffer |
Example
JavaScript Interface
You can programmatically create and manipulate <pc-app>
elements using the AppElement API.