mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.24k stars 721 forks source link

Multiresolution panorama function doesn't showed up the image. #893

Open Collab07 opened 4 years ago

Collab07 commented 4 years ago

When using the Multiresolution panorama like the following script, the panorama image doesn't show up. The image is displayed in black.

`{ "default": { "firstScene": "Entrance", "sceneFadeDuration": 1000, "autoLoad": true, "autoRotate": false
},

"scenes": {
    "Entrance": {
        "title": "1F: エントランスホール",
        "autoRotate": true,
        "hfov": 90,
        "pitch":2,
        "yaw":117, 
        "type": "multires",
        "multiRes": {
       "basePath": "/koukapanorama/image_kou/Entrance.jpg",
        "path": "/%l/%s%y_%x",
        "fallbackPath": "/fallback/%s",
        "extension": "jpg",
        "tileResolution": 512,
        "maxLevel": 6,
        "cubeResolution": 8432},

        "compass": true,
        "northOffset": 0,
        "hotSpotDebug": false,
        "hotSpots": [
            {
                "pitch": 0.004849629725023791,
                "yaw": 119.58597118053503,
                "type": "scene",
                "text": "東側外観へ",
                "sceneId": "Gaikan",
                "targetYaw": -50.46364612006988,
                "targetPitch": 15.594121778014685
            },
            {
                "pitch": -0.357953743053101,
                "yaw": 76.74725599189046,
                "type": "scene",
                "text": "コモンスペースへ",
                "sceneId": "commonspace" 
            }
        ]
    },` 

And I tried another script like this. `{ "default": { "firstScene": "Entrance", "sceneFadeDuration": 1000, "autoLoad": true, "autoRotate": false
},

"scenes": {
    "Entrance": {
        "title": "1F: エントランスホール",
        "autoRotate": true,
        "hfov": 90,
        "pitch":2,
        "yaw":117, 
        "type": "multires",
        "multiRes": {"basePath": "/koukapanorama/image_kou/Entrance.jpg",
        "path": "/%l/%s%y_%x",
        "fallbackPath": "/fallback/%s",
        "extension": "jpg",
        "tileResolution": 512,
        "maxLevel": 6,
        "cubeResolution": 8432},

        "compass": true,
        "northOffset": 0,
        "hotSpotDebug": false,
        "hotSpots": [
            {
                "pitch": 0.004849629725023791,
                "yaw": 119.58597118053503,
                "type": "scene",
                "text": "東側外観へ",
                "sceneId": "Gaikan",
                "targetYaw": -50.46364612006988,
                "targetPitch": 15.594121778014685
            },
            {
                "pitch": -0.357953743053101,
                "yaw": 76.74725599189046,
                "type": "scene",
                "text": "コモンスペースへ",
                "sceneId": "commonspace" 
            }
        ]
    },..`

screen shot image

I don't have any programming skills. But I would like to use this amazing thing. Additionally, sorry for my poor English. I would be happy if you could tell me how to solve it. Thank you

mpetroff commented 4 years ago

I'm guessing the path you specified for the image doesn't match its actual location. Check the network tab of your browser's developer tools. I suspect you're getting 404 not found errors.

Riclim commented 4 years ago

"basepath" should be just a path to the folder with your previously generated tiles, like "/koukapanorama/image_kou", but you put a path to a JPG image.