Link Search Menu Expand Document

ARENA Specific A-Frame Systems

These are the A-Frame systems added to support ARENA core functionality.

Systems

attribution-system

Attribution Component/System. Add attribution message to any entity. Tries to extract author, license, source and title (assuming format used in sketchfab downloaded models)

Looks for authorship metadata in both asset.extras (sketchfab models) and scene.extra (manually added attributes in blender). If both asset.extras and scene.extra exist, gives preference to asset.extras.

screenshareable

Screenshare-able System. Allows an object to be screenshared upon

attribution-system

Attribution Component/System. Add attribution message to any entity. Tries to extract author, license, source and title (assuming format used in sketchfab downloaded models)

Looks for authorship metadata in both asset.extras (sketchfab models) and scene.extra (manually added attributes in blender). If both asset.extras and scene.extra exist, gives preference to asset.extras.

Example (Sketchfab downloaded model attributes - asset.extra)

   author: "AuthorName (url-link-to-author)"
   license: "CC-BY-4.0 (url-link-to-license)"
   source: "url-link-to-model-website"
   title: "Model Title"

registerComponent(el) ⏏

Register an attribution component with the system

Kind: Exported function

Param Type Description
el object The attribution a-frame element to register.

unregisterComponent(el) ⏏

Unregister an attribution component

Kind: Exported function

Param Type Description
el object The attribution a-frame element.

getAttributionTable() ⇒ string

Collect all attribution components and return an HTML table with credits

Kind: Exported function Returns: string - - an HTML table with the scene credits Example (Query the system for an HTML table of credits:)

   document.querySelector("a-scene").systems["attribution"].getAttributionTable();

extractAttributionFromGltfAsset(el, gltfComponent) ⏏

Extract author, license, source and title assuming sketchfab format: author: “AuthorName (url-link-to-author)” license: “CC-BY-4.0 (url-link-to-license)” source: “url-link-to-model-website” title: “Model Title”

It will try to get exttributes from gltf’s asset.extras (sketchfab) and scene.userData (blender) If both are found, data will be merged with preference to properties in asset.extras

Kind: Exported function

Param Type Description
el object the aframe element to set the attribution
gltfComponent object the GLTF model to extract properties from

parseExtrasAttributes(extras) ⇒ object

Parse author, license, source and title attributes.

Kind: Exported function Returns: object - - a dictionary with the author, license, source and title parsed

Param Type Description
extras object the source for the attribute data (asset.extras or scene.userData)

parseAttribute(extras, attribution, attribute) ⇒ boolean

Parse attribute given as parameter. Tries to find the attribute and add it to ‘attribution’ dictionary

Kind: Exported function Returns: boolean - - true/false if it could find the attribute

Param Type Description
extras object the source for the attribute data
attribution object the destination attribute dictionary
attribute string which attribute to parse

screenshareable

Screenshare-able System. Allows an object to be screenshared upon