yanwsh / videojs-panorama

a plugin for videojs run a full 360 degree panorama video.
http://yanwsh.github.io/videojs-panorama/
Other
488 stars 160 forks source link

New Features #9

Closed longmen21 closed 7 years ago

longmen21 commented 8 years ago

Hello, I'm trying to make the visual angles change directions automatically when people are watching the video. I hope to take use of the JS arrays to store a sequence of coordinates values of x/y/z axis, and let the visual angles switch by them. For examples: var coordinates = {(1,2,3),(2,3,4)} How can I make it? I've read your source code and found the snippet code "this.camera.lookat()". Whether can I use it?

yanwsh commented 8 years ago

Here, this is the feature I am working on it right now, will let you know when it's done. Thank you.

longmen21 commented 7 years ago

Thanks,man.I'm glad to hear that.Please notify me as soon as you make it. 👍

yanwsh commented 7 years ago

@longmen21 hello, please check the branch feature/auto-moving

basic idea is add following to settings, like

           autoMoving: true,
            autoMovingTimeline: [
                {
                    keypoint: 1000,//when do you want animation happen
                    from: {
                        lon: -180,
                        lat: 0,
                    },
                    to:{
                        lon: -180 + -360,
                        lat: 0
                    },
                    duration: 5000,
                    ease: "linear",//support "linear", "easeInQuad", "easeOutQuad", "easeInOutQuad", you can do your own animation function by passing a function, you can check animation functions [here](http://gizma.com/easing/)
                    complete: function () { //fire when animation done.
                    }
                }
            ]

let me know if you have any questions or problems. I am still testing it right now.

longmen21 commented 7 years ago

Thanks a lot, it's so wonderfullllll !!