Frame
Updated
A flat picture frame around a media surface.
- Type
comp-frame- Script class
FrameComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Frames and links: 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 |
|---|---|---|
gap |
- |
|
offset |
- |
|
opacity |
0 ≤ x ≤ 1 |
|
repeat |
1 ≤ x ≤ 16 |
|
thickness |
0 ≤ x ≤ 1000 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Highlight a picture on hoverA framed picture whose frame turns gold and thickens while the pointer is over it: an Image with a Frame, a Selectable and a Signal Emitter, restyled by a Behavior script.
Move the pointer over the picture and away. 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(FrameComponent); if (component) log(component.props);}