https://github.com/tresjs/xr
Vue components and composable functions to build AR/VR experiences with TresJS
https://github.com/tresjs/xr
Last synced: about 1 year ago
JSON representation
Vue components and composable functions to build AR/VR experiences with TresJS
- Host: GitHub
- URL: https://github.com/tresjs/xr
- Owner: Tresjs
- License: mit
- Created: 2023-11-24T05:23:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-08T09:21:52.000Z (over 1 year ago)
- Last Synced: 2025-03-08T10:24:29.699Z (over 1 year ago)
- Language: Vue
- Size: 678 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# XR
> Vue components and composable functions to build AR/VR experiences with [TresJS](https://tresjs.org)
- ⚡️ Powered by Vite
- 🦾 Fully Typed
## Installation
```bash
pnpm i @tresjs/xr
```
## Docs
Checkout the [docs](https://xr.tresjs.org/)
## Demos
- [Stackblitz Collection](https://stackblitz.com/@alvarosabu/collections/tresjs)
## Contributing
We are open to contributions, please read the [contributing guide](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md) to get started.
### Build
To build the package run:
```bash
pnpm run build
```
### Playground
To run the playground run, its a great way to test the components and helpers locally:
First install dependencies
```
pnpm i
```
And then to run the development server on http://localhost:5173
```bash
pnpm run playground
```
### Test
TODO...
### Docs
To run de docs in dev mode
```bash
pnpm run docs:dev
```
To build them
```bash
pnpm run docs:build
```
## License
[MIT](/LICENSE)
## Sponsors
Be the first to support this project [here](https://github.com/sponsors/tresjs) ☺️
## Logic
- Watch effects trigger for first time
- VRButton is clicked
- handleButtonClick method of XRButton is triggered
- toggleSession is called
- startSession is called
- XR session is requested
- XR session is saved to global session pinia store
- Set status as entered
- Save copy of global session XR session to provided state
- Watch effects trigger for second time (after reactive depedencies update)