{"_id":"5b1f8576c2505d000312549e","category":{"_id":"5b1f8576c2505d0003125425","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"user":"571fa519db52d01700f5cf3d","parentDoc":null,"project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-31T16:56:44.225Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Overview\n\nProvides a frames per second text element to the HMD view. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas:\n\n**Prefab Usage:**\n * Place the `VRTK/Prefabs/FramesPerSecondCanvas/FramesPerSecondCanvas` prefab in the scene hierarchy.\n\n  > This script is largely based on the script at: http://talesfromtherift.com/vr-fps-counter/ So all credit to Peter Koch for his work. Twitter: :::at:::peterept\n\n## Inspector Parameters\n\n * **Display FPS:** Toggles whether the FPS text is visible.\n * **Target FPS:** The frames per second deemed acceptable that is used as the benchmark to change the FPS text colour.\n * **Font Size:** The size of the font the FPS is displayed in.\n * **Position:** The position of the FPS text within the headset view.\n * **Good Color:** The colour of the FPS text when the frames per second are within reasonable limits of the Target FPS.\n * **Warn Color:** The colour of the FPS text when the frames per second are falling short of reasonable limits of the Target FPS.\n * **Bad Color:** The colour of the FPS text when the frames per second are at an unreasonable level of the Target FPS.\n\n## Example\n\n`VRTK/Examples/018_CameraRig_FramesPerSecondCounter` displays the frames per second in the centre of the headset view. Pressing the trigger generates a new sphere and pressing the touchpad generates ten new spheres. Eventually when lots of spheres are present the FPS will drop and demonstrate the prefab.","excerpt":"","slug":"framespersecondcanvas","type":"basic","title":"Frames Per Second Viewer"}

Frames Per Second Viewer


## Overview Provides a frames per second text element to the HMD view. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas: **Prefab Usage:** * Place the `VRTK/Prefabs/FramesPerSecondCanvas/FramesPerSecondCanvas` prefab in the scene hierarchy. > This script is largely based on the script at: http://talesfromtherift.com/vr-fps-counter/ So all credit to Peter Koch for his work. Twitter: @peterept ## Inspector Parameters * **Display FPS:** Toggles whether the FPS text is visible. * **Target FPS:** The frames per second deemed acceptable that is used as the benchmark to change the FPS text colour. * **Font Size:** The size of the font the FPS is displayed in. * **Position:** The position of the FPS text within the headset view. * **Good Color:** The colour of the FPS text when the frames per second are within reasonable limits of the Target FPS. * **Warn Color:** The colour of the FPS text when the frames per second are falling short of reasonable limits of the Target FPS. * **Bad Color:** The colour of the FPS text when the frames per second are at an unreasonable level of the Target FPS. ## Example `VRTK/Examples/018_CameraRig_FramesPerSecondCounter` displays the frames per second in the centre of the headset view. Pressing the trigger generates a new sphere and pressing the touchpad generates ten new spheres. Eventually when lots of spheres are present the FPS will drop and demonstrate the prefab.