lag-radar

Trace frame rate lag with a sexy performance radar

  • 所有者: mobz/lag-radar
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

LagRadar

It's a sexy little component for demonstrating performance - or lack of in your javascript application.

Add this to any javascript application and you can see when the app drops below
60fps as the radar sweep changes colour and gets janky.

Get your live demo
Extra awesome as Bookmarklet

Usage

The radar is published as a zero dependency es6 javascript module.


import lagRadar from './lag-radar.js';

const destroy = lagRadar({
  frames: 50,    // number of frames to draw, more = worse performance
  speed: 0.0017, // how fast the sweep moves (rads per ms)
  size: 300,     // outer frame px
  inset: 3,      // circle inset px
  parent: document.body, // DOM node to attach to
});

// later ...
destroy();

It also exposes css class hooks for styling the radar

To run the demo

npm install
npm start
open http://localhost:9080/

Genesis

This version authored by @mobz with ideas and contributions from others
for this talk
by @dan_abramov and shared to the world with love.

主要指標

概覽
名稱與所有者mobz/lag-radar
主編程語言JavaScript
編程語言CSS (語言數: 3)
平台
許可證
所有者活动
創建於2018-03-26 10:34:02
推送於2024-04-19 01:09:39
最后一次提交2024-04-19 11:09:00
發布數0
用户参与
星數876
關注者數4
派生數24
提交數10
已啟用問題?
問題數2
打開的問題數0
拉請求數1
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?