aframe-webxr

freshtechbro/claudedesignskills · updated Apr 8, 2026

$npx skills add https://github.com/freshtechbro/claudedesignskills --skill aframe-webxr
0 commentsdiscussion
summary

A-Frame uses an entity-component-system architecture where:

skill.md

A-Frame WebXR Skill

When to Use This Skill

  • Build VR/AR experiences with minimal JavaScript
  • Create cross-platform WebXR applications (desktop, mobile, headset)
  • Prototype 3D scenes quickly with HTML primitives
  • Implement VR controller interactions
  • Add 3D content to web pages declaratively
  • Build 360° image/video experiences
  • Develop AR experiences with hit testing

Core Concepts

1. Entity-Component-System (ECS)

A-Frame uses an entity-component-system architecture where:

  • Entities are containers (like <div> in HTML)
  • Components add functionality/appearance to entities
  • Systems provide global functionality
<!-- Entity with components -->
<a-entity
  geometry="primitive: box; width: 2"
  material="color: red; metalness: 0.5"
  position="0 1.5 -3"
  rotation="0 45 0">
</a-entity>

Primitives are shortcuts for common entity + component combinations:

<!-- Primitive (shorthand) -->
<a-box color="red" position="0 1.5 -3" rotation="0 45 0" width="2"></a-box>

<!-- Equivalent entity-component form -->
<a-entity
  geometry="primitive: box; width: 2"
  material="color: red"
  position="0 1.5 -3"
  rotation="0 45 0">
</a-entity>

2. Scene Setup

Every A-Frame app starts with <a-scene>:

<!DOCTYPE html>
<html>
  <head>
    <script src="https://aframe.io/releases/1.7.1/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <!-- Entities go here -->
      <a-box position="-1 0.5 -3" color="#4CC3D9"></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
  </body>
</html>

The scene automatically injects:

  • Default camera (position: 0 1.6 0)
  • Look controls (mouse drag)
  • WASD controls (keyboard movement)

3. Camera Systems

Default Camera (auto-injected if none specified):

<a-entity camera="active: true" look-controls wasd-controls position="0 1.6 0"></a-entity>

Custom Camera:

<a-camera position="0 2 5" look-controls wasd-controls="acceleration: 50"></a-camera>

Camera Rig (for independent movement and rotation):

<a-entity id="rig" position="0 0 0">
  <!-- Camera for head tracking -->
  <a-camera look-controls></a-camera>

  <!-- Movement applied to rig, not camera -->
</a-entity>

VR Camera Rig with Controllers:

<a-entity id="rig" position="0 0 0">
  <!-- Camera at eye level -->
  <a-camera position="0 1.6 0"></a-camera>

  <!-- Left hand controller -->
  <a-entity
    hand-controls="hand: left"
    laser-controls="hand: left">
  </a-entity>

  <!-- Right hand controller -->
  <a-entity
    hand-controls="hand: right"
    laser-controls="hand: right">
  </a-entity>
</a-entity>

4. Lighting

Ambient Light (global illumination):

<a-entity light="type: ambient; color: #BBB; intensity: 0.5"></a-entity>

Directional Light (like sunlight):

<a-entity light="type: directional; color: #FFF; intensity: 0.8" position="1 2 1"></a-entity>

Point Light (radiates in all directions):

<a-entity light="type: point; color: #F00; intensity: 2; distance: 50" position="0 3 0"></a-entity>

Spot Light (cone-shaped beam):

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.534 reviews
  • Chaitanya Patil· Dec 16, 2024

    Useful defaults in aframe-webxr — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Emma Mensah· Dec 16, 2024

    Useful defaults in aframe-webxr — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Nikhil Brown· Dec 8, 2024

    I recommend aframe-webxr for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Tariq Singh· Nov 27, 2024

    Solid pick for teams standardizing on skills: aframe-webxr is focused, and the summary matches what you get after install.

  • Piyush G· Nov 7, 2024

    aframe-webxr has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Kiara Anderson· Nov 7, 2024

    aframe-webxr has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Rahul Santra· Nov 3, 2024

    Registry listing for aframe-webxr matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Emma Li· Nov 3, 2024

    Registry listing for aframe-webxr matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Shikha Mishra· Oct 26, 2024

    Solid pick for teams standardizing on skills: aframe-webxr is focused, and the summary matches what you get after install.

  • Tariq Haddad· Oct 26, 2024

    Solid pick for teams standardizing on skills: aframe-webxr is focused, and the summary matches what you get after install.

showing 1-10 of 34

1 / 4
aframe-webxr — AI agent skill | explainx.ai | explainx.ai