https://github.com/yanranxiaoxi/web-vr-panorama-api
基于 A-Frame 的 VR 全景网页视图 API
https://github.com/yanranxiaoxi/web-vr-panorama-api
api webvr-aframe
Last synced: 4 months ago
JSON representation
基于 A-Frame 的 VR 全景网页视图 API
- Host: GitHub
- URL: https://github.com/yanranxiaoxi/web-vr-panorama-api
- Owner: yanranxiaoxi
- License: mit
- Created: 2022-04-05T09:39:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T14:43:32.000Z (almost 4 years ago)
- Last Synced: 2025-10-09T06:42:52.548Z (8 months ago)
- Topics: api, webvr-aframe
- Language: PHP
- Homepage: https://webvrpanorama.api.soraharu.com
- Size: 14.9 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web VR Panorama API
🌎 基于 A-Frame 的 VR 全景网页视图 API 🔐
🔗 [GitLab (Homepage)](https://gitlab.soraharu.com/XiaoXi/Web-VR-Panorama-API) | 🔗 [GitHub](https://github.com/yanranxiaoxi/Web-VR-Panorama-API)
[](https://webvrpanorama.api.soraharu.com/)
## 📦️ 调用说明
本 API 标准接口为 `https://webvrpanorama.api.soraharu.com/api.php`,以下为参数说明:
| Parameter | Type | Lore |
| ----------- | ----- | ------------------------------ |
| `url_type` | `GET` | `local` or `http` |
| `image_url` | `GET` | The local filename or full URL |
当 `url_type` 为 `local` 时,程序会读取 `./images/` 目录下名为 `image_url` 的 JPG 图像,例如:
- [https://webvrpanorama.api.soraharu.com/api.php?url_type=local&image_url=snow1](https://webvrpanorama.api.soraharu.com/api.php?url_type=local&image_url=snow1)
此时获取的图片地址为:
- [./images/snow1.jpg](https://webvrpanorama.api.soraharu.com/images/snow1.jpg)
相当于以下文件:
- [https://webvrpanorama.api.soraharu.com/images/snow1.jpg](https://webvrpanorama.api.soraharu.com/images/snow1.jpg)
当 `url_type` 为 `http` 或 `https` 时,程序将会读取 `image_url` 指向的完整路径的图像,您需要确保 `image_url` 指向的图像可以被访问,例如:
- [https://webvrpanorama.api.soraharu.com/api.php?url_type=http&image_url=https://downloadserver.soraharu.com:7000/Web%20VR%20Panorama%20API/images/snow2.jpg](https://webvrpanorama.api.soraharu.com/api.php?url_type=http&image_url=https://downloadserver.soraharu.com:7000/Web%20VR%20Panorama%20API/images/snow2.jpg)
此时获取的图片地址为:
- [https://downloadserver.soraharu.com:7000/Web%20VR%20Panorama%20API/images/snow2.jpg](https://downloadserver.soraharu.com:7000/Web%20VR%20Panorama%20API/images/snow2.jpg)
*请使用桌面浏览器打开以上 URL,图片加载可能较慢,请稍加等待*
## ⚙️ 部署至 Vercel
1. 克隆本仓库到 [GitHub.com](https://github.com/) 或 [GitLab.com](https://gitlab.com/) 个人仓库
2. 在 [Vercel](https://vercel.com/) 新建项目到你的个人仓库
3. 等待自动部署完成
## 📜 开源许可
本项目仅供个人学习研究使用,禁止用于商业及非法用途。
基于 [MIT License](https://choosealicense.com/licenses/mit/) 许可进行开源。
## 💕 感谢
- [A-Frame](https://aframe.io/)