GMetri Player
The GMetri Player is a full-fledged Metaverse application that can run experiences created using the GMetri editor.
The latest javascript file is hosted here. 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
Player 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
onViewerStateChange - Optional callback, fired whenever the variables' state changes.
Project JSON
The Player API accepts a recursive tree structure - codenamed rJson.
This JSON structure can be easily created using our open source library on GitHub. Feel free to fork it!
To get started on understanding JSON structure, look at the sample jsons added in the github repo here. rJson library also exports all the helper functions that you can use to create rJson structures. Have a look at the usage here
There's also a codesandbox that showcases the absolute power of creating Metaverse Apps using the GMetri Plugin API
Last updated