Giter Site home page Giter Site logo

Perspective about pannellum HOT 3 CLOSED

mpetroff avatar mpetroff commented on August 25, 2024
Perspective

from pannellum.

Comments (3)

mpetroff avatar mpetroff commented on August 25, 2024

This is already possible with the targetPitch and targetYaw hot spot configuration parameters, which override the target scene's default pointing.

from pannellum.

gbarmus avatar gbarmus commented on August 25, 2024

The first scene - is it possible to create a targetYaw for that one? And if so, what's the implementation?
Thanks!

from pannellum.

mpetroff avatar mpetroff commented on August 25, 2024

Yes. Each scene can have a pitch and yaw specified that determine its default pointing, and each hot spot can have a targetPitch and targetYaw that override the default pointing.

"sceneName": {
    "panorama": "./pano1.jpg",
    "hotSpots": [
        {
            "pitch": 0,
            "yaw": 100,
            "targetPitch": 10,
            "targetYaw": 20,
            "type": "scene",
            "text": "Other Scene (with override)",
            "sceneId": "otherScene"
        },
        {
            "pitch": 10,
            "yaw": 100,
            "type": "scene",
            "text": "Other Scene (without override)",
            "sceneId": "otherScene"
        }
    ]
},
"otherScene": {
    "panorama": "./pano2.jpg",
    "pitch": 100,
    "yaw": 150
}

In this example, the scene's (not the hot spot's) pitch and yaw parameters specify the default pointing of the other scene. When the hot spot that specifies the targetPitch and targetYaw parameters is clicked, the other scene is loaded with an initial pointing of pitch 10 and yaw 20. When the hot spot that does not specify this override is clicked, the other scene is loaded with its default initial pointing of pitch 100 and yaw 150.

from pannellum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.