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
receive-shadowsBoolean"true"Whether the component receives shadows
typeEnum"asset"Primitive shape to render: "box" | "capsule" | "cone" | "cylinder" | "plane" | "sphere". The default, "asset", renders a render asset instead of a primitive

Example

JavaScript Interface

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