The elements at the top of every document: <pc-app>, which creates the application and the
canvas it renders into, the <pc-scene> it renders, and the <pc-sky> behind that scene.
The elements declared directly under <pc-app> for the scene to draw on: <pc-asset> and
<pc-material>, which other elements reference by id, and <pc-wasm>, which loads a
WebAssembly module the engine needs before the application starts.
The elements that front an engine entity and host component elements. <pc-entity> and
<pc-model> create their entity; <pc-node> binds to one inside the hierarchy a model
instantiated.
The elements that add an engine component to the entity above them, and the repeatable children
three of them take: <pc-anim-clip> under <pc-anim>, <pc-script-instance> under
<pc-script> and <pc-sound-slot> under <pc-sound>.
The classes the elements extend. None registers a tag of its own; each holds the members the
elements of its kind inherit, such as ready(), closestApp, entity and component.
Helpers for driving the elements from JavaScript. whenReady waits for an element to finish
initializing and resolves with it.
The
@playcanvas/web-componentspackage provides a set of custom HTML elements for building 3D web apps with the PlayCanvas Engine. The elements are normally authored declaratively in HTML, which the User Manual covers. This reference covers their JavaScript API: the element classes, whose properties mirror their attributes and expose the engine objects behind them, and the whenReady function that waits for an element to finish initializing.