I was trying to use Apple HTML5 VR in my sample project ...
It looks Fine as this sample code .
threesixty.js
threeSixty = {
init: function() {
this._vr = new AC.VR('viewer', 'images/optimized/Seq_v04_640x378_##.jpg', 72, {
invert: true
});
},
didShow: function() {
this.init();
},
willHide: function() {
recycleObjectValueForKey(this, "_vr");
},
shouldCache: function() {
return false;
}
}
if (!window.isLoaded) {
window.addEventListener("load", function() {
threeSixty.init();
}, false);
}
It load Seq_v04_640x378_01.jpg ~ Seq_v04_640x378_72.jpg
But I was curious , if I want add another picture to display 360
How to change picture name ???
Thanks for any reply or answer : )
Webber
/Edit - Add Projec dictionary screenshot/
And there are 72 pics in "optimized" dictionary
EDIT You have to edit threesixty.js
: inside the new AC.VR( ... )
function call, it's enough to replace:
images/optimized/Seq_v04_640x378_##.jpg
with the name pattern, and72
with the number of images you have,as second and third arg, respectively. Just make sure you placed the files in the right place, that is, a subdirectory of the "threesixty" dir in your project. If,say, your image sequence files are named:
Then you'll have to write:
images/optimized/frame0###.jpg
as the second arg, and360
as the third arg.EDIT Then, add all your files to the threesixty/images/optimized/
dir using XCode menu item "Project->Add to project" (CMD+Alt+A).
This way you don't have to rename all your sequence (provided that the files have a name pattern).