GithubHelp home page GithubHelp logo

zawsx / 3d-app-photosphere Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kennydude/photosphere

0.0 0.0 0.0 1.61 MB

Photosphere

Home Page: http://kennydude.github.com/photosphere/test.html

3d-app-photosphere's Introduction

PHOTOSPHERE

This allows you to view the new Photospheres in Android 4.2 without a problem without Google+

Thanks to

TO TEST

Open test.html and press "makeIt"

TO USE

Get Three.js (or use the bundled copy) and sphere.js and run:

new Photosphere("link-to-image.jpg").loadPhotosphere(document.getElementById("element-on-page"));

If you are including this into some gallery app which can read EXIF XMP tags, you can make it render faster (this is why you don't need every single shot for it to work, Android adds these tags in):

new Photosphere("link...").setEXIF({
	"full_width" : "GPano:FullPanoWidthPixels value",
	"full_height" : "GPano:FullPanoHeightPixels value",
	"crop_width" : "GPano:CroppedAreaImageWidthPixels value",
	"crop_height" : "GPano:CroppedAreaImageHeightPixels value",
	"x" : "GPano:CroppedAreaLeftPixels value",
	"y" : "GPano:CroppedAreaTopPixels value"
}).loadPhotosphere(...);

Tada! :D

LICENSE

GPLv3 http://www.tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)

HOW IT WORKS

  1. We load EXIF XMP data
  2. AJAX request as string
  3. Use Javascript string positioning to pull out the xmp chunk
  4. Pull out our attributes we need
  5. Create an image of full_width x full_height and put the linked image on at x, y with crop_width x crop_height.
  6. Load Three.JS using Panorma-like details (I used the Three.JS example for this and baked it into the class. I don't have a clue about 3D stuff nor am I really that interested)
  7. Boom!

3d-app-photosphere's People

Contributors

kennydude 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.