Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Panorama on web pages
(section)
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Pannellum= '''[https://pannellum.org/ Pannellum] is JavaScript library for displaying and navigate panorama images on web pages. ''' In order to use Pannellum you must: * Download Pannellum: https://pannellum.org/download/ * Place the downloaded files: <code>pannellum.css, pannellum.htm, pannellum.js</code> in a folder * Save a panorama image in the same folder ** [https://commons.wikimedia.org/wiki/Category:360_panoramics#GallerySlideStartButtons Wikimedia commons] is a good source of panoramic images under free licenses ** Pannellum images with a '''maximum of 8000px wide''', so you might need to resize the panorama image file * Use the API example in [https://pannellum.org/documentation/examples/simple-example/ Pannellum documentation] to write your HTML page. An example of the change code can be seen below * Set the pannellum.viewer with the settings for your image, most important parameters are: ** <code>"panorama":</code> defines the image file to use ** <code>"type":</code> the type of the image: [https://en.wikipedia.org/wiki/Equirectangular_projection equirectangular], [https://en.wikipedia.org/wiki/Cube_mapping cubemap], or multires ** A full list of Pannellum parameters and methods can is available in its [https://pannellum.org/documentation/api/ API documentation] '''To run it you will need to store the folder with the library, html page and images in webserver'''. ==Example== See live example in http://publicationstation.wdka.hro.nl/pannellum/ ==HTML code== <source lang='html4strict'> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>A simple example</title> <link rel="stylesheet" href="pannellum.css"/> <script type="text/javascript" src="pannellum.js"></script> <style> html { height: 100%; } body { margin: 0; padding: 0; overflow: hidden; position: fixed; cursor: default; width: 100%; height: 100%; } /* #panorama { width: 600px; height: 400px; } */ </style> </head> <body> <div id="panorama"></div> <script> viewer = pannellum.viewer('panorama', { "type": "equirectangular", "panorama": "Mars.jpg", "autoLoad": true, "showFullscreenCtrl":false }); </script> </body> </html> </source> ==Interaction== Programmatic interaction with the panorama can be achieved by using Pannellum [https://pannellum.org/documentation/api/ API] * <code>viewer.getYawBounds()</code> returns the boundaries ( minimum and maximum) allowed pitches (in degrees) * <code>viewer.setYaw(10)</code> set Yaw to 10 * <code>viewer.setYaw(viewer.getYaw()-100)</code> get current yaw and move -100 from it Example in https://pannellum.org/documentation/examples/custom-controls/ [[Category:Research]] [[Category:Tutorial]]
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs