# Component Attributes

***

If using these components in code the attribute name would be a camel case version of the attributes below unless specified in brackets.

### Stream Controller

| Attribute                          | Description                                                                                                                                                                                                                              | Default Value     |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| <p>Camera<br><em>Required</em></p> | This is the camera used in the scene. This attribute is required.                                                                                                                                                                        | None              |
| Camera Type                        | <p><strong>Non-player camera</strong> ('nonPlayer'): A camera that is not attached to a player e.g. a camera that orbits an object. <br><strong>Player camera</strong> ('player'): A camera that is attached to a player</p>             | Non-player camera |
| Occlusion Culling                  | Whether to enable occlusion culling. When occlusion culling is enabled objects that are hidden by other objects will not be rendered. It depends on the model whether this setting will improve performance.                             | False             |
| Occlusion Geometry                 | <p><strong>Bounding Box</strong>: Use the bounding box of each mesh to check if it's occluded. This is less accurate but faster.<br><strong>Mesh</strong>: Use the mesh to check if it's occluded. This is more accurate but slower.</p> | Bounding Box      |
| Occlusion Query Frequency          | How many times per second to check for occlusion. A lower number will improve performance but geometry will take longer to reappear.                                                                                                     | 8 times/second    |
| Triangle Budget                    | The maximum amount of triangles that you want to be in the scene.                                                                                                                                                                        | 5000000           |
| Mobile Triangle Budget             | The triangle budget used on a mobile device. If it is set to 0 it will use the non-mobile triangle budget.                                                                                                                               | 3000000           |
| Minimum Distance                   | The smallest possible distance to the camera.                                                                                                                                                                                            | 0.01              |
| Distance Factor                    | Preference for nearby objects over objects further away. Values above one mean a preference for nearby objects. Values below one mean a preference for objects further away. One is neutral.                                             | 1.1               |
| Maximum Quality                    | Stops improving geometry that exceeds the maximum quality. This can be used to stop far away objects from showing more detail than is necessary. Setting it to 0 means there is no maximum quality.                                      | 15000             |
| Close Up Distance Factor           | The distance factor used when close-up to an object. Should be higher than the standard distance factor.                                                                                                                                 | 5                 |
| Close Up Distance                  | The distance where it starts using close-up distance factor. Set it to 0 to not use close-up distance factor.                                                                                                                            | 3                 |
| iOS Memory Limit                   | The maximum amount of memory in MB that meshes and textures can consume on iOS devices to avoid the page crashing. Use -1 for no limit or 0 to let Polygon Streaming determine a device specific limit.                                  | 0                 |

### Streamable Model

| Attribute                                    | Description                                                                                                                                                                                                                                                                                                               | Default Value |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| <p>Model URL (path)<br><em>Required</em></p> | The URL of the XRG file. This attribute is required.                                                                                                                                                                                                                                                                      | None          |
| Quality Priority                             | How much to prioritize the quality of this model relative to the quality of other models in the scene. It is a ratio.                                                                                                                                                                                                     | 1             |
| Initial Triangle Percent                     | Percentage of triangle budget to initialize the model with. It should be a number between 0 and 1                                                                                                                                                                                                                         | 0.1           |
| Cast Shadows                                 | Whether the model should cast shadows.                                                                                                                                                                                                                                                                                    | True          |
| Receive Shadows                              | Whether the model should receive shadows.                                                                                                                                                                                                                                                                                 | True          |
| Force Double Sided                           | Render the model double sided regardless of the setting in the model file.                                                                                                                                                                                                                                                | False         |
| Use Alpha                                    | Whether to render semi-transparency in materials.                                                                                                                                                                                                                                                                         | True          |
| Use Embedded Collider                        | Determines whether the embedded collider should be used in physics.                                                                                                                                                                                                                                                       | True          |
| Play Animation Automatically                 | Whether to play the embedded animation automatically                                                                                                                                                                                                                                                                      | True          |
| Animation To Play                            | The name or index of the embedded animation to play if an animation state graph is not provided. An index value of 0 is the first animation. If no value is supplied it will play the first animation.                                                                                                                    | None          |
| Animation State Graph                        | Create an Anim State Graph in the Playcanvas editor and drag it onto this attribute. If no asset is provided a default state graph will be created.                                                                                                                                                                       | None          |
| Animation States (animationStateMappings)    | <p>Assigns animations to states in the animation state graph. Nested attributes include:<br><strong>state</strong>: the state in the state graph<br><strong>animation</strong>: The embedded animation name or index.<br><strong>layer</strong>: The layer in the state graph. If left blank will use the base layer.</p> | None          |
| Environment Asset                            | Use a cubemap asset if you want to provide an environment map otherwise it will use the scene's environment map.                                                                                                                                                                                                          | None          |
| Hash Code                                    | Hash code to validate streaming model.                                                                                                                                                                                                                                                                                    | ''            |
