updateMatrixWorld(force) {

        super.updateMatrixWorld(force);

        if (!this.motionController) return;

        // Cause the MotionController to poll the Gamepad for data
        this.motionController.updateFromGamepad();

        // Update the 3D model to reflect the button, thumbstick, and touchpad state
        Object.values(this.motionController.components).forEach((component) => {

            // Update node data based on the visual responses' current states
            Object.values(component.visualResponses).forEach((visualResponse) => {

                const {valueNode, minNode, maxNode, value, valueNodeProperty} = visualResponse;

                // Skip if the visual response node is not found. No error is needed,
                // because it will have been reported at load time.
                if (!valueNode) return;

                // Calculate the new properties based on the weight supplied
                if (valueNodeProperty === MotionControllerConstants.VisualResponseProperty.VISIBILITY) {

                    valueNode.visible = value;

                } else if (valueNodeProperty === MotionControllerConstants.VisualResponseProperty.TRANSFORM) {

                    valueNode.quaternion.slerpQuaternions(
                        minNode.quaternion,
                        maxNode.quaternion,
                        value
                    );

                    valueNode.position.lerpVectors(
                        minNode.position,
                        maxNode.position,
                        value
                    );

                }

            });

        });

    }
Polls data from the XRInputSource and updates the model's components to match
the real world data