https://github.com/zebrajaeger/jsphere2cube
https://github.com/zebrajaeger/jsphere2cube
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zebrajaeger/jsphere2cube
- Owner: zebrajaeger
- Created: 2021-05-02T16:15:16.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T12:51:16.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T23:42:53.852Z (3 months ago)
- Language: Java
- Size: 217 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cube2sphere
Converts a spherical panorama image into a cube map faces/tile tree and creates .html file to render it within browsers.
Directly supported viewers (html generation):
- [Pannellum](https://pannellum.org/)
- [Marzipano](https://www.marzipano.net/)clone this repo
### Preconditions
- [java](https://openjdk.java.net/) 8 or higher
- [maven](https://maven.apache.org/)
- [ [git](https://git-scm.com/downloads) ]## Compile / install application
- Clone the project with git (or download as archive and extract).
- Execute in this directory (this means: the directory of this readme file):
mvn clean install
## Run application:
### jar (single)
From core/target directory take the jar and make it available in your path. Then run (version number may different):
java -jar sphere2cube-java-core-0.0.1-SNAPSHOT-exec.jar [parameters]
## Config file
Default name is "sphere2cube.json"
Example (at least change source.path for input file, everything else may be ok):
```json
{
"debug": false,
"source": {
"path": "/home/l/prj/panos/IMG_1766_S(168.00x25.63(8.99)).psb"
},
"target": "./target",
"preview": {
"cubemap": {
"enabled": true,
"edge": 200,
"target": "preview_cube.jpg"
},
"equirectangular": {
"enabled": true,
"edge": 800,
"target": "preview_equirectangular.jpg"
},
"scaled": {
"enabled": true,
"edge": 800,
"target": "preview_scaled.jpg"
}
},
"cubemap": {
"tiles": {
"enabled": true,
"tileEdge": 512,
"target": "{{levelCount}}/{{faceNameShortLowerCase}}{{xIndex}}_{{yIndex}}.png"
},
"faces": {
"enabled": false,
"target": "{{faceNameLowerCase}}_{{levelCount}}.png"
}
},
"viewer": {
"pannellum": {
"enabled": true,
"title": "cube2sphere - Pannellum",
"target": "index.p.html",
"js": [
"https://cdn.jsdelivr.net/npm/[email protected]/build/pannellum.js"
],
"css": [
"https://cdn.jsdelivr.net/npm/[email protected]/build/pannellum.css"
]
},
"marzipano": {
"enabled": true,
"title": "cube2sphere - Marzipano",
"target": "index.m.html",
"js": [
"https://cdn.jsdelivr.net/npm/[email protected]/dist/marzipano.min.js"
],
"css": [
"https://www.marzipano.net/demos/sample-tour/style.css"
]
}
},
"archive": {
"enabled": true,
"target": "pano.zip"
}
}
```
## Links-
-
-
-## TODO
### HIGH (required)
- [X] More differentiated logging
- [X] Progress bar
- [X] Timer
- [X] Marzipano viewer
- [X] read embedded xml of Autopano Giga
- [X] restrict view angle dependent from source image bounds
- [X] Add css and js from viewers instead link to CDN
- [X] zip file packing (multithreaded)
- [X] simple drop-target UI
- [ ] Add configuration options to UI### MID (nice to have)
- [ ] ~~maven plugin~~ that doesn't make too much sense
- [X] self containing application
- [X] Populate README
- [X] Panorama description file### LOW (later or never...)
- [ ] output image paging for images that are too big to fit in memory
- [ ] input image paging for images that are too big to fit in memory