Update input samples so they support more than 2 controllers
diff --git a/input-profiles.html b/input-profiles.html
index 44777ea..53e126a 100644
--- a/input-profiles.html
+++ b/input-profiles.html
@@ -178,7 +178,7 @@
               // here to handle the animation, but this sample will skip that
               // and only display a static mesh for simplicity.
 
-              scene.inputRenderer.setControllerMesh(new Gltf2Node({url: assetPath}), inputSource.handedness);
+              scene.inputRenderer.setControllerMesh(new Gltf2Node({url: assetPath}), inputSource.handedness, inputSource.profiles[0]);
             });
           }
         }
@@ -213,7 +213,7 @@
           if (inputSource.gripSpace) {
             let gripPose = frame.getPose(inputSource.gripSpace, refSpace);
             if (gripPose) {
-              scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness);
+              scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness, inputSource.profiles[0]);
             }
           }
 
diff --git a/input-tracking.html b/input-tracking.html
index 4b41838..1677c96 100644
--- a/input-tracking.html
+++ b/input-tracking.html
@@ -204,7 +204,7 @@
             if (gripPose) {
               // If we have a grip pose use it to render a mesh showing the
               // position of the controller.
-              scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness);
+              scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness, inputSource.profiles[0]);
             }
           }
           
diff --git a/js/render/nodes/input-renderer.js b/js/render/nodes/input-renderer.js
index d8e90b5..7903087 100644
--- a/js/render/nodes/input-renderer.js
+++ b/js/render/nodes/input-renderer.js
@@ -246,7 +246,7 @@
       for (let inputSource of event.added) {
         if (inputSource.targetRayMode == 'tracked-pointer') {
           fetchProfile(inputSource, DEFAULT_PROFILES_PATH).then(({profile, assetPath}) => {
-            this.setControllerMesh(new Gltf2Node({url: assetPath}), inputSource.handedness);
+            this.setControllerMesh(new Gltf2Node({url: assetPath}), inputSource.handedness, inputSource.profiles[0]);
           });
         }
       }
@@ -262,19 +262,19 @@
     });
   }
 
-  setControllerMesh(controllerNode, handedness = 'right') {
+  setControllerMesh(controllerNode, handedness = 'right', profile = '') {
     if (!this._controllers) {
       this._controllers = {};
     }
-    this._controllers[handedness] = { nodes: [controllerNode], activeCount: 0 };
+    this._controllers[profile + "_" + handedness] = { nodes: [controllerNode], activeCount: 0 };
     controllerNode.visible = false;
     // FIXME: Temporary fix to initialize for cloning.
     this.addNode(controllerNode);
   }
 
-  addController(gripMatrix, handedness = 'right') {
+  addController(gripMatrix, handedness = 'right', profile = '') {
     if (!this._controllers || this._blurred) { return; }
-    let controller = this._controllers[handedness];
+    let controller = this._controllers[profile + "_" + handedness];
 
     if (!controller) { return; }
 
diff --git a/js/render/scenes/scene.js b/js/render/scenes/scene.js
index 21466bb..afc9477 100644
--- a/js/render/scenes/scene.js
+++ b/js/render/scenes/scene.js
@@ -140,7 +140,7 @@
 
         // Any time that we have a grip matrix, we'll render a controller.
         if (gripPose) {
-          this.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness);
+          this.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness, inputSource.profiles[0]);
         }
       }
 
diff --git a/tests/pointer-painter.html b/tests/pointer-painter.html
index 5c1487b..4cf4326 100644
--- a/tests/pointer-painter.html
+++ b/tests/pointer-painter.html
@@ -112,7 +112,7 @@
             if (inputSource.gripSpace) {
               let gripPose = frame.getPose(inputSource.gripSpace, refSpace);
               if (gripPose) {
-                this.scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness);
+                this.scene.inputRenderer.addController(gripPose.transform.matrix, inputSource.handedness, inputSource.profiles[0]);
               }
             }
           }