{"_id":"58f7a4c9cbd001190056cc35","__v":0,"user":"579fce4e1435850e00dfbbbb","version":{"_id":"58f7a4c8cbd001190056cbf8","__v":1,"project":"578c4badbd223d2000cc1441","createdAt":"2017-04-19T17:56:24.172Z","releaseDate":"2017-04-19T17:56:24.172Z","categories":["58f7a4c8cbd001190056cbf9","58f7a4c8cbd001190056cbfa","58f7a4c8cbd001190056cbfb","58f7a4c8cbd001190056cbfc","58f7a4c8cbd001190056cbfd","58f7a4c8cbd001190056cbfe"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1.0"},"category":{"_id":"58f7a4c8cbd001190056cbfc","__v":0,"version":"58f7a4c8cbd001190056cbf8","project":"578c4badbd223d2000cc1441","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-18T21:08:45.730Z","from_sync":false,"order":3,"slug":"develop","title":"Develop"},"project":"578c4badbd223d2000cc1441","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-24T04:34:57.318Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Input events are triggered by users through input controllers like daydream or cardboard. Viro UI controls then respond to them via event handlers in a bubbled up fashion; events are passed up the view hierarchy until it encounters a component that can handle it.\n\nThere are many kinds of events: ```onHover```,  ```onClick```, ```onClickState```, ```onDrag```, ```onScroll```, ```onSwipe```, ```onFuse``` and ```onTouch```. Not all components can respond to these events; please refer to each component's properties in the API reference to make that determination. The details of each event type and sample code are shown further down below.\n\nAll triggered events originate from a given controller input source. This allows developers to easily differentiate which input button is being pressed, or from which hand held controller the user is performing a click or hover action on. As such, each Viro event handler callback always provides a unique numeric source identifier that corresponds to an input source on the physical controller. You can view a mapping of input source ids to Gear, Cardboard and Daydream below. \n[block:api-header]\n{\n  \"title\": \"Event Handlers\"\n}\n[/block]\nThese methods are used to register behaviors to take effect when the user interacts with Viro UI Controls.\n\n** onClick(source)**\nViro components fire ```onClick``` events when the user taps while focused on a component. \n\n** onClickState(state, source)**\nViro components fires ```onClickState``` events is triggered for each click state as a component is clicked - mainly click down, click up and clicked.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"State Numeric Value\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"0-1\": \"Click Down: Triggered when the user has performed a click down action while hovering on this control\",\n    \"1-1\": \"Click Up: Triggered when the user has performed a click up action while hovering on this control\",\n    \"2-1\": \"Triggered when the user has performed both a click down and click up action on this control sequentially, thereby having \\\"Clicked\\\" the object\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n** onDrag(position, source)**\nViro components fire ```onDrag``` events when they are being dragged by the user; that is, when the user performs a click down on a view, holds that click, and then physically moves the controller (or tilts the headset), it would also drag the ui view in vr. As the object is dragged, the onDrag event callback is then triggered with the new 3d location that the object has been dragged to. It is also important to note, that an onDrag event must be assigned to a Viro Component to make it draggable. \n\n** onFuse(source)**\nViro components fire ```onFuse``` events when the user hovers his reticle over the component and remains hovered for a certain duration of timeToFuse in milliseconds. The timeToFuse parameter is optional and is defaulted to 2000ms. \n\n** onScroll(scrollPosition, source)**\nViro components fire ```onScroll``` events when they are being scrolled on by the user; that is, when the user scrolls on a touch pad while hovering on top of the targeted view. The distance of which the user has scrolled by is given as a unit ratio of the touch pad from 0.0 to 1.0 for both x and y coordinates.\n\n** onSwipe(swipeState, source)**\nViro components fire ```onSwipe``` events when the user swipes in a certain direction on a controller's touch pad, while *hovering* on top of the targeted view. \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"3-0\": \"4\",\n    \"0-1\": \"Swiped Up\",\n    \"1-1\": \"Swiped Down\",\n    \"2-1\": \"Swiped Left\",\n    \"3-1\": \"Swiped Right\",\n    \"h-0\": \"State Numeric Value\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n** onTouch(touchState, touchPosition, source)**\nViro components fire ```onTouch``` events when the user performs a touch gesture on the touch pad of the physical control. \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"h-0\": \"State Numeric Value\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Touch Down: Triggered when the user  makes physical contact with the touch pad on the controller\",\n    \"1-1\": \"Touch Down Move: Called when the user moves around the touch pad immediately after having performed a Touch Down action\",\n    \"2-1\": \"Touch Up: Triggered after the user is no longer in physical contact with the touch pad after a Touch Down action\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Example Code\"\n}\n[/block]\nHere is a code snippet where we implement several event callbacks for a even ViroImage within a scene.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"'use strict';\\n\\nimport React, { Component } from 'react';\\nimport {\\n  StyleSheet,\\n  ViroScene,\\n  ViroImage,\\n} from 'react-viro';\\n\\nvar OnHoverExample = React.createClass({\\n  render: function() {\\n    return (\\n      <ViroScene>\\n     \\t  <ViroImage source={require('./res/myimg.jpg')} \\n                   position={[0, -.5, -2]} scale={[.1, .1, .1]} \\n                   onClick={this._onClick}\\n                   onClickState={this._onClickState}\\n                   onDrag={this._onDrag}\\n                   onHover={this._onHoverDoSomething}\\n                   onScroll={this._onScroll}\\n                   onSwipe={this._onSwipe}\\n                   onTouch={this._onTouch}\\n                   onFuse={{callback:this._onFuse, timeToFuse:3000}}/>\\n      </ViroScene>\\n    );\\n  }, \\n    \\n  _onClick(source) {\\n    console.log(\\\"We just Clicked the image!\\\");\\n  },\\n    \\n  _onClickState(state, source) {\\n    if(stateValue == 1) {\\n        console.log(\\\"User has click-down on the image!\\\");\\n    } else if(stateValue == 2) {\\n        console.log(\\\"User has click-up on the image!\\\");\\n    } else if(stateValue == 3) { \\n        console.log(\\\"User has finally clicked on the image!\\\");\\n    }\\n  },\\n    \\n  _onDrag(draggedToPosition, source) {\\n    console.log(\\\"Dragged to: x\\\" + draggedToPosition[0] + \\\" y:\\\" + draggedToPosition[1] + \\\" z: \\\" + draggedToPosition[2]); \\n  },\\n    \\n  _onHoverDoSomething(isHovering, source) {\\n    if(isHovering) {\\n      console.log(\\\"We are hovering onto the image!\\\");\\n    }else{\\n      console.log(\\\"We are not longer hovering on the image!\\\");\\n    }  \\t\\n  },\\n  \\n  _onScroll(scrollPosition, source) {\\n\\t\\t console.log(\\\"Scrolled to: x\\\" + scrollPosition[0] + \\\" y:\\\" + scrollPosition[1]); \\n  },\\n    \\n  _onSwipe(swipeState, source) {\\n    if(swipeState == 1) {\\n        console.log(\\\"Swiped up\\\");\\n    } else if(swipeState == 2) {\\n        console.log(\\\"Swiped down\\\");\\n    } else if(swipeState == 3) { \\n       console.log(\\\"Swiped left\\\");\\n    } else if(swipeState == 4) { \\n       console.log(\\\"Swiped right\\\");\\n    }\\n  },\\n  \\n  _onTouch(state, touchPos, source)  {\\n   var touchX = touchPos[0];\\n   var touchY = touchPos[1];\\n    if(state == 1) {\\n        // Touch Down\\n    } else if(state == 2) {\\n        // Touch Down Move\\n    } else if(state == 3) { \\n        // Touch Up\\n    }\\n  },\\n  \\n  _onFuse(source){\\n   // User has hovered over object for timeToFuse milliseconds\\n  },  \\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Event Handle Assignment\"\n}\n[/block]\nWe can also assign the same event handler callback to multiple objects. You can differentiate which control the event has been trigged on by passing an \"object Tag\" to a lambda function as a part of the event callback.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"'use strict';\\n\\nimport React, { Component } from 'react';\\nimport {\\n  StyleSheet,\\n  ViroScene,\\n  ViroImage,\\n} from 'react-viro';\\n\\nvar OnHoverExample = React.createClass({\\n  render: function() {\\n    return (\\n      <ViroScene>\\n     \\t  <ViroImage source={require('./res/myimg.jpg')} \\n                   position={[0, -.5, -2]} scale={[.1, .1, .1]} \\n                   onClick={this._onClick(\\\"Image 1\\\")}/>\\n        <ViroImage source={require('./res/myimg.jpg')} \\n                   position={[0, 0, -2]} scale={[.1, .1, .1]} \\n                   onClick={this._onClick(\\\"Image 2\\\")}/>\\n        <ViroImage source={require('./res/myimg.jpg')} \\n                   position={[0, .5, -2]} scale={[.1, .1, .1]} \\n                   onClick={this._onClick(\\\"Image 3\\\")}/>           \\n      </ViroScene>\\n    );\\n  }, \\n    \\n  _onClick(objectTag) {\\n    return (source) => {\\n    \\tconsole.log(\\\"We just clicked on the \\\" + objectTag);\\n      \\n      if (objectTag == \\\"Image 3\\\"){\\n      \\t// Do something else.\\n      }\\n    }\\n  }\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Supported Controllers\"\n}\n[/block]\nAt the very least, both onHover and onClick are guaranteed to be supported events across all platforms. However, due to the physical limitations of controllers on each platform, certain input events as shown below may not be supported.\n\n|Events|Daydream|GearVR|Android Cardboard| IOS Cardboard|\n|:------|:----------:|:----------:|:----------:|:----------:|\n|onHover| Supported |Supported |Supported |Supported |\n|onClick| Supported|Supported |Supported |Supported |\n|onClickState| Supported|Supported |Supported |Not Supported |\n|onDrag| Supported|Supported |Supported |Not Supported |\n|onScroll| Supported|Not Supported |Not Supported |Not Supported |\n|onSwipe| Supported|Supported |Not Supported |Not Supported |\n|onTouch| Supported|Supported |Not Supported |Not Supported |\n\nDifferent types of controllers may result in different forms of interactivity or ui. For example, users can easily scroll through galleries with daydream's touch pad, but additional ui buttons may need to be provided for Cardboard Android. \n\nTo account for the different types of controllers in your code, you can utilize the scene's onPlatformUpdate() callback function to be notified of platform specific information. You can then filter based on Controller type, so as to render the desired ui layout corresponding to the platform. It is also important to note that deploying an app with implemented unsupported event callbacks is safe and results to a no-op.\n[block:api-header]\n{\n  \"title\": \"Platform Specific Input Source Identifiers\"\n}\n[/block]\nAs mentioned above, a unique numeric source identifier that corresponds to an input source on the physical controller. This section will go through the mappings of sources for Cardboard, GearVR and Daydream.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4c75011-controller_cardboard.png\",\n        \"controller_cardboard.png\",\n        800,\n        511,\n        \"#747474\"\n      ],\n      \"caption\": \"Cardboard (Android & iOS)\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Input Source Value\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"0-1\": \"Main Controller\",\n    \"1-1\": \"Primary Cardboard Trigger\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a5b7f83-controller_gear_vr.png\",\n        \"controller_gear_vr.png\",\n        800,\n        511,\n        \"#747474\"\n      ],\n      \"caption\": \"GearVR\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Input Source Value\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"1\",\n    \"0-1\": \"Main Controller\",\n    \"1-0\": \"2\",\n    \"1-1\": \"Gear Touch Pad\",\n    \"2-0\": \"3\",\n    \"2-1\": \"Gear Back Button\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/71bb4df-controller_daydream.png\",\n        \"controller_daydream.png\",\n        800,\n        511,\n        \"#747474\"\n      ],\n      \"caption\": \"Daydream\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Input Source Value\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"3-0\": \"4\",\n    \"4-0\": \"5\",\n    \"5-0\": \"6\",\n    \"0-1\": \"Main Controller\",\n    \"1-1\": \"Daydream TouchPad\",\n    \"2-1\": \"Daydream App Button\",\n    \"3-1\": \"Daydream Home Button\",\n    \"4-1\": \"Volume Up Button\",\n    \"5-1\": \"Volume Down Button\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"\"\n}\n[/block]","excerpt":"","slug":"events","type":"basic","title":"Input Events"}
Input events are triggered by users through input controllers like daydream or cardboard. Viro UI controls then respond to them via event handlers in a bubbled up fashion; events are passed up the view hierarchy until it encounters a component that can handle it. There are many kinds of events: ```onHover```, ```onClick```, ```onClickState```, ```onDrag```, ```onScroll```, ```onSwipe```, ```onFuse``` and ```onTouch```. Not all components can respond to these events; please refer to each component's properties in the API reference to make that determination. The details of each event type and sample code are shown further down below. All triggered events originate from a given controller input source. This allows developers to easily differentiate which input button is being pressed, or from which hand held controller the user is performing a click or hover action on. As such, each Viro event handler callback always provides a unique numeric source identifier that corresponds to an input source on the physical controller. You can view a mapping of input source ids to Gear, Cardboard and Daydream below. [block:api-header] { "title": "Event Handlers" } [/block] These methods are used to register behaviors to take effect when the user interacts with Viro UI Controls. ** onClick(source)** Viro components fire ```onClick``` events when the user taps while focused on a component. ** onClickState(state, source)** Viro components fires ```onClickState``` events is triggered for each click state as a component is clicked - mainly click down, click up and clicked. [block:parameters] { "data": { "h-0": "State Numeric Value", "h-1": "Description", "0-0": "1", "1-0": "2", "2-0": "3", "0-1": "Click Down: Triggered when the user has performed a click down action while hovering on this control", "1-1": "Click Up: Triggered when the user has performed a click up action while hovering on this control", "2-1": "Triggered when the user has performed both a click down and click up action on this control sequentially, thereby having \"Clicked\" the object" }, "cols": 2, "rows": 3 } [/block] ** onDrag(position, source)** Viro components fire ```onDrag``` events when they are being dragged by the user; that is, when the user performs a click down on a view, holds that click, and then physically moves the controller (or tilts the headset), it would also drag the ui view in vr. As the object is dragged, the onDrag event callback is then triggered with the new 3d location that the object has been dragged to. It is also important to note, that an onDrag event must be assigned to a Viro Component to make it draggable. ** onFuse(source)** Viro components fire ```onFuse``` events when the user hovers his reticle over the component and remains hovered for a certain duration of timeToFuse in milliseconds. The timeToFuse parameter is optional and is defaulted to 2000ms. ** onScroll(scrollPosition, source)** Viro components fire ```onScroll``` events when they are being scrolled on by the user; that is, when the user scrolls on a touch pad while hovering on top of the targeted view. The distance of which the user has scrolled by is given as a unit ratio of the touch pad from 0.0 to 1.0 for both x and y coordinates. ** onSwipe(swipeState, source)** Viro components fire ```onSwipe``` events when the user swipes in a certain direction on a controller's touch pad, while *hovering* on top of the targeted view. [block:parameters] { "data": { "0-0": "1", "1-0": "2", "2-0": "3", "3-0": "4", "0-1": "Swiped Up", "1-1": "Swiped Down", "2-1": "Swiped Left", "3-1": "Swiped Right", "h-0": "State Numeric Value" }, "cols": 2, "rows": 4 } [/block] ** onTouch(touchState, touchPosition, source)** Viro components fire ```onTouch``` events when the user performs a touch gesture on the touch pad of the physical control. [block:parameters] { "data": { "0-0": "1", "1-0": "2", "2-0": "3", "h-0": "State Numeric Value", "h-1": "Description", "0-1": "Touch Down: Triggered when the user makes physical contact with the touch pad on the controller", "1-1": "Touch Down Move: Called when the user moves around the touch pad immediately after having performed a Touch Down action", "2-1": "Touch Up: Triggered after the user is no longer in physical contact with the touch pad after a Touch Down action" }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "title": "Example Code" } [/block] Here is a code snippet where we implement several event callbacks for a even ViroImage within a scene. [block:code] { "codes": [ { "code": "'use strict';\n\nimport React, { Component } from 'react';\nimport {\n StyleSheet,\n ViroScene,\n ViroImage,\n} from 'react-viro';\n\nvar OnHoverExample = React.createClass({\n render: function() {\n return (\n <ViroScene>\n \t <ViroImage source={require('./res/myimg.jpg')} \n position={[0, -.5, -2]} scale={[.1, .1, .1]} \n onClick={this._onClick}\n onClickState={this._onClickState}\n onDrag={this._onDrag}\n onHover={this._onHoverDoSomething}\n onScroll={this._onScroll}\n onSwipe={this._onSwipe}\n onTouch={this._onTouch}\n onFuse={{callback:this._onFuse, timeToFuse:3000}}/>\n </ViroScene>\n );\n }, \n \n _onClick(source) {\n console.log(\"We just Clicked the image!\");\n },\n \n _onClickState(state, source) {\n if(stateValue == 1) {\n console.log(\"User has click-down on the image!\");\n } else if(stateValue == 2) {\n console.log(\"User has click-up on the image!\");\n } else if(stateValue == 3) { \n console.log(\"User has finally clicked on the image!\");\n }\n },\n \n _onDrag(draggedToPosition, source) {\n console.log(\"Dragged to: x\" + draggedToPosition[0] + \" y:\" + draggedToPosition[1] + \" z: \" + draggedToPosition[2]); \n },\n \n _onHoverDoSomething(isHovering, source) {\n if(isHovering) {\n console.log(\"We are hovering onto the image!\");\n }else{\n console.log(\"We are not longer hovering on the image!\");\n } \t\n },\n \n _onScroll(scrollPosition, source) {\n\t\t console.log(\"Scrolled to: x\" + scrollPosition[0] + \" y:\" + scrollPosition[1]); \n },\n \n _onSwipe(swipeState, source) {\n if(swipeState == 1) {\n console.log(\"Swiped up\");\n } else if(swipeState == 2) {\n console.log(\"Swiped down\");\n } else if(swipeState == 3) { \n console.log(\"Swiped left\");\n } else if(swipeState == 4) { \n console.log(\"Swiped right\");\n }\n },\n \n _onTouch(state, touchPos, source) {\n var touchX = touchPos[0];\n var touchY = touchPos[1];\n if(state == 1) {\n // Touch Down\n } else if(state == 2) {\n // Touch Down Move\n } else if(state == 3) { \n // Touch Up\n }\n },\n \n _onFuse(source){\n // User has hovered over object for timeToFuse milliseconds\n }, \n});", "language": "javascript" } ] } [/block] [block:api-header] { "title": "Event Handle Assignment" } [/block] We can also assign the same event handler callback to multiple objects. You can differentiate which control the event has been trigged on by passing an "object Tag" to a lambda function as a part of the event callback. [block:code] { "codes": [ { "code": "'use strict';\n\nimport React, { Component } from 'react';\nimport {\n StyleSheet,\n ViroScene,\n ViroImage,\n} from 'react-viro';\n\nvar OnHoverExample = React.createClass({\n render: function() {\n return (\n <ViroScene>\n \t <ViroImage source={require('./res/myimg.jpg')} \n position={[0, -.5, -2]} scale={[.1, .1, .1]} \n onClick={this._onClick(\"Image 1\")}/>\n <ViroImage source={require('./res/myimg.jpg')} \n position={[0, 0, -2]} scale={[.1, .1, .1]} \n onClick={this._onClick(\"Image 2\")}/>\n <ViroImage source={require('./res/myimg.jpg')} \n position={[0, .5, -2]} scale={[.1, .1, .1]} \n onClick={this._onClick(\"Image 3\")}/> \n </ViroScene>\n );\n }, \n \n _onClick(objectTag) {\n return (source) => {\n \tconsole.log(\"We just clicked on the \" + objectTag);\n \n if (objectTag == \"Image 3\"){\n \t// Do something else.\n }\n }\n }\n});", "language": "javascript" } ] } [/block] [block:api-header] { "title": "Supported Controllers" } [/block] At the very least, both onHover and onClick are guaranteed to be supported events across all platforms. However, due to the physical limitations of controllers on each platform, certain input events as shown below may not be supported. |Events|Daydream|GearVR|Android Cardboard| IOS Cardboard| |:------|:----------:|:----------:|:----------:|:----------:| |onHover| Supported |Supported |Supported |Supported | |onClick| Supported|Supported |Supported |Supported | |onClickState| Supported|Supported |Supported |Not Supported | |onDrag| Supported|Supported |Supported |Not Supported | |onScroll| Supported|Not Supported |Not Supported |Not Supported | |onSwipe| Supported|Supported |Not Supported |Not Supported | |onTouch| Supported|Supported |Not Supported |Not Supported | Different types of controllers may result in different forms of interactivity or ui. For example, users can easily scroll through galleries with daydream's touch pad, but additional ui buttons may need to be provided for Cardboard Android. To account for the different types of controllers in your code, you can utilize the scene's onPlatformUpdate() callback function to be notified of platform specific information. You can then filter based on Controller type, so as to render the desired ui layout corresponding to the platform. It is also important to note that deploying an app with implemented unsupported event callbacks is safe and results to a no-op. [block:api-header] { "title": "Platform Specific Input Source Identifiers" } [/block] As mentioned above, a unique numeric source identifier that corresponds to an input source on the physical controller. This section will go through the mappings of sources for Cardboard, GearVR and Daydream. [block:image] { "images": [ { "image": [ "https://files.readme.io/4c75011-controller_cardboard.png", "controller_cardboard.png", 800, 511, "#747474" ], "caption": "Cardboard (Android & iOS)" } ] } [/block] [block:parameters] { "data": { "h-0": "Input Source Value", "h-1": "Description", "0-0": "1", "1-0": "2", "0-1": "Main Controller", "1-1": "Primary Cardboard Trigger" }, "cols": 2, "rows": 2 } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/a5b7f83-controller_gear_vr.png", "controller_gear_vr.png", 800, 511, "#747474" ], "caption": "GearVR" } ] } [/block] [block:parameters] { "data": { "h-0": "Input Source Value", "h-1": "Description", "0-0": "1", "0-1": "Main Controller", "1-0": "2", "1-1": "Gear Touch Pad", "2-0": "3", "2-1": "Gear Back Button" }, "cols": 2, "rows": 3 } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/71bb4df-controller_daydream.png", "controller_daydream.png", 800, 511, "#747474" ], "caption": "Daydream" } ] } [/block] [block:parameters] { "data": { "h-0": "Input Source Value", "h-1": "Description", "0-0": "1", "1-0": "2", "2-0": "3", "3-0": "4", "4-0": "5", "5-0": "6", "0-1": "Main Controller", "1-1": "Daydream TouchPad", "2-1": "Daydream App Button", "3-1": "Daydream Home Button", "4-1": "Volume Up Button", "5-1": "Volume Down Button" }, "cols": 2, "rows": 6 } [/block] [block:api-header] { "title": "" } [/block]