assetCollection
    Extension description:
  • Definition: assetCollection (a visual representation (of an object or scene or person or abstraction) produced on a surface)

  • JSON Representation:
  • Example 1
    "collection": [
    	{
    		"assetName": "MyUniqueNameForMyAsset",
    		"assetType": "TheTypeOfAsset",
    		"TheTypeOfAsset": { // Name should match the value of 'assetType'
    			"width": 120, 
    			"height": 90,
    			"length": 400
    		}
    	}
    ]
    		
    Example 2 - Image
    "collection": [
    	{
    		"assetName": "MyUniqueNameForMyAsset",
    		"assetType": "http://bao.mijnklas.nl/xapi/extensions/image",
    		"http://bao.mijnklas.nl/xapi/extensions/image": {
    			"url": "http://example.com/assets/images/gem.png",
    			"size": { 
    				"width": 120, 
    				"height": 90
    			}
    		}
    	}
    ]
    		
    Example 3 - AnimationSprite
    "collection": [
    	{
    		"assetName": "MyUniqueNameForMyAsset",
    		"assetType": "http://bao.mijnklas.nl/xapi/extensions/animationsprite",
    		"http://bao.mijnklas.nl/xapi/extensions/animationsprite": {
    			"url": "http://example.com/assets/images/myAnimationSprite.png",
    			"size": {
    				"width": 400,
    				"height": 40
    			},
    			"frames": {
    				"count": 5,
    				"width": 80,
    				"height": 40
    			}
    		}
    	}
    ]
    		
    Example 4 - Sprite with composition
    "collection": [
    	{
    		"assetName": "MyUniqueNameForMyAsset",
    		"assetType": "http://bao.mijnklas.nl/xapi/extensions/sprite",
    		"http://bao.mijnklas.nl/xapi/extensions/sprite": {
    			"url": "http://example.com/assets/images/mySprite.png",
    			"size": {
    				"width": 800,
    				"height": 1400
    			},	
    			"frames": [
    				{
    					"name": "Body1",
    					"width": 200, 
    					"height": 400, 
    					"x": 0, 
    					"y": 0
    				},
    				{
    					"name": "Body2",
    					"width": 200, 
    					"height": 400, 
    					"x": 0, 
    					"y": 400
    				},
    				{
    					"name": "Hair",
    					"width": 80, 
    					"height": 60, 
    					"x": 200, 
    					"y": 0
    				},
    				{
    					"name": "Pants",
    					"width": 140, 
    					"height": 210, 
    					"x": 200, 
    					"y": 60
    				}
    			],
    			"compositions": [
    				{
    					"name": "Avatar",
    					"components": [
    						{
    							"name": "Body1",
    							"x": 0, 
    							"y": 0, 
    							"z": 1
    						},
    						{
    							"name": "Body2",
    							"x": 0, 
    							"y": 0, 
    							"z": 1
    						},
    						{
    							"name": "Hair",
    							"x": 80, 
    							"y": 30, 
    							"z": 4
    						},
    						{
    							"name": "Pants",
    							"x": 70, 
    							"y": 210, 
    							"z": 5
    						}
    					]
    				}
    			]
    		}
    	}
    ]
    		
  • Legend:
    • Different colors in the JSON Representation give special meaning to that part of the json.

      Optional: May be added for clarity. Bao xApi ignores it if present.

      Removed: Bao xApi has no use for it but TinCan Api requests/requires it. Bao xApi ignores it if present.

      Comment: Comment for clarification of the property. This should not be present in the json representation

    ;