Pulpmedia IT DEV open source code

JS Panorama

This JavaScript library lets you easily convert any image into a JavaSript panorama slider.

The effect is achieved by limiting the field of view.
If you move the mouse over the image the image gets moved to the side which simulates looking to the side.

Examples

example2.html
source code of example2.html
<html>
    <head>
        <title>Panorama example</title>
        <script type="text/javascript" src="panorama.js"></script>
        <script type="text/javascript">
            var initPanoramas = function()
            {
                new Panorama('wolfgangsee', 'austria/schafberg_wolfgangsee.jpg', 395);
                new Panorama('wolfgangsee2', 'austria/schafberg_wolfgangsee2.jpg', 395);
            }
        </script>
    </head>
    <body onload="initPanoramas();">

        In this example the panorama images get initialized after loading all
        of the html contents
        
        <div>
            <p>Wolfgangsee, Austria</p>
            <div id="wolfgangsee"></div>
        </div>
        
        <div>
            <p>Wolfgangsee, Austria</p>
            <div id="wolfgangsee2"></div>
        </div>
        
    </body>
</html>
example1.html
source code of example1.html
<html>
    <head>
        <title>Panorama example</title>
        <script type="text/javascript" src="panorama.js"></script>
    </head>
    <body>

        Move your mouse cursor over the images to change perspective and enjoy an enhanced visual experience.
        
        <div>
            <div id="attersee"></div>
            <script type="text/javascript"> new Panorama('attersee', 'austria/schafberg_attersee.jpg', 395); </script>
            <p>Mondesee and Attersee, Austria</p>
        </div>
        
    </body>
</html>

Download source files

Licenses

The licenses under which the source codes are released are:
license.txt