Home Forums Basel support forum 360 product view speed

360 product view speed

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6295

    brunosalme
    Participant

    Hello, guys!

    How do I manage de speed of the 360 product view?

    On my page, it spins like crazy when I hit play!! KKK

    https://www.usebendito.com.br/loja/badalados/blake/

    Tks!!!!

    #6303

    Artem Temos
    Keymaster

    Hello there,

    Thank you so much for choosing our theme and contacting our support center.

    Currently, there is no such option in our theme settings and the only one way to change the speed is to customize PHP source of this function. Try to add this code snippet to your child theme functions.php file. There you will be able to change playSpeed parameter

    
    function basel_product_360_view() {
    		$images = basel_get_360_gallery_attachment_ids();
    		if( empty( $images ) ) return;
    
    		$id = rand(100,999);
    
    		$title = '';
    
    		$frames_count = count( $images );
    
    		$images_js_string = '';
    
    		?>
    			<div class="product-360-button">
    				<a href="#product-360-view"><span><?php _e('360 product view', 'basel'); ?></span></a>
    			</div>
    			<div id="product-360-view" class="product-360-view-wrapper mfp-hide">
    				<div class="basel-threed-view threed-id-<?php echo esc_attr( $id ); ?>">
    					<?php if ( ! empty( $title ) ): ?>
    						<h3 class="threed-title"><span><?php echo ($title); ?></span></h3>
    					<?php endif ?>
    					<ul class="threed-view-images">
    						<?php if ( count($images) > 0 ): ?>
    							<?php $i=0; foreach ($images as $img_id): $i++; ?>
    								<?php 
    									$img = wp_get_attachment_image_src( $img_id, 'full' );
    									$width = $img[1];
    									$height = $img[2];
    									$images_js_string .= "'" . $img[0] . "'"; 
    									if( $i < $frames_count ) {
    										$images_js_string .= ","; 
    									}
    								?>
    							<?php endforeach ?>
    						<?php endif ?>
    					</ul>
    				    <div class="spinner">
    				        <span>0%</span>
    				    </div>
    				</div>
    				<script type="text/javascript">
    					jQuery(document).ready(function( $ ) {
    					    $('.threed-id-<?php echo esc_attr( $id ); ?>').ThreeSixty({
    					        totalFrames: <?php echo $frames_count; ?>,
    					        endFrame: <?php echo $frames_count; ?>, 
    					        currentFrame: 1, 
    					        imgList: '.threed-view-images', 
    					        progress: '.spinner',
    					        imgArray: [<?php echo $images_js_string; ?>],
    					        height: <?php echo $height ?>,
    					        width: <?php echo $width ?>,
    					        responsive: true,
    					        playSpeed: 300,
    					        navigation: true
    					    });
    					});
    				</script>
    			</div>
    		<?php
    	}
    

    Regards

    #15241

    miriambl
    Participant

    Hi!
    I have the same problem, the 360 view is going very fast when I click on play.
    I’ve tried to do what you suggest in the post, adding that code.
    But it doesn’t work. And now, all the website doesn’t work!

    What can I do now?
    It says:
    Parse error: syntax error, unexpected ‘*’ in /homepages/18/d525166503/htdocs/clickandbuilds/SiremWild/wp-content/themes/basel/functions.php on line 194

    Thanks!

    #15243

    Artem Temos
    Keymaster

    Hi,

    Could you please provide us your FTP access? We will try to add the for you.

    Regards

    #42394

    Estefania
    Participant

    Dear Team!
    Nice to contact to you again!
    Regarding the topic, thanks for fixing the 360 view speed by:
    function basel_product_360_view()….
    But, is it posible also to reduce the speed in mobile devices when you move the images with finger?

    Thanks a lot in advance!
    Estefanía.

    #42440

    Artem Temos
    Keymaster

    Hello,

    Glad to hear from you 🙂

    Unfortunately, there is no such parameter in the 360 view JS library and you can’t control it.

    Regards

Viewing 6 posts - 1 through 6 (of 6 total)