nippleJS - 虚拟摇杆触摸功能库


MIT
跨平台
JavaScript

软件简介

nippleJS 是一个 JavaScript 库,用来创建虚拟摇杆触摸功能的接口。

示例代码:

{
    position: { // absolute position of the center in pixels
        x: 125,
        y: 95
    },
    force: 0.2, // strength in %
    distance: 25.4, // distance from center in pixels
    angle: {
        radian: 1.5707963268, // angle in radian
        degree: 90
    }
}