Install the WebAR SDK

Install From CDN

Ask your Account Director for the latest and greatest version to use!

Add the script tag

  1. Add <script src="https://cdn.3dcloud.io/mxt-ar-sdk/<version>/MxtWebAR-<version>.min.js"></script> to the <head> of your document.

  2. Example code should look like this:

    <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>WebAR CDN</title> <script src="https://cdn.3dcloud.io/mxt-ar-sdk/<ask-for-latest-version>/MxtWebAR-<ask-for-latest-version>.min.js"></script> </head>
    1. So if using 7.5.0, for example, you would add: <script src="https://cdn.3dcloud.io/mxt-ar-sdk/7.5.0/MxtWebAR-7.5.0.min.js"></script>

Use From CDN

See Examples Here


Install From NPM

Generate a .npmrc file in the root directory

  1. Navigate to the root directory of your web application where you want to use our SDK.

  2. Create a new file and name it .npmrc

  3. Copy and paste this code into the .npmrc file exactly as is:

    1. email=support@marxent.com always-auth=true registry=https://nexus.3dcloud.io/repository/npm-group/ _auth=<insert token here>
    2. Save the file. NOTE: It won’t be functional yet, now we need to generate the auth token.

  4. Generate the _auth token

    1. If you already have an account on Marxent’s private nexus NPM repository, you will use your username and password.

    2. If you need a NEW account on Marxent’s private nexus NPM repository: contact your Marxent Account Director to get your username and password.

      1. If you’re ready to dive in right now, try a CDN Implementation.

    3. Open a new Unix or Linux terminal shell.

    4. Run the command echo -n 'myuser:mypassword'| openssl base64 to get your auth token.

      1. Replace 'myuser:mypassword' with the username and password that you retrieved above.

    5. This command will output an encoded key that you will use to replace <insert token here> in your .npmrc file.

    6. Open your .npmrc file and replace the <insert auth token here> with the output from above. Example: c2VhdHRsZTp3bT1AMl80QipQN3Z0JHUl

  5. Example NEW .npmrc file:

    email=support@marxent.com always-auth=true registry=https://nexus.3dcloud.io/repository/npm-group/ _auth=c2VhdHRsZTp3bT1AMl80QipQN3Z0JHUl

Add the Dependency

  1. Open your package.json in the root directory where you want to use our SDK

  2. Navigate to the "dependencies": section

  3. Add our package as a dependency.

    1. Ask your Account Director for the latest and greatest version to use!

  4. In your package.json, under "dependencies": section, add "@mxt/mxt-webar-sdk": "7.5.0",

  5. When completed, your dependencies package will look something like this:

  6. Run npm install

  7. If this doesn’t work, please note that we have had some problems with certain versions of NPM accessing our nexus repository. In this case:

    1. NPM version MUST be 6.x.x because 7.x.x will NOT connect to our nexus repo

      1. To check: open your terminal, and run the command npm -v

    2. NOTE: If using a Mac with a M1 processor, a newer version of node than 8 is required because 8 is not compatible with the ARM architecture. In this case, use node v14.18.3, as it is the last version of node to ship with npm v6.x (in this case, v6.14.15), also found on this page.

See Examples Here