{"_id":"5ade3c180916ec000353abe8","category":{"_id":"5ade3c170916ec000353ab9e","version":"5ade3c170916ec000353ab98","project":"578c4badbd223d2000cc1441","__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"},"project":"578c4badbd223d2000cc1441","parentDoc":null,"user":"57bb7defafc18c0e00529cf1","version":{"_id":"5ade3c170916ec000353ab98","project":"578c4badbd223d2000cc1441","__v":1,"createdAt":"2018-04-23T20:03:35.726Z","releaseDate":"2018-04-23T20:03:35.726Z","categories":["5ade3c170916ec000353ab99","5ade3c170916ec000353ab9a","5ade3c170916ec000353ab9b","5ade3c170916ec000353ab9c","5ade3c170916ec000353ab9d","5ade3c170916ec000353ab9e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.6.1","version":"2.6.1"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-18T04:02:33.081Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":88,"body":"A light object that emits a omni light. 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[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<ViroOmniLight\\n    color=\\\"#ffffff\\\"\\n    attenuationStartDistance={2}\\n    attenuationEndDistance={6}\\n    position={[0,-5,5]}\\n />\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\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    \"5-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\\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    \"5-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nCartesian position of the light in 3D world space, specified as [x, y, z]. Default position is [0,0,0].\",\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    \"4-0\": \"**intensity**\",\n    \"3-0\": \"**influenceBitMask**\",\n    \"3-1\": \"**PropTypes.number**\\n\\nThis property is used to make lights apply to specific nodes. Lights and nodes in the scene can be assigned bit-masks to determine how each light influences each node. \\n\\nDuring rendering, Viro compares each light's influenceBitMask with each node's lightReceivingBitMask and shadowCastingBitMask. The bit-masks are compared using a bitwise AND operation:\\n\\nIf ```(influenceBitMask & lightReceivingBitMask) != 0```, then the light will illuminate the node (and the node will receive shadows cast from objects occluding the light).\\n\\nIf ```(influenceBitMask & shadowCastingBitMask) != 0```, then the node will cast shadows from the light.\\n\\nThe default mask is 0x1.\",\n    \"4-1\": \"**PropTypes.number**\\n\\nSet the intensity of this Light. Set to 1000 for normal intensity. When using physically-based rendering, this value is specified in Lumens. When using non-physical rendering, the intensity is simply divided by 1000 and multiplied by the Light's color.\\n\\nLower intensities will decrease the brightness of the light, and higher intensities will increase the brightness of the light.\",\n    \"6-0\": \"**temperature**\",\n    \"6-1\": \"**PropTypes.number**\\n\\nThe temperature of the light, in Kelvin. Viro will derive a hue from this temperature and multiply it by the light's color. To model a physical light with a known temperature, you can leave the color of this Light set to (1.0, 1.0, 1.0) and set its temperature only.\\n\\nThe default value for temperature is 6500K, which represents pure white light.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Methods\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"setNativeProps(nativeProps: object)\",\n    \"0-0\": \"A wrapper function around the native component's setNativeProps which allow users to set values on the native component without changing state/setting props and re-rendering. Refer to the React Native documentation on [Direct Manipulation](https://facebook.github.io/react-native/docs/direct-manipulation.html) for more information.\\n\\n|Parameter|Description|\\n|---|---|\\n|nativeProps | an object where the keys are the properties to set and the values are the values to set  |\\n\\nFor example, setting position natively would look like this:\\n\\n```\\ncomponentRef.setNativeProps({\\n    position : [0, 0, -1]\\n});\\n```\"\n  },\n  \"cols\": 1,\n  \"rows\": 1\n}\n[/block]","excerpt":"","slug":"viroomnilight","type":"basic","title":"ViroOmniLight"}
A light object that emits a omni light. See our [Lighting and Material Guide](http://viro.readme.io/docs/3d-scene-lighting) for more information on lights in a scene. ######Example use: [block:code] { "codes": [ { "code": "<ViroOmniLight\n color=\"#ffffff\"\n attenuationStartDistance={2}\n attenuationEndDistance={6}\n position={[0,-5,5]}\n />", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "Props" } [/block] ##Optional Props [block:parameters] { "data": { "0-0": "**attenuationEndDistance**", "1-0": "**attenuationStartDistance**", "2-0": "**color**", "5-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\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)", "5-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nCartesian position of the light in 3D world space, specified as [x, y, z]. Default position is [0,0,0].", "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.", "4-0": "**intensity**", "3-0": "**influenceBitMask**", "3-1": "**PropTypes.number**\n\nThis property is used to make lights apply to specific nodes. Lights and nodes in the scene can be assigned bit-masks to determine how each light influences each node. \n\nDuring rendering, Viro compares each light's influenceBitMask with each node's lightReceivingBitMask and shadowCastingBitMask. The bit-masks are compared using a bitwise AND operation:\n\nIf ```(influenceBitMask & lightReceivingBitMask) != 0```, then the light will illuminate the node (and the node will receive shadows cast from objects occluding the light).\n\nIf ```(influenceBitMask & shadowCastingBitMask) != 0```, then the node will cast shadows from the light.\n\nThe default mask is 0x1.", "4-1": "**PropTypes.number**\n\nSet the intensity of this Light. Set to 1000 for normal intensity. When using physically-based rendering, this value is specified in Lumens. When using non-physical rendering, the intensity is simply divided by 1000 and multiplied by the Light's color.\n\nLower intensities will decrease the brightness of the light, and higher intensities will increase the brightness of the light.", "6-0": "**temperature**", "6-1": "**PropTypes.number**\n\nThe temperature of the light, in Kelvin. Viro will derive a hue from this temperature and multiply it by the light's color. To model a physical light with a known temperature, you can leave the color of this Light set to (1.0, 1.0, 1.0) and set its temperature only.\n\nThe default value for temperature is 6500K, which represents pure white light." }, "cols": 2, "rows": 7 } [/block] [block:api-header] { "title": "Methods" } [/block] [block:parameters] { "data": { "h-0": "setNativeProps(nativeProps: object)", "0-0": "A wrapper function around the native component's setNativeProps which allow users to set values on the native component without changing state/setting props and re-rendering. Refer to the React Native documentation on [Direct Manipulation](https://facebook.github.io/react-native/docs/direct-manipulation.html) for more information.\n\n|Parameter|Description|\n|---|---|\n|nativeProps | an object where the keys are the properties to set and the values are the values to set |\n\nFor example, setting position natively would look like this:\n\n```\ncomponentRef.setNativeProps({\n position : [0, 0, -1]\n});\n```" }, "cols": 1, "rows": 1 } [/block]