프로젝트
GitHub에서 보기
kennydude/photosphere
소개
Photosphere -- THIS IS A PROOF OF CONCEPT. NO SUPPORT IS GIVEN
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalIMPORTANT NOTICE:
THIS IS VERY OLD AND YOU SHOULD NOT USE THIS. NO RESPONSES TO EMAILS OR TICKETS WILL BE GIVEN FROM ME
PHOTOSPHERE
This allows you to view the new Photospheres in Android 4.2 without a problem without Google+
Thanks to
- Three.JS
- http://stackoverflow.com/questions/1578169/how-can-i-read-xmp-data-from-a-jpg-with-php
- Uses a portion of Modernizr that has been modified https://github.com/Modernizr/Modernizr/blob/master/feature-detects/webgl-extensions.js
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
- We load EXIF XMP data
- AJAX request as string
- Use Javascript string positioning to pull out the xmp chunk
- Pull out our attributes we need
- Create an image of full_width x full_height and put the linked image on at x, y with crop_width x crop_height.
- 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)
- Boom!
관련 프로젝트 살펴보기
불러오는 중…