Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code to generate same tiles as marzipano tool #18

Open
ssandison opened this issue Apr 25, 2023 · 0 comments
Open

Code to generate same tiles as marzipano tool #18

ssandison opened this issue Apr 25, 2023 · 0 comments

Comments

@ssandison
Copy link

I have tried the example code to generate the same tiles that marzipano tool does but I can't seem to get the same folder structure.

My source image is 10000x5000 pixels and when tiles are generated via marzipano I get the following structure:

marzipano

Using the library:

library

The tile size seems to be different too.

This is what is generated from marzipano scene data:

var APP_DATA = {
"scenes": [
{
"id": "0-reception",
"name": "Reception",
"levels": [
{
"tileSize": 256,
"size": 256,
"fallbackOnly": true
},
{
"tileSize": 512,
"size": 512
},
{
"tileSize": 512,
"size": 1024
},
{
"tileSize": 512,
"size": 2048
}
],
"faceSize": 4096,

The code that loads the tiles is:

  var source = Marzipano.ImageUrlSource.fromString(
    data.tilesURL + "/{z}/{f}/{y}/{x}.jpg",
    { cubeMapPreviewUrl: data.tilesURL + "/preview.jpg" });

Hopefully you are able to help me with some example code that will generate the same tile sizes and structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant