Skip to content

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.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
gap -1000 ≤ x ≤ 1000
offset -100 ≤ x ≤ 100
opacity 0 ≤ x ≤ 1
repeat 1 ≤ x ≤ 16
thickness 0 ≤ x ≤ 1000

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(FrameComponent);
if (component) log(component.props);
}