ta($depthCanvas.width, $depthCanvas.height);
              }
              if (depthImageData) {
                if (convertInCpp){
                  renderDepthFrameToCanvas(depthCtx, depthImageData, data.depthImageFrame, depthModeRange);
                } else {
                  renderDepthFrameAsBlueToRed(depthCtx, depthImageData, data.depthImageFrame, depthModeRange);
                }
                
              }
            });
          }
        };

        const renderDepthFrameToCanvas = (ctx