Skip to content

Instantly share code, notes, and snippets.

@Maharony
Created April 27, 2018 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maharony/7389c53e4923581db7a44ee2b16a207f to your computer and use it in GitHub Desktop.
Save Maharony/7389c53e4923581db7a44ee2b16a207f to your computer and use it in GitHub Desktop.
js
var product1=!1;
function build(){
if(product1){
$("#canvas").find('.product1').remove();
$("#canvas").html('<div class="threesixty product1"style="text-align:center"><div class="threesixtyInner"><div class="spinner"><span>0%</span></div><ol class="threesixty_images"></ol></div></div>');
};
$('.threesixtyInner').css({ 'padding-bottom': `${ 100 / window.aspectRatio }%` });
product1 = $('.product1').ThreeSixty({
totalFrames: window.totalFramesFromVid, // Total no. of image you have for 360 slider
endFrame: window.totalFramesFromVid, // end frame for the auto spin animation
currentFrame: window.totalFramesFromVid/2, // This the start frame for auto spin
imgList: '.threesixty_images', // selector for image list
progress: '.spinner', // selector to show the loading progress
imagePath: 'https://res.cloudinary.com/<cloud-name>/videos/', // path of the image assets
filePrefix: '', // file prefix if any
ext: '.jpg', // extension for the assets
height: window.imageWidth/window.aspectRatio,
width: window.imageWidth,
navigation: false,
disableSpin: true
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment