{"_id":"58f7a4c8cbd001190056cc21","__v":0,"user":"57bb7defafc18c0e00529cf1","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":"58f7a4c8cbd001190056cbfe","__v":0,"version":"58f7a4c8cbd001190056cbf8","project":"578c4badbd223d2000cc1441","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-01T23:04:12.838Z","from_sync":false,"order":5,"slug":"api-reference","title":"API Reference"},"project":"578c4badbd223d2000cc1441","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-18T01:05:54.948Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":25,"body":"A light object that emits a spotlight. 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 \n<ViroSpotLight\n    color=\"#ffffff\"\n    attenuationStartDistance={2}\n    attenuationEndDistance={6}\n    position={[0, -5, 5]}\n    direction={[0 -1, 0]}\n    innerAngle={0}\n    outerAngle={45}\n />\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Props\"\n}\n[/block]\n##Optional Props\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**attenuationEndDistance**\",\n    \"1-0\": \"**attenuationStartDistance**\",\n    \"2-0\": \"**color**\",\n    \"3-0\": \"**direction**\",\n    \"4-0\": \"**innerAngle**\",\n    \"5-0\": \"**outerAngle**\",\n    \"6-0\": \"**position**\",\n    \"7-0\": \"**rotation**\",\n    \"8-0\": \"**style**\",\n    \"9-0\": \"**text**\",\n    \"10-0\": \"**transformBehaviors**\",\n    \"12-0\": \"**visible**\",\n    \"11-0\": \"**width**\",\n    \"h-0\": \"PropKey\",\n    \"h-1\": \"PropType\",\n    \"0-1\": \"**PropTypes.number**\\n\\nObjects positioned at a distance greater than the  attenuation end distance from the lights position will receive no illumination from this light.\\n\\nThe default value is 10.\",\n    \"1-1\": \"**PropTypes.number**\\n\\nObjects positioned within the attenuation start distance will receive the lights full illumination.\\n\\nObjects positioned between the start and end distance will receive a proportion of the lights illumination, transitioning from full illumination to no illumination the further out from the lights position the object is.\\n\\nThe default value is 2.\",\n    \"2-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    \"3-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\n\\nA 3D unit vector, specified as [x, y, z] that represents the direction the spotlight 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 spot light would hit it from it's left side if it was was positioned to it's left.\",\n    \"4-1\": \"**PropTypes.number**\\n\\nA spotlight is defined to be a cone-shaped illumination. The cone is defined by a direction, position, innerAngle and outerAngle. The innerAngle is the the angle of light that provides full illumination of the the spotlight.\\n\\n The default is set to 0, which means objects only hitting the center of the spotlight will receive the lights full illumination.\",\n    \"5-1\": \"**PropTypes.number**\\n\\nA spotlight is defined to be a cone-shaped illumination. The cone is defined by a direction, position, innerAngle and outerAngle. The outerAngle is the the angle of light that provides the width of the cone shaped spotlight. \\n\\nThe default is set to 45, which means objects that lie outside the 45 degree cone will not be illuminated. The spotlights illumination transitions from full illumination to no illumination with full illumination being determined by the innerAngle prop.\",\n    \"6-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nCartesian position of the box in 3D world space, specified as [x, y, z].\",\n    \"7-1\": \"PropTypes.arrayOf(PropTypes.number)\\n\\nPut the PropType Description here.\",\n    \"8-1\": \"stylePropType\",\n    \"9-1\": \"PropTypes.string\\n\\nPut the PropType Description here.\",\n    \"10-1\": \"PropTypes.arrayOf(PropTypes.string)\\n\\nPut the PropType Description here.\",\n    \"11-1\": \"PropTypes.number\\n\\nPut the PropType Description here.\",\n    \"12-1\": \"PropTypes.bool\\n\\nPut the PropType Description here.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]","excerpt":"","slug":"virospotlight1","type":"basic","title":"ViroSpotLight"}
A light object that emits a spotlight. See our [Lighting and Material Guide](http://viro.readme.io/docs/3d-scene-lighting) for more information on lights in a scene. ######Example use: ``` <ViroSpotLight color="#ffffff" attenuationStartDistance={2} attenuationEndDistance={6} position={[0, -5, 5]} direction={[0 -1, 0]} innerAngle={0} outerAngle={45} /> ``` [block:api-header] { "type": "basic", "title": "Props" } [/block] ##Optional Props [block:parameters] { "data": { "0-0": "**attenuationEndDistance**", "1-0": "**attenuationStartDistance**", "2-0": "**color**", "3-0": "**direction**", "4-0": "**innerAngle**", "5-0": "**outerAngle**", "6-0": "**position**", "7-0": "**rotation**", "8-0": "**style**", "9-0": "**text**", "10-0": "**transformBehaviors**", "12-0": "**visible**", "11-0": "**width**", "h-0": "PropKey", "h-1": "PropType", "0-1": "**PropTypes.number**\n\nObjects positioned at a distance greater than the attenuation end distance from the lights position will receive no illumination from this light.\n\nThe default value is 10.", "1-1": "**PropTypes.number**\n\nObjects positioned within the attenuation start distance will receive the lights full illumination.\n\nObjects positioned between the start and end distance will receive a proportion of the lights illumination, transitioning from full illumination to no illumination the further out from the lights position the object is.\n\nThe default value is 2.", "2-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)", "3-1": "**PropTypes.arrayOf(PropTypes.number)**\n\n\nA 3D unit vector, specified as [x, y, z] that represents the direction the spotlight 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 spot light would hit it from it's left side if it was was positioned to it's left.", "4-1": "**PropTypes.number**\n\nA spotlight is defined to be a cone-shaped illumination. The cone is defined by a direction, position, innerAngle and outerAngle. The innerAngle is the the angle of light that provides full illumination of the the spotlight.\n\n The default is set to 0, which means objects only hitting the center of the spotlight will receive the lights full illumination.", "5-1": "**PropTypes.number**\n\nA spotlight is defined to be a cone-shaped illumination. The cone is defined by a direction, position, innerAngle and outerAngle. The outerAngle is the the angle of light that provides the width of the cone shaped spotlight. \n\nThe default is set to 45, which means objects that lie outside the 45 degree cone will not be illuminated. The spotlights illumination transitions from full illumination to no illumination with full illumination being determined by the innerAngle prop.", "6-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nCartesian position of the box in 3D world space, specified as [x, y, z].", "7-1": "PropTypes.arrayOf(PropTypes.number)\n\nPut the PropType Description here.", "8-1": "stylePropType", "9-1": "PropTypes.string\n\nPut the PropType Description here.", "10-1": "PropTypes.arrayOf(PropTypes.string)\n\nPut the PropType Description here.", "11-1": "PropTypes.number\n\nPut the PropType Description here.", "12-1": "PropTypes.bool\n\nPut the PropType Description here." }, "cols": 2, "rows": 7 } [/block]