<pc-render>
The <pc-render> tag is used to define a render component that renders a 3D primitive.
Usage
- It must be a direct child of a
<pc-entity>.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
cast-shadows | Boolean | "true" | Whether the component casts shadows |
enabled | Boolean | "true" | Enabled state of the component |
material | String | - | id of a <pc-material> to render the primitive with. If omitted, a default material is used |
receive-shadows | Boolean | "true" | Whether the component receives shadows |
type | Enum | "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.