Outline
Updated
Draws a colored, optionally animated outline around the entity.
- Type
comp-outline- Script class
OutlineComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Outline and silhouette: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
animation |
"none" |
|
color |
"#38bdf8" |
|
speed |
1 |
0. |
thickness |
4 |
0 ≤ x ≤ 128 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Cycle a highlight through a list with the keyboardA script adds a fading Outline to three levers and enables one at a time; each press of Tab moves the highlight to the next lever.
Click the scene, then press Tab to move the highlight to the next lever. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(OutlineComponent); if (component) log(component.props);}