Skip to main content

<pc-render>

The <pc-render> tag is used to define a render component that renders a 3D primitive.

Usage

Attributes

AttributeTypeDefaultDescription
cast-shadowsBoolean"true"Whether the component casts shadows
enabledBoolean"true"Enabled state of the component
materialString-id of a <pc-material> to render the primitive with. If omitted, a default material is used
receive-shadowsBoolean"true"Whether the component receives shadows
typeEnum"box"Primitive shape to render: "box" | "capsule" | "cone" | "cylinder" | "plane" | "sphere"
tip

To render a 3D model from a glTF/GLB file, use <pc-model> instead.

Example

JavaScript Interface

You can programmatically create and manipulate <pc-render> elements using the RenderComponentElement API.