Expressions
Last updated
Last updated
Assets can be represented or expressed in different ways. For example, a single asset could have a simple jpeg representation which could be used as a twitter avatar, or it could have a 3D blender model representation for use inside of 3D games. Using Asset Layer, assets can have many different expressions to accommodate the many ways that a single asset can be used across numerous applications.
Expressions are defined at the slot level by the slot owner. Slots are used to organize assets by functionality, and part of what gives an asset a function is the ways it can be expressed.
Asset Layer provides different expression types to support different types of files for representing assets in apps. You can find a list of all current expression types here, Expression Types.
If your app uses files that aren't supported by our current expression types, let us know and we can add a new type for your use case.
The expression type determines the expression attributes. Some expression types require multiple files. For example, Spine 4.0 requires a PNG sprite sheet, an atlas file, and a JSON file for the animations. So, the Spine 4.0 expression type has three expression attributes, PNG, atlas, and JSON.
Check out this page for a full list of expression types and attributes Expression Types
By default, all slots contain an expression called "Menu View". This is an image type expression. This expression is intended to contain a 500x500 image file as the expression value. This ensures that there is a standard way for apps to display every asset regardless of other variations from asset to asset. It's very useful for inventory managers and marketplaces, for example.
expressionId: a UUID for the expression
expressionType: the expression type of the expression. This contains details about the expression type name and the expression attributes associated with that expression type.
expressionName: a name for the expression
slotId: the slot to which the expression belongs
Expressions are defined at the Slot level, but expression values are assigned at the asset level. This is because different assets can be represented using different files, even if assets of the same slot have the same requirements.
Assets in identical collections each have the same expression values. This way, you only have to upload files once for the whole collection. Assets in unique collections can have their own expression values. This gives more flexibility, but requires files to be uploaded for each asset. Check out Assets + Collectionsfor more info.
value: the URL to retrieve the expression value file
expressionValueId: a UUID for the expression value
expressionAttribute: the expression attribute for which this is an expression value
expression: the expression for which this is an expression value. This contains the expressionName and expressionId