Welcome to the A-Frame Auto Door project โ a clean and efficient interactive door component built with A-Frame. As you approach the door, it opens smoothly with a realistic animation. As you walk away, it closes automatically, ensuring a seamless experience.
- ๐ฎ Smooth First-Person Movement โ With low speed and look-based direction.
- ๐ถ Proximity-Based Trigger โ Door opens/closes based on user location.
- ๐๏ธ Non-Looping Animations โ Each animation plays fully without interruption.
- ๐ Optional Audio Support โ Play a sound during door transitions.
- ๐ง Custom Door Component โ Easy to apply to any door in your scene.
project-root/
โ
โโโ glb/
โ โโโ door.glb # 3D model of the door
โโโ audio/
โ โโโ door.mp3 # Optional door sound
โโโ js/
โ โโโ automatic-door.js # Main logic and animation handling
โโโ index.html # Entry point
โโโ LICENSE # MIT License
โโโ README.md # You're reading it!
-
Clone the repository:
git clone https://github.com/your-username/aframe-auto-door.git cd aframe-auto-door -
Run it locally:
- Option A: Open
index.htmldirectly in your browser. - Option B: Use Live Server / GitHub Pages / Vite for smoother development.
- Option A: Open
-
Enjoy the interaction!
-
Place your
.glbdoor model in the/glbfolder. -
Add the
door-triggercomponent to any door entity:<a-entity gltf-model="#doorModel" door-trigger></a-entity>
-
Include the script:
<script src="./js/automatic-door.js"></script>
This project is licensed under the MIT License โ free to use, modify, and share. See the LICENSE file for more details.
Mohammad JBM ๐ GitHub Profile
Crafting immersive, intelligent, and beautifully intuitive 3D worlds โ one line of code at a time.