1. Home
  2. Docs
  3. ZL WebGL Player
  4. ZOOMLOOK Actions
  5. spinTo

spinTo

* spinTo (frame, shortestWay)
* frame: Target frame number. Default: 1.
* shortestWay: The use the shortest possible way from the current to the target frame. Default: true.

Embed Code

				
					<div class="ZLContainer500">
    <div id="zoom" style="width:100%; height:500px;"></div>
</div>

<button onclick="spinTo(1)">
    Spin to frame 1
</button>
<button onclick="spinTo(40)">
    Spin to frame 40
</button>
<button onclick="spinTo(80)">
    Spin to frame 80
</button>
<button onclick="spinTo(120)">
    Spin to frame 120
</button>
<button onclick="spinTo(160,false)">
    Spin to frame 160
</button>


<script src="/zoomlook/assets/ZLWebGL.js"></script>
<script src="/zoomlook/assets/ZLPlayer.min.js"></script>
<script>
    const ZL = new ZLPlayer({
    			basePath: "https://us.zoomlook.cloud/zoomlookbook/zoomlook/pix/ZLGL360/",
    			clickLoad: false,
    			type: "animation",
    		});
    		ZL.loadZLView("HLLdsS-552645", "zoom");
    	
    		function spinTo(frame, shortestWay) {
    			ZL.spinTo(frame, shortestWay)
    		}
</script>
				
			

How can we help?