The clear color of the camera.
The clear color buffer of the camera.
The depth value the depth buffer is cleared to. Defaults to 1.
The clear depth buffer of the camera.
The clear stencil buffer of the camera.
Whether the clipping planes of the camera clip only what is behind all of them, in place of what is behind any of them. Two planes then cut out a wedge, and three a corner. Defaults to false.
The planes, in world space, that clip everything the camera renders. They clip as a section view does: what is behind a plane, on the side its normal points away from, is not rendered. The planes do not clip shadows or screen space elements. Up to 8 planes are used. The planes are copied, so assign the array again to apply a change to one. Defaults to no planes.
The cull faces of the camera.
The far clip distance of the camera.
The flip faces of the camera.
The field of view of the camera.
The frustum culling of the camera.
The gamma correction of the camera.
Whether the camera's field of view (fov) is horizontal or vertical. Defaults to false, which is vertical.
The near clip distance of the camera.
The orthographic height of the camera.
The priority of the camera.
The projection of the camera. Can be perspective or orthographic. Use orthoHeight to
size an orthographic projection.
The offset of the projection window from the view direction. It gives an off-center (shift
lens) projection, in half-frustum units: 0 1 moves the window up by half the frustum
height. Keeping the camera level and shifting the window frames a tall subject with its
verticals parallel. Applies to both projections and is ignored in XR. Defaults to 0 0.
The rect of the camera.
Whether the camera renders a copy of the scene's color for its materials to sample, which
refractive materials - such as glTF materials with transmission - need to show what is
behind them. The copy is made every frame, so leave it off unless a material uses it. A
camera rendered through the cameraFrame script takes this from that script's
rendering.sceneColorMap instead. Defaults to false.
The scissor rect of the camera.
The tone mapping of the camera. Can be none, linear, filmic, hejl, aces, aces2,
neutral, agx or agx-punchy. Defaults to linear, which applies the scene exposure and
nothing else; none skips the exposure too. agx gives a neutral, flat look that suits
color grading, and agx-punchy raises its contrast and saturation.
Whether immersive AR is available. Independent of vrAvailable: a device can offer either mode without the other.
Whether immersive AR is available.
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 element that fronts an entity — <pc-entity>, <pc-model> or
<pc-node> — or null if this element has no such ancestor. The search starts at the
parent, so an element never resolves to itself.
The closest entity-fronting element, or null.
Gets the underlying PlayCanvas camera component. null until the element is
ready — see ComponentElement.component.
The camera component, or null.
Gets the enabled state of the component.
The enabled state of the component.
Sets the enabled state of the component.
The enabled state of the component.
Whether immersive VR is available. Independent of arAvailable: a device can offer either mode without the other.
Whether immersive VR is available.
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. Signals at most once per readiness cycle: a repeat call before _resetReady
has re-armed the promise does nothing.
Protected_Returns the ready promise to its pending state. Subclasses should call this when the
resource their readiness announced is torn down (typically from disconnectedCallback),
so that a later re-initialization can signal readiness again. Does nothing while the
promise is still pending — an in-flight waiter carries over to the next readiness cycle
rather than being stranded on a promise nothing will ever resolve.
Ends the camera's XR mode.
ProtectedgetReturns the data the component is created with: the value of every attribute in the
subclass's schema. Overridden by subclasses that cache their properties themselves, to
supply those. The element's enabled state is not among them: the base class adds it when
it creates the component.
The initial component data.
ProtectedinitConfigures the newly added component. Overridden by subclasses whose setup goes beyond the initial data — child-element handling, asset resolution and the like.
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.
Readiness tracks the element's current lifecycle: once a ready element is torn down (for example by removing it from the document), this returns a fresh promise that resolves when the element is next ready. A promise obtained earlier stays resolved — call this again after re-inserting an element rather than reusing a promise from before its removal.
A promise that resolves with this element when it's ready.
Starts the camera in XR mode.
The type of XR mode to start.
The space to start the camera in.
The CameraComponentElement interface provides properties and methods for manipulating
<pc-camera>elements. The CameraComponentElement interface also inherits the properties and methods of the HTMLElement interface.Engine component: CameraComponent (
camera).