Skip to content

FKI-HTW/SamplesFromHostileToHospitable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SamplesFromHostileToHospitable

Generalized Web Augmented Reality (WebAR) features from the app From Hostile To Hospitable

Table of Contents

Installation

  1. Clone the repository:
    git clone https://github.com/FKI-HTW/SamplesFromHostileToHospitable
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev
  4. Build for production:
    npm run build

Usage

After starting the app, navigate to http://localhost:5173/ in your browser.
Use the Chrome Browser. To Debug with Android Smartphone go to chrome://inspect/#devices

Features

  • Define 3D models and audios in json database
  • Select desired content in start screen
  • Place 3D content in WebAR with Hit Testing feature on found planes
  • Experience different contents with timeline feature

Customize

To add your custom content you can modify the following files:

database.json

Link custom models (glb or gltf format) and audios (mp3|wav|m4a format) with this structure:
{
    "ID": 0,
    "contentName": "Spot 0",
    "pathModel": "assets/models/ladybug.glb",
    "pathAudioFiles": [
        {
            "path": "assets/audios/test1.mp3",
            "time": 2
        },
        {
            "path": "assets/audios/test2.mp3",
            "time": 8
        }
    ]
}
The time corresponds to the start time to play the audio in the timeline

GameScene.ts

To add and label a new button, adapt the following syntax. The :number argument in .prepareData relates to the content's position in database.json Image add new button

Publish

After making a build you get a /dist folder.
Upload it to any server that supports HTTPS.
Netlify is for free.

Contributing

Contributions are welcome! Follow these steps:

  1. Fork the project.
  2. Create a new branch (git checkout -b feature/NewFeature).
  3. Commit your changes (git commit -m 'Add NewFeature').
  4. Push to the branch (git push origin feature/NewFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published