fps.xml 652 Bytes
Newer Older
赵瑞's avatar
赵瑞 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<krpano>

	<!--
		fps (frames per second) xml plugin
		- this plugin shows the current average rendering frame-rate
	-->

	<action name="fps_install" autorun="preinit" scope="local">
		delayedcall(0.5,
			addlayer(fps_display);
			set(layer[fps_display],
				type=text,
				keep=true,
				align='lefttop',
				css=calc('font-size:'+(device.mobile AND stagescale LT 1.0 ? 24 : 12)+'px; color:#FFFFFF;'),
				txtshadow='0 0 1 0x000000 1.0',
				bg=false,
				parent=STAGE,
				vr=true,
				enabled=false
			);
			setinterval(fps_plugin, 0.5,
				calc(layer[fps_display].html, 'FPS: ' + ((display.currentfps+0.5) BOR 0));
			);
		);
	</action>

</krpano>