Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšช A-Frame Auto Door System

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.


โœจ Features

  • ๐ŸŽฎ 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 Structure

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!

๐Ÿš€ Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/aframe-auto-door.git
    cd aframe-auto-door
  2. Run it locally:

    • Option A: Open index.html directly in your browser.
    • Option B: Use Live Server / GitHub Pages / Vite for smoother development.
  3. Enjoy the interaction!


๐Ÿงฉ How to Use

  1. Place your .glb door model in the /glb folder.

  2. Add the door-trigger component to any door entity:

    <a-entity gltf-model="#doorModel" door-trigger></a-entity>
  3. Include the script:

    <script src="./js/automatic-door.js"></script>

๐Ÿ“œ License

This project is licensed under the MIT License โ€” free to use, modify, and share. See the LICENSE file for more details.


๐Ÿ‘ค Author

Mohammad JBM ๐ŸŒ GitHub Profile

Crafting immersive, intelligent, and beautifully intuitive 3D worlds โ€” one line of code at a time.

About

๐Ÿšช A-Frame Auto Door System

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages