{"_id":"59bf5820bd9888001a6bc7c6","project":"578c4badbd223d2000cc1441","version":{"_id":"59bc03d31d2d8d001a34457d","project":"578c4badbd223d2000cc1441","__v":2,"createdAt":"2017-09-15T16:46:11.721Z","releaseDate":"2017-09-15T16:46:11.721Z","categories":["59bc03d31d2d8d001a34457e","59bc03d31d2d8d001a34457f","59bc03d31d2d8d001a344580","59bc03d31d2d8d001a344581","59bc03d31d2d8d001a344582","59bc03d31d2d8d001a344583","59bc284b7c3f420010f965e6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0.0"},"category":{"_id":"59bc03d31d2d8d001a344583","version":"59bc03d31d2d8d001a34457d","project":"578c4badbd223d2000cc1441","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-01T23:04:12.838Z","from_sync":false,"order":6,"slug":"api-reference","title":"API Reference"},"user":"57bb7defafc18c0e00529cf1","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-18T05:22:40.886Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":23,"body":"A ViroParticleEmitter is a particle factory that creates, contains, and recycles a pool of quad particles to create a particle effect. See the [Particle Effect](http://docs.viromedia.com/v2.0.0/docs/particle-effects) guide for more information.\n\n######Example use:\n```\n<ViroParticleEmitter\n  position={[0, 4.5, 0]}\n  duration={2000}\n  visible={true}\n  delay={0}\n  run={true}\n  loop={true}\n  fixedToEmitter={true}\n\n  image={{\n    source:require(\"./res/particle_snow.png\"),                 \n    height:0.1,\n    width:0.1,\n    bloomThreshold:1.0\n  }}\n\n  spawnBehavior={{\n    particleLifetime:[4000,4000],\n    emissionRatePerSecond:[150, 200], \n    spawnVolume:{\n      shape:\"box\", \n      params:[20, 1, 20], \n      spawnOnSurface:false\n    },\n    maxParticles:800\n  }}\n\n  particleAppearance={{\n    opacity:{\n      initialRange:[0, 0],\n      factor:\"time\",\n      interpolation:[\n        {endValue:0.5, interval:[0,500]},\n        {endValue:1.0, interval:[4000,5000]}\n      ]\n    },\n\n    rotation:{\n      initialRange:[0, 360],\n      factor:\"time\",\n      interpolation:[\n        {endValue:1080, interval:[0,5000]},\n      ]\n    },\n\n    scale:{\n      initialRange:[[5,5,5], [10,10,10]],\n      factor:\"time\",\n      interpolation:[\n        {endValue:[3,3,3], interval:[0,4000]},\n        {endValue:[0,0,0], interval:[4000,5000]}\n      ]\n    },\n  }}\n  \n  particlePhysics={{\n    velocity:{\n    initialRange:[[-2,-.5,0], [2,-3.5,0]]}\n  }}\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    \"h-0\": \"PropKey\",\n    \"h-1\": \"PropType\",\n    \"0-0\": \"**image**\",\n    \"0-1\": \"**PropTypes.shape({\\n      source : PropTypes.oneOfType([\\n        PropTypes.shape({ uri: PropTypes.string }),\\n        PropTypes.number\\n      ]).isRequired,\\n      height: PropTypes.number,\\n      width: PropTypes.number,\\n      bloomThreshold: PropTypes.number,\\n    })\\n**\\n\\nImage data used to represent the visual look of individual quad particles produced by this Particle Emitter.\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|source| The image source, a remote URL or a local file resource. PNG and JPG images accepted.|\\n|height|The height of an individual quad particle in 3D space. Default value is 1.|\\n|width|The width of an individual quad particle in 3D space. Default value is 1.|\\n|bloomThreshold| The luminance brightness threshold that must be crossed before bloom effects are applied to the particles. Set this attribute to 0.0 to always make particles bloom, or to a value > 0.0 and < 1.0. Defaults to -1 (no bloom).|\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n##Optional Props\n[block:parameters]\n{\n  \"data\": {\n    \"7-0\": \"**position**\",\n    \"8-0\": \"**rotation**\",\n    \"11-0\": \"**scale**\",\n    \"14-0\": \"**visible**\",\n    \"15-0\": \"**rotation**\",\n    \"16-0\": \"**scale**\",\n    \"17-0\": \"**transformBehaviors**\",\n    \"19-0\": \"**volume**\",\n    \"20-0\": \"**visible**\",\n    \"18-0\": \"**width**\",\n    \"h-0\": \"PropKey\",\n    \"h-1\": \"PropType\",\n    \"7-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nCartesian position in 3D space, stored as [x, y, z].\",\n    \"8-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nThe rotation of the container around its local axis specified as Euler angles [x, y, z]. Units for each angle are specified in degrees.\",\n    \"11-1\": \"**PropTypes.arrayOf(PropTypes.number)**\\n\\nThe scale of the all particles contained within this emitter in 3D space, specified as [x,y,z]. A scale of 1 represents the current size of the container. A scale value of < 1 will make the container proportionally smaller while a value >1 will make the container proportionally bigger along the specified axis.\",\n    \"14-1\": \"**PropTypes.bool**\\n\\nFalse if the container should be hidden. By default the container is visible and this value is true.\",\n    \"15-1\": \"PropTypes.arrayOf(PropTypes.number)\\n\\nPut the PropType Description here.\",\n    \"16-1\": \"PropTypes.arrayOf(PropTypes.number)\\n\\nPut the PropType Description here.\",\n    \"17-1\": \"PropTypes.arrayOf(PropTypes.string)\\n\\nPut the PropType Description here.\",\n    \"18-1\": \"PropTypes.number\\n\\nPut the PropType Description here.\",\n    \"19-1\": \"PropTypes.number\\n\\nPut the PropType Description here.\",\n    \"20-1\": \"PropTypes.bool\\n\\nPut the PropType Description here.\",\n    \"12-0\": \"**scalePivot**\",\n    \"9-0\": \"**rotationPivot**\",\n    \"4-0\": \"**onTransformUpdate**\",\n    \"9-1\": \"**PropTypes.arrayOf(PropTypes.number) **\\n\\nCartesian position in [x,y,z] about which rotation is applied relative to the component's position.\",\n    \"12-1\": \"**PropTypes.arrayOf(PropTypes.number) **\\n\\nCartesian position in [x,y,z] from which scale is applied relative to the component's position.\",\n    \"4-1\": \"**PropTypes.func**\\n\\nA function that is invoked when the component moves and provides an array of numbers representing the component's position in world coordinates.\",\n    \"1-0\": \"**duration**\",\n    \"1-1\": \"**PropTypes.number**\\n\\nThe length of an emitter's emit cycle in [milliseconds](http://google.com). 1000 milliseconds = 1 second\",\n    \"0-0\": \"**delay**\",\n    \"0-1\": \"**PropTypes.number**\\n\\nThe delay in milliseconds to apply before this emitters starts a new emission cycle to emit particles.\",\n    \"3-0\": \"**loop**\",\n    \"3-1\": \"**PropTypes.bool**\\n\\nTrue if the emitter should restart emitting particles at the end of it's duration cycle.\",\n    \"10-0\": \"**run**\",\n    \"10-1\": \"**PropTypes.bool**\\n\\nIf true, this emitter will start emitting particles. Can be set to false to pause particle emission.\",\n    \"2-0\": \"**fixedToEmitter**\",\n    \"2-1\": \"**PropTypes.bool**\\n\\nIf true, particles are positioned relative to the emitter position. Otherwise, they are positioned relative from their spawned at position.\",\n    \"13-0\": \"**spawnBehavior**\",\n    \"5-0\": \"**particleAppearance** \",\n    \"6-0\": \"**particlePhysics** \",\n    \"5-1\": \"**see [Particle Appearance](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-particle-appearance) **\\n\\nA collection of properties defining the appearance of individual particles over the course of their lifetime (color, scale, opacity, rotation).\",\n    \"6-1\": \"**see [Particle Physics](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-particle-physics) **\\n\\nA collection of properties defining the movement behavior of individual particles over the course of their lifetime, like velocity and acceleration.\",\n    \"13-1\": \"**see [Spawn Behavior](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-spawn-behavior) **\\n\\nA collection of properties defining the spawning behavior of this emitter, like how fast particles spawn, how many to spawn, and when to spawn.\"\n  },\n  \"cols\": 2,\n  \"rows\": 15\n}\n[/block]\n##Spawn Behavior\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**emissionRatePerSecond** \",\n    \"1-0\": \"**emissionRatePerMeter** \",\n    \"2-0\": \"**particleLifetime** \",\n    \"3-0\": \"**maxParticles** \",\n    \"4-0\": \"**emissionBurst** \",\n    \"5-0\": \"**spawnVolume** \",\n    \"h-0\": \"SubPropKey\",\n    \"h-1\": \"PropType\",\n    \"0-1\": \"**PropTypes.arrayOf(PropTypes.number)** \\n\\nThe total number of particles this emitter spawns in a second. This value is chosen at random from the given [min, max] range array, and is in addition to the other emission parameters.\",\n    \"1-1\": \"**PropTypes.arrayOf(PropTypes.number)** \\n\\nThe total number of particles this emitter spawns per meter travelled. This value is chosen at random from the given [min, max] range array, and is in addition to the other emission parameters.\",\n    \"2-1\": \"**PropTypes.arrayOf(PropTypes.number)** \\n\\nThe life time of a particle in seconds.\",\n    \"3-1\": \"**PropTypes.number** \\n\\nThe maximum number of particles that this emitter can spawn. This includes particles that have been created by the emissionRatePerSecond, emissionRatePerMeter and emissionBurst parameters.\",\n    \"4-1\": \"**PropTypes.arrayOf(PropTypes.oneOfType([\\n        PropTypes.shape({\\n          time: PropTypes.number,\\n          min: PropTypes.number,\\n          max: PropTypes.number,\\n          cycles: PropTypes.number,\\n          cooldownPeriod: PropTypes.number,\\n        }),\\n        PropTypes.shape({\\n          distance: PropTypes.number,\\n          min: PropTypes.number,\\n          max: PropTypes.number,\\n          cycles: PropTypes.number,\\n          cooldownDistance: PropTypes.number,\\n        })** \\n\\nAn array of parameters controlling how this emitter spawns particles in bursts, if any. Bursts can be scheduled to occur at certain times, or after a certain distance travelled by the emitter.\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|time or distance| Time in milliseconds, at which to emit this burst of particles. This time is set in reference to the start of the emission cycle of this emitter. Can also be in terms of distance travelled, in meters.|\\n|min| The minimum number of particles to burst.|\\n|max| The maximum number of particles to burst.|\\n|cycles| The number of times to loop and repeat this burst. |\\n|cooldownPeriod| The cool down / waiting duration between cycles before the emitter spawns another burst of particles.|\",\n    \"5-1\": \"**PropTypes.shape({\\n        shape: PropTypes.string,\\n        params: PropTypes.arrayOf(PropTypes.number),\\n        spawnOnSurface:PropTypes.bool\\n      })** \\n\\nThe volume shape within which to spawn particles, and the parameters that describe that volume. If spawnOnSurface is true, particles will be spawning on the surface of that volume, instead of within it. Note that particles will be uniformly distributed throughout that volume.\\n\\n|Spawn Volume| Accepted Params|\\n|:------|:----------:|\\n|Box| [width, height, and length] |\\n|Sphere| A single float describing a radius parameter for a perfect sphere, or a vector representing the [x, y, z] length of an ellipsoid.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n## Particle Appearance\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"SubPropKey\",\n    \"h-1\": \"PropType\",\n    \"0-0\": \"**opacity** \",\n    \"1-0\": \"**scale** \",\n    \"2-0\": \"**rotation** \",\n    \"3-0\": \"**color** \",\n    \"0-1\": \"**PropTypes.shape({\\n        initialRange: PropTypes.arrayOf(PropTypes.number),\\n        factor: PropTypes.oneOf([\\\"time\\\", \\\"distance\\\"]),\\n        interpolation: PropTypes.arrayOf(PropTypes.shape({\\n          interval: PropTypes.arrayOf(PropTypes.number),\\n          endValue: PropTypes.number,\\n        }))** \\n\\nCollection of parameters controlling the opacity behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|**initialRange**| The [min, max] range array within which to initialize a randomized opacity for particles to start of with.|\\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \\\"charting\\\" the behavior of this property over the lifetime of the particle.|\",\n    \"1-1\": \"**PropTypes.shape({\\n        initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\\n        factor: PropTypes.oneOf([\\\"time\\\", \\\"distance\\\"]),\\n        interpolation: PropTypes.arrayOf(PropTypes.shape({\\n          interval: PropTypes.arrayOf(PropTypes.number),\\n          endValue: PropTypes.arrayOf(PropTypes.number),\\n        }))** \\n\\nCollection of parameters controlling scaling behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|**initialRange**| The [min, max] range array within which to initialize a randomized opacity for particles to start of with. Here, min and max are vectors, as particles are scaled in 3d space.|\\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \\\"charting\\\" the behavior of this property over the lifetime of the particle.|\",\n    \"2-1\": \"**PropTypes.shape({\\n        initialRange: PropTypes.arrayOf(PropTypes.number),\\n        factor: PropTypes.oneOf([\\\"time\\\", \\\"distance\\\"]),\\n        interpolation: PropTypes.arrayOf(PropTypes.shape({\\n          interval: PropTypes.arrayOf(PropTypes.number),\\n          endValue: PropTypes.number,\\n        }))** \\n\\nCollection of parameters controlling the rotation of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|**initialRange**| The [min, max] range array within which to initialize a randomized rotation for particles to start of with. Here, min and max are floats, as rotation is performed on the quad's Z axis, which are then billboarded to the user.|\\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \\\"charting\\\" the behavior of this property over the lifetime of the particle.|\",\n    \"3-1\": \"**PropTypes.shape({\\n        initialRange:  PropTypes.arrayOf(ColorPropType),\\n        factor: PropTypes.oneOf([\\\"time\\\", \\\"distance\\\"]),\\n        interpolation: PropTypes.arrayOf(PropTypes.shape({\\n          interval: PropTypes.arrayOf(PropTypes.number),\\n          endValue: ColorPropType,\\n        }))** \\n\\nCollection of parameters controlling the color behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\\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\\n|SubProp|Description|\\n|:------|:----------:|\\n|**initialRange**| The [min, max] range array within which to initialize a randomized color for particles to start of with.|\\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \\\"charting\\\" the behavior of this property over the lifetime of the particle.|\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n## Particle Physics\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"SubPropKey\",\n    \"h-1\": \"PropType\",\n    \"0-0\": \"**velocity** \",\n    \"0-1\": \"**PropTypes.shape({\\n        initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))\\n      })** \\n\\nThe range of values a particle spawns with as it's initial velocity.\",\n    \"1-0\": \"**acceleration** \",\n    \"1-1\": \"**PropTypes.shape({\\n        initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))\\n      })** \\n\\nThe range of values a particle spawns with as it's initial acceleration.\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|**initialRange**| The min, max range of an explosion within which to r|\",\n    \"2-0\": \"**explosiveImpulse** \",\n    \"2-1\": \"**PropTypes.shape({\\n        impulse: PropTypes.number,\\n        position: PropTypes.arrayOf(PropTypes.number),\\n        decelerationPeriod: PropTypes.number,\\n      })** \\n\\nCollection of properties describing the velocity / and acceleration behavior of emitted particles to achieve an explosive effect.\\n\\n|SubProp|Description|\\n|:------|:----------:|\\n|**Impulse**| Describes the magnitude of the explosive force to apply to all particles.|\\n|**Position**| The vector location from which said explosion detonates (local to the emitter). The closer the particles are to the detonation location, the stronger the impulse explosion force.|\\n|**decelerationPeriod**| Is the timeframe within which the particles will decelerate against the explosion's directional velocity to 0 m/s.|\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\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":"viroparticleemitter","type":"basic","title":"ViroParticleEmitter"}

ViroParticleEmitter


A ViroParticleEmitter is a particle factory that creates, contains, and recycles a pool of quad particles to create a particle effect. See the [Particle Effect](http://docs.viromedia.com/v2.0.0/docs/particle-effects) guide for more information. ######Example use: ``` <ViroParticleEmitter position={[0, 4.5, 0]} duration={2000} visible={true} delay={0} run={true} loop={true} fixedToEmitter={true} image={{ source:require("./res/particle_snow.png"), height:0.1, width:0.1, bloomThreshold:1.0 }} spawnBehavior={{ particleLifetime:[4000,4000], emissionRatePerSecond:[150, 200], spawnVolume:{ shape:"box", params:[20, 1, 20], spawnOnSurface:false }, maxParticles:800 }} particleAppearance={{ opacity:{ initialRange:[0, 0], factor:"time", interpolation:[ {endValue:0.5, interval:[0,500]}, {endValue:1.0, interval:[4000,5000]} ] }, rotation:{ initialRange:[0, 360], factor:"time", interpolation:[ {endValue:1080, interval:[0,5000]}, ] }, scale:{ initialRange:[[5,5,5], [10,10,10]], factor:"time", interpolation:[ {endValue:[3,3,3], interval:[0,4000]}, {endValue:[0,0,0], interval:[4000,5000]} ] }, }} particlePhysics={{ velocity:{ initialRange:[[-2,-.5,0], [2,-3.5,0]]} }} /> ``` [block:api-header] { "type": "basic", "title": "Props" } [/block] ##Required Props [block:parameters] { "data": { "h-0": "PropKey", "h-1": "PropType", "0-0": "**image**", "0-1": "**PropTypes.shape({\n source : PropTypes.oneOfType([\n PropTypes.shape({ uri: PropTypes.string }),\n PropTypes.number\n ]).isRequired,\n height: PropTypes.number,\n width: PropTypes.number,\n bloomThreshold: PropTypes.number,\n })\n**\n\nImage data used to represent the visual look of individual quad particles produced by this Particle Emitter.\n\n|SubProp|Description|\n|:------|:----------:|\n|source| The image source, a remote URL or a local file resource. PNG and JPG images accepted.|\n|height|The height of an individual quad particle in 3D space. Default value is 1.|\n|width|The width of an individual quad particle in 3D space. Default value is 1.|\n|bloomThreshold| The luminance brightness threshold that must be crossed before bloom effects are applied to the particles. Set this attribute to 0.0 to always make particles bloom, or to a value > 0.0 and < 1.0. Defaults to -1 (no bloom).|" }, "cols": 2, "rows": 1 } [/block] ##Optional Props [block:parameters] { "data": { "7-0": "**position**", "8-0": "**rotation**", "11-0": "**scale**", "14-0": "**visible**", "15-0": "**rotation**", "16-0": "**scale**", "17-0": "**transformBehaviors**", "19-0": "**volume**", "20-0": "**visible**", "18-0": "**width**", "h-0": "PropKey", "h-1": "PropType", "7-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nCartesian position in 3D space, stored as [x, y, z].", "8-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nThe rotation of the container around its local axis specified as Euler angles [x, y, z]. Units for each angle are specified in degrees.", "11-1": "**PropTypes.arrayOf(PropTypes.number)**\n\nThe scale of the all particles contained within this emitter in 3D space, specified as [x,y,z]. A scale of 1 represents the current size of the container. A scale value of < 1 will make the container proportionally smaller while a value >1 will make the container proportionally bigger along the specified axis.", "14-1": "**PropTypes.bool**\n\nFalse if the container should be hidden. By default the container is visible and this value is true.", "15-1": "PropTypes.arrayOf(PropTypes.number)\n\nPut the PropType Description here.", "16-1": "PropTypes.arrayOf(PropTypes.number)\n\nPut the PropType Description here.", "17-1": "PropTypes.arrayOf(PropTypes.string)\n\nPut the PropType Description here.", "18-1": "PropTypes.number\n\nPut the PropType Description here.", "19-1": "PropTypes.number\n\nPut the PropType Description here.", "20-1": "PropTypes.bool\n\nPut the PropType Description here.", "12-0": "**scalePivot**", "9-0": "**rotationPivot**", "4-0": "**onTransformUpdate**", "9-1": "**PropTypes.arrayOf(PropTypes.number) **\n\nCartesian position in [x,y,z] about which rotation is applied relative to the component's position.", "12-1": "**PropTypes.arrayOf(PropTypes.number) **\n\nCartesian position in [x,y,z] from which scale is applied relative to the component's position.", "4-1": "**PropTypes.func**\n\nA function that is invoked when the component moves and provides an array of numbers representing the component's position in world coordinates.", "1-0": "**duration**", "1-1": "**PropTypes.number**\n\nThe length of an emitter's emit cycle in [milliseconds](http://google.com). 1000 milliseconds = 1 second", "0-0": "**delay**", "0-1": "**PropTypes.number**\n\nThe delay in milliseconds to apply before this emitters starts a new emission cycle to emit particles.", "3-0": "**loop**", "3-1": "**PropTypes.bool**\n\nTrue if the emitter should restart emitting particles at the end of it's duration cycle.", "10-0": "**run**", "10-1": "**PropTypes.bool**\n\nIf true, this emitter will start emitting particles. Can be set to false to pause particle emission.", "2-0": "**fixedToEmitter**", "2-1": "**PropTypes.bool**\n\nIf true, particles are positioned relative to the emitter position. Otherwise, they are positioned relative from their spawned at position.", "13-0": "**spawnBehavior**", "5-0": "**particleAppearance** ", "6-0": "**particlePhysics** ", "5-1": "**see [Particle Appearance](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-particle-appearance) **\n\nA collection of properties defining the appearance of individual particles over the course of their lifetime (color, scale, opacity, rotation).", "6-1": "**see [Particle Physics](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-particle-physics) **\n\nA collection of properties defining the movement behavior of individual particles over the course of their lifetime, like velocity and acceleration.", "13-1": "**see [Spawn Behavior](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-spawn-behavior) **\n\nA collection of properties defining the spawning behavior of this emitter, like how fast particles spawn, how many to spawn, and when to spawn." }, "cols": 2, "rows": 15 } [/block] ##Spawn Behavior [block:parameters] { "data": { "0-0": "**emissionRatePerSecond** ", "1-0": "**emissionRatePerMeter** ", "2-0": "**particleLifetime** ", "3-0": "**maxParticles** ", "4-0": "**emissionBurst** ", "5-0": "**spawnVolume** ", "h-0": "SubPropKey", "h-1": "PropType", "0-1": "**PropTypes.arrayOf(PropTypes.number)** \n\nThe total number of particles this emitter spawns in a second. This value is chosen at random from the given [min, max] range array, and is in addition to the other emission parameters.", "1-1": "**PropTypes.arrayOf(PropTypes.number)** \n\nThe total number of particles this emitter spawns per meter travelled. This value is chosen at random from the given [min, max] range array, and is in addition to the other emission parameters.", "2-1": "**PropTypes.arrayOf(PropTypes.number)** \n\nThe life time of a particle in seconds.", "3-1": "**PropTypes.number** \n\nThe maximum number of particles that this emitter can spawn. This includes particles that have been created by the emissionRatePerSecond, emissionRatePerMeter and emissionBurst parameters.", "4-1": "**PropTypes.arrayOf(PropTypes.oneOfType([\n PropTypes.shape({\n time: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n cycles: PropTypes.number,\n cooldownPeriod: PropTypes.number,\n }),\n PropTypes.shape({\n distance: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n cycles: PropTypes.number,\n cooldownDistance: PropTypes.number,\n })** \n\nAn array of parameters controlling how this emitter spawns particles in bursts, if any. Bursts can be scheduled to occur at certain times, or after a certain distance travelled by the emitter.\n\n|SubProp|Description|\n|:------|:----------:|\n|time or distance| Time in milliseconds, at which to emit this burst of particles. This time is set in reference to the start of the emission cycle of this emitter. Can also be in terms of distance travelled, in meters.|\n|min| The minimum number of particles to burst.|\n|max| The maximum number of particles to burst.|\n|cycles| The number of times to loop and repeat this burst. |\n|cooldownPeriod| The cool down / waiting duration between cycles before the emitter spawns another burst of particles.|", "5-1": "**PropTypes.shape({\n shape: PropTypes.string,\n params: PropTypes.arrayOf(PropTypes.number),\n spawnOnSurface:PropTypes.bool\n })** \n\nThe volume shape within which to spawn particles, and the parameters that describe that volume. If spawnOnSurface is true, particles will be spawning on the surface of that volume, instead of within it. Note that particles will be uniformly distributed throughout that volume.\n\n|Spawn Volume| Accepted Params|\n|:------|:----------:|\n|Box| [width, height, and length] |\n|Sphere| A single float describing a radius parameter for a perfect sphere, or a vector representing the [x, y, z] length of an ellipsoid." }, "cols": 2, "rows": 6 } [/block] ## Particle Appearance [block:parameters] { "data": { "h-0": "SubPropKey", "h-1": "PropType", "0-0": "**opacity** ", "1-0": "**scale** ", "2-0": "**rotation** ", "3-0": "**color** ", "0-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(PropTypes.number),\n factor: PropTypes.oneOf([\"time\", \"distance\"]),\n interpolation: PropTypes.arrayOf(PropTypes.shape({\n interval: PropTypes.arrayOf(PropTypes.number),\n endValue: PropTypes.number,\n }))** \n\nCollection of parameters controlling the opacity behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\n\n|SubProp|Description|\n|:------|:----------:|\n|**initialRange**| The [min, max] range array within which to initialize a randomized opacity for particles to start of with.|\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \"charting\" the behavior of this property over the lifetime of the particle.|", "1-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\n factor: PropTypes.oneOf([\"time\", \"distance\"]),\n interpolation: PropTypes.arrayOf(PropTypes.shape({\n interval: PropTypes.arrayOf(PropTypes.number),\n endValue: PropTypes.arrayOf(PropTypes.number),\n }))** \n\nCollection of parameters controlling scaling behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\n\n|SubProp|Description|\n|:------|:----------:|\n|**initialRange**| The [min, max] range array within which to initialize a randomized opacity for particles to start of with. Here, min and max are vectors, as particles are scaled in 3d space.|\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \"charting\" the behavior of this property over the lifetime of the particle.|", "2-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(PropTypes.number),\n factor: PropTypes.oneOf([\"time\", \"distance\"]),\n interpolation: PropTypes.arrayOf(PropTypes.shape({\n interval: PropTypes.arrayOf(PropTypes.number),\n endValue: PropTypes.number,\n }))** \n\nCollection of parameters controlling the rotation of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\n\n|SubProp|Description|\n|:------|:----------:|\n|**initialRange**| The [min, max] range array within which to initialize a randomized rotation for particles to start of with. Here, min and max are floats, as rotation is performed on the quad's Z axis, which are then billboarded to the user.|\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \"charting\" the behavior of this property over the lifetime of the particle.|", "3-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(ColorPropType),\n factor: PropTypes.oneOf([\"time\", \"distance\"]),\n interpolation: PropTypes.arrayOf(PropTypes.shape({\n interval: PropTypes.arrayOf(PropTypes.number),\n endValue: ColorPropType,\n }))** \n\nCollection of parameters controlling the color behavior of individual particles, after they have been emitted, over the course of their life time. You can see code examples **[here](http://docs.viromedia.com/v2.0.0/docs/viroparticleemitter#section-example-use-) ** .\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\n|SubProp|Description|\n|:------|:----------:|\n|**initialRange**| The [min, max] range array within which to initialize a randomized color for particles to start of with.|\n|**factor**| The unit of reference against which to interpolate your visual property values with, can be either in reference to time or distance.|\n|**interpolation**| An array of data points consisting of targeted endValues and it's interpolation interval, thereby \"charting\" the behavior of this property over the lifetime of the particle.|" }, "cols": 2, "rows": 4 } [/block] ## Particle Physics [block:parameters] { "data": { "h-0": "SubPropKey", "h-1": "PropType", "0-0": "**velocity** ", "0-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))\n })** \n\nThe range of values a particle spawns with as it's initial velocity.", "1-0": "**acceleration** ", "1-1": "**PropTypes.shape({\n initialRange: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))\n })** \n\nThe range of values a particle spawns with as it's initial acceleration.\n\n|SubProp|Description|\n|:------|:----------:|\n|**initialRange**| The min, max range of an explosion within which to r|", "2-0": "**explosiveImpulse** ", "2-1": "**PropTypes.shape({\n impulse: PropTypes.number,\n position: PropTypes.arrayOf(PropTypes.number),\n decelerationPeriod: PropTypes.number,\n })** \n\nCollection of properties describing the velocity / and acceleration behavior of emitted particles to achieve an explosive effect.\n\n|SubProp|Description|\n|:------|:----------:|\n|**Impulse**| Describes the magnitude of the explosive force to apply to all particles.|\n|**Position**| The vector location from which said explosion detonates (local to the emitter). The closer the particles are to the detonation location, the stronger the impulse explosion force.|\n|**decelerationPeriod**| Is the timeframe within which the particles will decelerate against the explosion's directional velocity to 0 m/s.|" }, "cols": 2, "rows": 3 } [/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]