A title in your own font
Updated
A Text 3D title registers the Branda font, switches to it, sets its text and shape in one call, then glows between two ambers by tweening only its colour.
Watch the extruded title glow; orbit to see its depth and its shadow. Drag to orbit the camera, scroll to zoom.
A title in your own font
#pragma lifecycle(startup)
async function startup() { const title = self.parent.getComponent(Text3DComponent);
try { await Fonts.register('branda', '/example-assets/Branda.ttf', { label: 'Branda' }); title.setProps({ font: 'branda' }); } catch (error) { log('Font not available, keeping Inter:', error.message); }
title.setProps({ text: 'GRAND OPENING', size: 0.5, depth: 0.12, center: true, curveSegments: 6, });
const from = new THREE.Color('#f59e0b'); const to = new THREE.Color('#fde68a'); const current = new THREE.Color();
Tween.value(0, 1, (t) => { current.copy(from).lerp(to, t); title.setProps({ color: `#${current.getHexString()}` }); }, { duration: 1.5, ease: Ease.InOutSine, repeat: Infinity, yoyo: true });}How it works
Section titled “How it works”The script is explained step by step in A title in your own font.
Open it in XR Creator
Section titled “Open it in XR Creator”Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.
GrandOpeningTitle.xrproj