SVG
Updated
A vector SVG image.
- Type
comp-svg- Script class
SVGComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Images: what it does, how to use it from a script, and examples.
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
SVG::readySVG::error
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A logo that pulsesAn SVG logo that breathes gently for ever: an SVG image sized by its entity's scale, tweened by a Behavior script under it.
Watch the logo pulse. 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(SVGComponent); if (component) log(component.props);}