aframe-webxr

Build browser-based VR, AR, and 3D scenes using A-Frame's declarative HTML entity-component architecture.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/aungpwint/presentation --skill aframe-webxr-aungpwint
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aframe-webxr
Source: https://github.com/aungpwint/presentation/tree/main/.agents/skills/aframe-webxr
Command: npx skills add https://github.com/aungpwint/presentation --skill aframe-webxr-aungpwint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building WebXR experiences normally requires deep Three.js and WebGL knowledge; this Skill provides declarative HTML patterns, component references, and generators for creating VR, AR, and 3D scenes with minimal JavaScript. ## Core Features & Use Cases - Declarative 3D Scenes: Compose scenes with HTML primitives like a-box, a-sphere, and a-sky using the entity-component-system architecture. - VR/AR Support: Implement hand controllers, laser interactions, gaze cursors, and AR hit-testing for surface-based object placement. - Component Generator: Use the component_builder.py script to scaffold custom components for interaction, animation, physics, controllers, networking, and asset loading. - Use Case: Create a 360-degree image gallery with clickable thumbnails, gaze-based cursor interaction, and sound feedback using only HTML markup and preloaded assets. ## Quick Start Create an A-Frame scene with a rotating box, a sphere, ground plane, sky, and a camera with a gaze cursor for click interactions.

Frequently Asked Questions about aframe-webxr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a VR scene with A-Frame?▼

Create an HTML file that loads the A-Frame script and wraps content in an a-scene element containing primitives like a-box, a-sphere, and a-sky. The scene automatically injects a default camera with look-controls and WASD movement, and entering VR requires no extra code.

How to add VR controller interactions in A-Frame?▼

Attach hand-controls and laser-controls components to entities inside a camera rig, one per hand. Add a raycaster targeting an interactive class, then listen for triggerdown, gripdown, and click events on the target entities.

Does A-Frame support AR hit testing on mobile?▼

Yes, A-Frame supports AR hit testing through the ar-hit-test component combined with the webxr scene configuration requesting the hit-test optional feature. It emits ar-hit-test-start, ar-hit-test-achieved, and ar-hit-test-select events for surface detection and object placement.

A-Frame vs Three.js for web 3D development?▼

A-Frame is built on Three.js and provides a declarative HTML layer for faster scene composition with less JavaScript. Use Three.js directly when you need fine-grained control over rendering pipelines beyond A-Frame's component abstraction.

Why are my A-Frame click events not firing?▼

Click events require a cursor or raycaster component targeting the entity, typically an a-cursor inside the camera with raycaster set to a matching selector class. Without a raycaster, mouseenter, mouseleave, and click events never reach the entity.

How do I improve A-Frame performance on mobile VR?▼

Reduce geometry segment counts, limit the number of lights, restrict renderer canvas size with maxCanvasWidth and maxCanvasHeight, and preload assets through a-assets. Pool and reuse entities instead of creating and destroying them, and throttle expensive tick updates.