The idleView plugin (formerly simplexIdle) uses Simplex noise to look around and zoom when the panorama is idle. The movement is random but not as random as Brownian motion. Simplex noise, like Perlin noise, interpolates between random numbers. The result is a motion that could be perceived as life-like.
IdleView is on Github. If you find any issues you can add them there.
<plugin name="idleView" url="idleView.js" keep="true" />
The attributes that can be added to the <plugin/> node are:
The plugin throws a number of events for you to hook into. The events are dispatched from window. The example below (also in the source) will show how this works.
The idleViewInitialized
can be used to easily access the plugin. It is dispatched as soon as the plugin is initialised. All XML properties can be changed through the plugins Javascript object.
window.addEventListener('idleViewInitialized',function(e){ var oIdleView = e.detail; console.log('frequencyh',oIdleView.frequencyh); });
Dispatched when idling starts.
window.addEventListener('idleViewStart',function(){ document.body.classList.add('idling'); });
Dispatched when idling ends.
window.addEventListener('idleViewEnd',function(){ document.body.classList.remove('idling'); });