Giter VIP home page Giter VIP logo

spherical's Introduction

Spherical.js

This was mainly a personal experiment to display spherical panoramas with CSS 3D transforms. You can see it in action [here] (http://chrisbateman.github.io/spherical/).

The only thing you'll need to use it is a full 360x180 panorama, broken up into the six sides of a [cubic projection] (http://wiki.panotools.org/index.php?title=Cubic_Projection). Generating a cubic projection isn't too tricky with [Hugin] (http://hugin.sourceforge.net/).

Include the JS and CSS, make a <div> for it to live in, and instantiate it:

new Spherical({
    container: '#pano',
    front: 'images/front.jpg',
    back: 'images/back.jpg',
    left: 'images/left.jpg',
    right: 'images/right.jpg',
    top: 'images/top.jpg',
    bottom: 'images/bottom.jpg'
});
  • Spherical.js works in Chrome, Firefox, iOS, and hopefully Android 4+. IE's a no-go until they start supporting preserve-3d.
  • Includes full-screen mode for browsers that support the Fullscreen API.
  • Zooming works, but is a bit buggy at the moment.
  • Supports AMD.

This was a lot of fun to build, but if you need something a bit more robust, I'd take a look at [krpano] (http://krpano.com/), or even [three.js] (http://threejs.org/examples/#canvas_geometry_panorama), which can render out to CSS, canvas, or WebGL.

spherical's People

Contributors

chrisbateman avatar

Watchers

Ivan Eremin avatar

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.