From cd6b05fb3785cbb9ebb3be328a10f09c6ffba989 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul12345@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:43:55 +0530 Subject: [PATCH] Update node.js --- examples/node.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/node.js b/examples/node.js index d230d179..ab1fd9d0 100644 --- a/examples/node.js +++ b/examples/node.js @@ -1,17 +1,17 @@ require('../template/entry'); -var controller = new Leap.Controller() +let controller = new Leap.Controller() controller.on("frame", function(frame) { console.log("Frame: " + frame.id + " @ " + frame.timestamp); }); -var frameCount = 0; +let frameCount = 0; controller.on("frame", function(frame) { frameCount++; }); setInterval(function() { - var time = frameCount/2; + let time = frameCount/2; console.log("received " + frameCount + " frames @ " + time + "fps"); frameCount = 0; }, 2000);