Hi Klaus!
Changing hotspot.alpha via tweens in infinite animation causes infinite onviewchanged even if the view is not changing. This is due to WebGL rendering of hotspots. Please check why the engine reacts like this.
I have some code that uses the onviewchanged event and I'm finding that onviewchanged is firing infinitely even though the view is not changing.
Below I have provided a small test that points to the problem. Also I did not find any fundamental difference between onviewchanged and onviewchange in my tests, could you give some explanations. Yes, I read the documentation well.
Code
<krpano version="1.22" onstart="showlog();">
<style name="test_hotspot_style"
renderer="webgl"
blendmode="add"
url="hotspot.png"
enabled="false"
/>
<scene name="scene_test" title="Test Scene" onstart="blink();" autoload="true">
<preview type="grid(cube,64,64,512,0x00FF00,0x000000,0x00FF00);" />
<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="100" />
<hotspot name="test_hotspot"
style="test_hotspot_style"
ath="0.0"
atv="0.0"
scale="1.0"
alpha="1.0"
bright="1.0"
/>
</scene>
<events name="test_events" keep="true"
onviewchanged="trace('onviewchanged triggered');"
/>
<action name="blink" scope="local">
set(random_alpha, get(random));
tween(hotspot[test_hotspot].alpha, get(random_alpha), 0.5, linear, blink();); <!-- alpha or scale or ... -->
</action>
</krpano>
Display More