Gets the alpha flag.
The alpha flag.
Sets the alpha flag.
The alpha flag.
Gets the antialias flag.
The antialias flag.
Sets the antialias flag.
The antialias flag.
The PlayCanvas application instance. null until the element is ready, and again once it
has been removed from the document — await whenReady or the element's ready()
promise before accessing it.
The application instance, or null.
Gets the graphics backend.
The graphics backend.
Sets the graphics backend. Defaults to 'webgpu', which falls back to 'webgl2' if WebGPU is not supported by the browser.
The graphics backend ('webgpu', 'webgl2', or 'null').
The nearest ancestor <pc-app> element, or null if this element has no <pc-app>
ancestor. The search starts at the parent, so an element never resolves to itself.
The closest app element, or null.
The nearest ancestor <pc-entity> element, or null if this element has no <pc-entity>
ancestor. The search starts at the parent, so an element never resolves to itself.
The closest entity element, or null.
Gets the depth flag.
The depth flag.
Sets the depth flag.
The depth flag.
Gets the high resolution flag.
The high resolution flag.
Sets the high resolution flag. When true, the application will render at the device's physical resolution. When false, the application will render at CSS resolution.
The high resolution flag.
Gets whether the application shows its built-in loading bar while it boots and preloads its assets.
The loading bar flag.
Sets whether the application shows its built-in loading bar while it boots and preloads its
assets. Enabled by default; setting false removes the bar immediately, while setting
true has no effect until the element is next connected. The bar can be themed with the
CSS custom properties --pc-loading-bar-color, --pc-loading-bar-background and
--pc-loading-bar-height.
The loading bar flag.
The asset preload progress of the application, as a fraction from 0 to 1. It is 0 until
preloading begins (and again once the element has been removed from the document), and 1
once preloading has finished — including when there was nothing to preload. Read this to
initialize a loading UI; subsequent updates arrive via the progress event.
The preload progress.
Gets the stencil flag.
The stencil flag.
Sets the stencil flag.
The stencil flag.
Protected_Called when the element is fully initialized and ready. Subclasses should call this when
they're ready. Resolves the ready promise and dispatches a bubbling, composed ready
event.
Returns a promise that resolves with this element when it's ready. This is the low-level primitive underlying whenReady, which is the recommended way to wait for elements.
A promise that resolves with this element when it's ready.
The AppElement interface provides properties and methods for manipulating
<pc-app>elements. The AppElement interface also inherits the properties and methods of the HTMLElement interface.Fires
progress - Fired while the application preloads its assets.
loadedandtotalare asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always hasloadedequal tototal. Does not bubble.