HTML to 3D Plane Render
Score 0
Modify engine preferences and JSON entities live.
OmniXR is a declarative, normalized wrapper for cross-platform WebXR.
const config = {
container: '#app-root',
hudUI: '#my-hud',
showDefaultButtons: true,
settings: {
aimMode: 'direct-touch',
handMode: 'smart-single',
controllerModels: 'vr-only',
pointerLasers: 'always',
laserOffsetZ: 0.0,
laserMaxLength: 15
},
assets: [
{ id: 't-vid', src: '/assets/video.mp4' },
{ id: 'bgm', src: '/assets/audio_global.mp3' }
],
entities: [
{
id: 'target-1',
spawn: 'capsule',
color: '#ff0000',
position: '0 1 -3',
interactive: true,
physics: 'static',
onPrimaryAction: (omni) => { ... }
},
{
id: 'vid-screen',
spawn: 'video',
src: '#t-vid',
size: 1.6, // Max dimension constraint
border: false, // Flush 5mm backplate (true = picture frame)
billboard: true
},
{
id: 'stats-board',
spawn: 'html-plane',
target: '#my-stats-div',
size: 1.2,
border: true
}
]
};
.show() / .hide() Visibility toggles..move('x y z', dur) Smooth coordinate interpolation..pulse(scale, dur) Visual feedback animation..playAudio('asset-id') Attaches localized 3D spatial audio..destroy() Safely removes from DOM/GPU..el Escape hatch to raw A-Frame HTML node.Access normalized telemetry via omni.controllers.right:
.trigger & .grip (Float: 0.0 to 1.0).buttonA & .buttonB (Bool: True/False).joystickBtn (Bool: True/False).joystick (Object: {x: -1 to 1, y: -1 to 1})