{"__v":0,"_id":"58f7a4c8cbd001190056cc12","category":{"version":"58f7a4c8cbd001190056cbf8","project":"578c4badbd223d2000cc1441","_id":"58f7a4c8cbd001190056cbfe","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-01T23:04:12.838Z","from_sync":false,"order":5,"slug":"api-reference","title":"API Reference"},"parentDoc":null,"project":"578c4badbd223d2000cc1441","user":"57bb7defafc18c0e00529cf1","version":{"__v":1,"_id":"58f7a4c8cbd001190056cbf8","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-18T04:02:52.521Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"A light object that emits a directional light, much like the sun. See our [Lighting and Material Guide](http://viro.readme.io/docs/3d-scene-lighting) for more information on lights in a scene.\n\n######Example use:\n```\n  {/* A directional light coming from directly above */}\n<ViroDirectionalLight\n    color=\"#ffffff\"\n    direction={[0, -1, 0]}\n />\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Props\"\n}\n[/block]\n##Required Props\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**direction**\",\n    \"0-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nA 3D unit vector, specified as [x, y, z] that represents the direction the light is facing. Values for each axis can be from -1 to 1. \\n\\nExample:\\n```\\ndirection={[1, 0, 0]}\\n```\\nThe above would make the light direction be towards positive x. So if an object was positioned at [0,0,0] the light would hit it from it's left side.\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n##Optional Props\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**color**\",\n    \"1-0\": \"**rotation**\",\n    \"2-0\": \"**style**\",\n    \"3-0\": \"**text**\",\n    \"4-0\": \"**transformBehaviors**\",\n    \"6-0\": \"**visible**\",\n    \"5-0\": \"**width**\",\n    \"h-0\": \"PropKey\",\n    \"h-1\": \"PropType\",\n    \"0-1\": \"**ColorPropType**\\n\\nThe color of the light. The default light color is white.\\n\\nValid color formats are:\\n\\n  * '#f0f' (#rgb)\\n  * '#f0fc' (#rgba)\\n  * '#ff00ff' (#rrggbb)\\n  * '#ff00ff00' (#rrggbbaa)\\n  * 'rgb(255, 255, 255)'\\n  * 'rgba(255, 255, 255, 1.0)'\\n  * 'hsl(360, 100%, 100%)'\\n  * 'hsla(360, 100%, 100%, 1.0)'\\n  * 'transparent'\\n  * 'red'\\n  * 0xff00ff00 (0xrrggbbaa)\",\n    \"1-1\": \"PropTypes.arrayOf(PropTypes.number)\\n\\nPut the PropType Description here.\",\n    \"2-1\": \"stylePropType\",\n    \"3-1\": \"PropTypes.string\\n\\nPut the PropType Description here.\",\n    \"4-1\": \"PropTypes.arrayOf(PropTypes.string)\\n\\nPut the PropType Description here.\",\n    \"5-1\": \"PropTypes.number\\n\\nPut the PropType Description here.\",\n    \"6-1\": \"PropTypes.bool\\n\\nPut the PropType Description here.\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]","excerpt":"","slug":"virodirectionallight-1","type":"basic","title":"ViroDirectionalLight"}

ViroDirectionalLight


A light object that emits a directional light, much like the sun. See our [Lighting and Material Guide](http://viro.readme.io/docs/3d-scene-lighting) for more information on lights in a scene. ######Example use: ``` {/* A directional light coming from directly above */} <ViroDirectionalLight color="#ffffff" direction={[0, -1, 0]} /> ``` [block:api-header] { "type": "basic", "title": "Props" } [/block] ##Required Props [block:parameters] { "data": { "0-0": "**direction**", "0-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nA 3D unit vector, specified as [x, y, z] that represents the direction the light is facing. Values for each axis can be from -1 to 1. \n\nExample:\n```\ndirection={[1, 0, 0]}\n```\nThe above would make the light direction be towards positive x. So if an object was positioned at [0,0,0] the light would hit it from it's left side." }, "cols": 2, "rows": 1 } [/block] ##Optional Props [block:parameters] { "data": { "0-0": "**color**", "1-0": "**rotation**", "2-0": "**style**", "3-0": "**text**", "4-0": "**transformBehaviors**", "6-0": "**visible**", "5-0": "**width**", "h-0": "PropKey", "h-1": "PropType", "0-1": "**ColorPropType**\n\nThe color of the light. The default light color is white.\n\nValid color formats are:\n\n * '#f0f' (#rgb)\n * '#f0fc' (#rgba)\n * '#ff00ff' (#rrggbb)\n * '#ff00ff00' (#rrggbbaa)\n * 'rgb(255, 255, 255)'\n * 'rgba(255, 255, 255, 1.0)'\n * 'hsl(360, 100%, 100%)'\n * 'hsla(360, 100%, 100%, 1.0)'\n * 'transparent'\n * 'red'\n * 0xff00ff00 (0xrrggbbaa)", "1-1": "PropTypes.arrayOf(PropTypes.number)\n\nPut the PropType Description here.", "2-1": "stylePropType", "3-1": "PropTypes.string\n\nPut the PropType Description here.", "4-1": "PropTypes.arrayOf(PropTypes.string)\n\nPut the PropType Description here.", "5-1": "PropTypes.number\n\nPut the PropType Description here.", "6-1": "PropTypes.bool\n\nPut the PropType Description here." }, "cols": 2, "rows": 1 } [/block]