npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mifind/testrct

v1.0.8

Published

iOS Haptics Engine

Downloads

16

Readme

TYRCTHapticsManager

iOS Haptics Engine

类型|版本|适用平台|负责人 -|-|-|- module|1.0.0-rc.4|ios|[email protected]

1.0.0-rc.4 Changelog:
none

方法

vibration

Vibration 长振动 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); 简介:历史最悠久的 API ,高频率持续 1s 的振动,常用于消息通知; 适配:全部苹果手机机型和全部系统版本; 案例:微信新消息通知。

起始版本|适用平台 -|- 1.0.0|ios

peek

Peek 触感 3D touch(HapticEngine)peek / pop 特点:常用于 3D touch 中,Pop 的震感略强于 Peek ; 案例:a.长按或重按控制中心的某个控制项目;b.微信的情景菜单放大为页面;

起始版本|适用平台 -|- 1.0.0|ios

pop

Pop 触感

起始版本|适用平台 -|- 1.0.0|ios

peek3

Peek 三次连续短振(三次 Peek 触感连续振动)

起始版本|适用平台 -|- 1.0.0|ios

impact

UIImpactFeedbackGenerator 特点:常用于下拉刷新和手势反馈; 适配:只支持 iPhone 7 及以上机型且系统需 iOS 10 及以上,如果机型或系统不支持将不振动;

起始版本|适用平台 -|- 1.0.0|ios

序号|参数名|参数类型|描述 -|-|-|- 1|type|string|impact震动类型 Light / Medium / Heavy微弱短振-Light(表示较小的界面元素的物理碰撞或互动时)中等短振-Medium(表示中等大小的界面元素的物理碰撞或互动时)明显短振-Heavy(表示较大的界面元素的物理碰撞或互动时)

notification

UINotificationFeedbackGenerator 特点:此 API 的三个类型都是连续振动多次,常应用于成功、警告、失败的场景; 适配:只支持 iPhone 7 或更新款机型且系统需 iOS 10 或以上,如果机型或系统不支持将不振动;

起始版本|适用平台 -|- 1.0.0|ios

序号|参数名|参数类型|描述 -|-|-|- 1|type|string|notification震动类型 Success / Warning / Error成功-Success(表示一个任务或行为的完成)警告-Warning(表示进行一个任务或行为时产生了警告)失败-Error(表示一个任务或行为的失败)

selection

UISelectionFeedbackGenerator 特点:常应用于选择的场景; 适配:只支持 iPhone 7 及以上机型且系统需 iOS 10 或以上,如果机型不支持将不振动; 案例:Chrome 浏览器下拉后左右滑动选择选项、iOS 照片 App 或微信里看图片放大到极限值继续放大后回弹时;

起始版本|适用平台 -|- 1.0.0|ios

play

play 播放队列,播放一组预设好的震动队列

起始版本|适用平台 -|- 1.0.0|ios

序号|参数名|参数类型|描述 -|-|-|- 1|actions|Array<string>|包含震动类型和间隔类型震动类型 Light / Medium / Heavy / Success / Warning / Error / Selection / Vibration / peek / pop / peek3播放间隔,单位s,类型:waitUntilFinished / (等待数值)说明:当两个震动类型中间无间隔类型时,两个震动类型同时触发示例 ['0.45','selection','0.39','selection','0.35','selection','0.7', 'Light','waitUntilFinished', 'Light','waitUntilFinished','Light'];

事件