GMetri Player
Last updated
Was this helpful?
Last updated
Was this helpful?
The GMetri Player is a full-fledged Metaverse application that can run experiences created using the GMetri editor.
The latest javascript file is hosted . We recommend you to not self-host this file to receive latest updates from us.
There are 2 simple steps to get GMetri Player running on your website.
Drop the below script in the <head>
section of your web-page
Initialize the Player API by passing the JSON and options
htmlAnchor - Reference to the HTML element you want the player to attach to
onSceneChange - Optional callback, fired whenever a scene is changed inside the experience
onRuleTriggered - Optional callback, fired whenever a rule is triggered
There's also a codesandbox that showcases the absolute power of creating Metaverse Apps using the GMetri Plugin API
onViewerStateChange - Optional callback, fired whenever the ' state changes.
The Player API accepts a - codenamed rJson.
This JSON structure can be easily created using our on GitHub. Feel free to fork it!
To get started on understanding JSON structure, look at the sample jsons added in the github repo . rJson library also exports all the helper functions that you can use to create rJson structures. Have a look at the usage