fps.xml 652 B

1234567891011121314151617181920212223242526272829
  1. <krpano>
  2. <!--
  3. fps (frames per second) xml plugin
  4. - this plugin shows the current average rendering frame-rate
  5. -->
  6. <action name="fps_install" autorun="preinit" scope="local">
  7. delayedcall(0.5,
  8. addlayer(fps_display);
  9. set(layer[fps_display],
  10. type=text,
  11. keep=true,
  12. align='lefttop',
  13. css=calc('font-size:'+(device.mobile AND stagescale LT 1.0 ? 24 : 12)+'px; color:#FFFFFF;'),
  14. txtshadow='0 0 1 0x000000 1.0',
  15. bg=false,
  16. parent=STAGE,
  17. vr=true,
  18. enabled=false
  19. );
  20. setinterval(fps_plugin, 0.5,
  21. calc(layer[fps_display].html, 'FPS: ' + ((display.currentfps+0.5) BOR 0));
  22. );
  23. );
  24. </action>
  25. </krpano>