diff --git a/Readme.md b/Readme.md index ecce6d0..64eb6c6 100644 --- a/Readme.md +++ b/Readme.md @@ -4,27 +4,25 @@ A javascript library to subscribe to local gaze data streams in the OTH/UR Eyetr ## Usage -Add the library: +**Add the library:** ``` ``` -Connect to a running *GazeServer*: +**Create a client and subscribe to gaze events:** ``` var gclient = new GazeClient(); -gclient.connect("ws://localhost:8001/gaze"); +gclient.addEventListener("gazeDataAvailable", function onGazeDataAvailable(event) { + console.log(event); +}); ``` -Subscribe to gaze events: +**Connect to a running gaze data server:** ``` -gclient.addEventListener("gazeDataAvailable", onGazeDataAvailable); - -function onGazeDataAvailable(event) { - console.log(event); -} +gclient.connect("ws://localhost:8001/gaze"); ```