{"__v":0,"_id":"58796782cd4a9c37007c9750","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f1","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"__v":4,"_id":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","createdAt":"2017-01-13T23:49:21.393Z","releaseDate":"2017-01-13T23:49:21.393Z","categories":["58796781cd4a9c37007c96f0","58796781cd4a9c37007c96f1","58796781cd4a9c37007c96f2","58796781cd4a9c37007c96f3","58796781cd4a9c37007c96f4","58796781cd4a9c37007c96f5","58796781cd4a9c37007c96f6","58796781cd4a9c37007c96f7","58796781cd4a9c37007c96f8","58796781cd4a9c37007c96f9","58796781cd4a9c37007c96fa","58796781cd4a9c37007c96fb","58796781cd4a9c37007c96fc","58796781cd4a9c37007c96fd","58796781cd4a9c37007c96fe","58796781cd4a9c37007c96ff","58796781cd4a9c37007c9700","58b157ca1756cf370022f90d","58b1596f5dae732f00adeca2","58b1605a5dae732f00adecb1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mukota","version_clean":"3.1.0","version":"3.1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-31T16:56:44.225Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"## Overview\n\nThis canvas adds a frames per second text element to the headset. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas:\n\n* Select `FramesPerSecondCanvas` object from the scene objects\n* Find the `Canvas` component\n* Set the `Render Camera` parameter to the camera used by the VR Headset (e.g. SteamVR: [CameraRig]-> Camera(Head) -> Camera(eye)])\n\nThis script is pretty much a copy and paste from 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 This canvas adds a frames per second text element to the headset. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas: * Select `FramesPerSecondCanvas` object from the scene objects * Find the `Canvas` component * Set the `Render Camera` parameter to the camera used by the VR Headset (e.g. SteamVR: [CameraRig]-> Camera(Head) -> Camera(eye)]) This script is pretty much a copy and paste from 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.