Pressure is a JavaScript library for handling both Force Touch and 3D Touch on the web

Overview

Pressure.js

Join the chat at https://gitter.im/yamartino/pressure npm https://www.npmjs.com/package/pressure npm https://www.npmjs.com/package/pressure

Pressure Example

Pressure is a JavaScript library for handling both Force Touch and 3D Touch on the web, bundled under one library with a simple API that makes working with them painless.

Head over to the documentation for installation instructions, supported devices, and more details on pressure.js.

Install

Download pressure.min.js or pressure.js files from GitHub or install with npm or bower

npm

npm install pressure --save

bower

bower install pressure --save

Setup

Use pressure in the global space:

Pressure.set('#id-name', {
  change: function(force){
    this.innerHTML = force;
  }
});

OR use it with browserify or CommonJS like setups:

var Pressure = require('pressure');

Pressure.set('#id-name', {
  change: function(force){
    this.innerHTML = force;
  }
});

Usage

NOTE: the "this" keyword in each of the callback methods will be the element itself that has force applied to it

Pressure.set('#element', {
  start: function(event){
    // this is called on force start
  },
  end: function(){
    // this is called on force end
  },
  startDeepPress: function(event){
    // this is called on "force click" / "deep press", aka once the force is greater than 0.5
  },
  endDeepPress: function(){
    // this is called when the "force click" / "deep press" end
  },
  change: function(force, event){
    // this is called every time there is a change in pressure
    // force will always be a value from 0 to 1 on mobile and desktop
  },
  unsupported: function(){
    // NOTE: this is only called if the polyfill option is disabled!
    // this is called once there is a touch on the element and the device or browser does not support Force or 3D touch
  }
});

jQuery Usage

NOTE: the "this" keyword in each of the callback methods will be the element itself that has force applied to it

$('#element').pressure({
  start: function(event){
    // this is called on force start
  },
  end: function(){
    // this is called on force end
  },
  startDeepPress: function(event){
    // this is called on "force click" / "deep press", aka once the force is greater than 0.5
  },
  endDeepPress: function(){
    // this is called when the "force click" / "deep press" end
  },
  change: function(force, event){
    // this is called every time there is a change in pressure
    // force will always be a value from 0 to 1 on mobile and desktop
  },
  unsupported: function(){
    // NOTE: this is only called if the polyfill option is disabled!
    // this is called once there is a touch on the element and the device or browser does not support Force or 3D touch
  }
});

Options

With Pressure, the third parameter is an optional object of options that can be passed in.

Polyfill Support

Using the "polyfill" keyword, you can disable polyfill support for the element. The polyfill is enabled by default and is useful if the device or browser does not support pressure, it will fall back to using time. For example instead of force from 0 to 1, it counts up from 0 to 1 over the course of one second, as long as you are holding the element. Try some of the examples on the main page on a device that does not support pressure and see for yourself how it works.

Pressure.set('#example', {
  change: function(force, event){
    this.innerHTML = force;
  },
  unsupported: function(){
    alert("Oh no, this device does not support pressure.");
  }
}, {polyfill: false});

Polyfill Speed Up

If you are using the polyfill (on by default), you can see the "polyfillSpeedUp" speed to determine how fast the polyfill takes to go from 0 to 1. The value is an integer in milliseconds and the default is 1000 (1 second).

Pressure.set('#example', {
  change: function(force, event){
    this.innerHTML = force;
  }
}, {polyfillSpeedUp: 5000});
// takes 5 seconds to go from a force value of 0 to 1
// only on devices that do not support pressure

Polyfill Speed Down

If you are using the polyfill (on by default), you can see the "polyfillSpeedDown" speed to determine how fast the polyfill takes to go from 1 to 0 when you let go. The value is an integer in milliseconds and the default is 0 (aka off).

Pressure.set('#example', {
  change: function(force, event){
    this.innerHTML = force;
  }
}, {polyfillSpeedDown: 2000});
// takes 2 seconds to go from a force value of 1 to 0
// only on devices that do not support pressure

Only run on Force Touch trackpads (mouse)

Set the option only to the type you want it to run on 'mouse', 'touch', or 'pointer'. The names are the types of events that pressure will respond to.

Pressure.set('#example',{
  change: function(force, event){
    console.log(force);
  },
}, {only: 'mouse'});

Only run on 3D Touch (touch)

Pressure.set('#example',{
  change: function(force, event){
    console.log(force);
  },
}, {only: 'touch'});

Only run on Pointer Supported Devices (pointer)

Pressure.set('#example',{
  change: function(force, event){
    console.log(force);
  },
}, {only: 'pointer'});

Change the preventSelect option

The preventDefault option is "true" by default and it prevents the default actions that happen on 3D "peel and pop" actions and the Force "define word" actions as well as other defaults. To allow the defaults to run set preventDefault to "false"

Pressure.set('#example',{
  change: function(force, event){
    console.log(force);
  },
}, {preventSelect: false});

Helpers

Config

You can use Pressure.config() to set default configurations for site wide setup. All of the configurations are the same as the options listed above.

Heads Up: If you have a config set, you can always override the config on individual Pressure elements by passing in any of the options listed above to a specific Pressure block.

When using the jQuery Pressure library, use $.pressureConfig() rather than Pressure.map()

// These are the default configs set by Pressure
Pressure.config({
  polyfill: true,
  polyfillSpeedUp: 1000,
  polyfillSpeedDown: 0,
  preventDefault: true,
  only: null
});

Map

You can use Pressure.map() to map a value from one range of values to another. It takes 5 params: Pressure.map(inputValue, inputValueMin, inputValueMax, mapToMin, mapToMax); Here is a good write up on how this works in the Processing framework: Map Function.

When using the jQuery Pressure library, use $.pressureMap() rather than Pressure.map()

Pressure.set('#element', {
  change: function(force, event){
    // this takes the force, given that the force can range from 0 to 1, and maps that force value on a 100 to 200 range
    this.style.width = Pressure.map(force, 0, 1, 100, 200);
  }
});
Comments
  • On some android devices 'force' is being returned as 1 only in change method.

    On some android devices 'force' is being returned as 1 only in change method.

    On some android devices, the force parameter for the change method always returns as 1 and 1 only - has this happened to anyone else? (devices tested were Sony Xperia Android 6.0.1 and a Samsung device). I also tried testing on a Wileyfox Swift 2 - android - chrome, which doesn't seem to have triggered at all.

    I'm unable to get direct access to these devices right now, but if you need more information from me let me know and I'll try and get a hold of them with the specs etc.

    Thanks @stuyam.


    Please provide information about the device you are seeing the issue on Device is a Sony Xperia Operating system is Android 6.0.1 Browser is Chrome

    bug 
    opened by quizzy 11
  • Light touch triggers timing fallback when it should track pressure

    Light touch triggers timing fallback when it should track pressure

    When I touch and hold lightly enough on the demos, the timing fallback triggers and a message shows saying force touch isn't supported, when it should be using force touch. Applying pressure then glitches between the pressure value and timing value.

    I can't remember if it did that in the previous version, sorry =)


    Device is an iPhone 6S Operating system is iOS 10 Browser is Chrome

    bug 
    opened by henrahmagix 10
  • Prevents scroll on touch device

    Prevents scroll on touch device

    I cannot scroll when touching an element with a pressure listener. Confirmed also on http://pressurejs.com/ on test elements though does not occur on red button (support check) at top.

    In my case I'm using startDeepPress and endDeepPress and both cause this behavior.


    Please provide information about the device you are seeing the issue on Device is a iPhone6S Operating system is iOS 9.3.1 Browser is iOS Safari and iOS Chrome 49.0.2623.109

    enhancement 
    opened by PhilipCrumpton 8
  • Considering Pointer Events Pressure for pressure in Chrome

    Considering Pointer Events Pressure for pressure in Chrome

    Hi Stuart! We've been looking for a solution to make reading pressure across browsers and platforms less of a pain than it currently is and this is exactly it! Thank you for this fantastic library!

    Now to our question/issue: We're working with wacoms mostly and it seems that since Chrome 55/56 pointer events are now supported by default, delivering pressure from http://caniuse.com/#feat=pointer (at least verified with wacom on OS X). Is there a chance PE can be considered to read pressure within pressure.js?

    There are a few gotchas though:

    • Chrome: not sure why the Macbook Force Trackpad only reads as 0 and 0.5 via pointer events (using https://rbyers.github.io/eventTest.html)
    • Firefox: For wacom users there seems to be no other fallback other than the old wacom NPAPI plugin to get pressure unless the flags 'layers.async-pan-zoom' and 'dom.w3c_pointer_events.enabled' are enabled (hoping this will soon land as a stable feature)
    enhancement 
    opened by bhaux 7
  • Cordova + WKWebView + UIWebView w/ pressure

    Cordova + WKWebView + UIWebView w/ pressure

    Looking into more of the cordova web view settings and seeing if there is anything I can find that would stop it, but it just returns the unsupported callback. I'd love to utilize this library in my hybrid app for a few things. Yours is the first library to include a callback like this so I wasn't sure if the other libs weren't working or if I was just crazy haha.

    I'll do some digging and report back what I find, if anyone else has an idea of why the cordova web view (iOS 9, uses UIWebView same as safari) wouldn't work definitely chime in.


    Please provide information about the device you are seeing the issue on Device is a iPhone 6S+ Operating system is iOS 9.1 Browser is UIWebView (not sure the versioning...)

    opened by NorthMcCormick 7
  • Chrome Android and OSX device emulation mode register touches as deep/force press

    Chrome Android and OSX device emulation mode register touches as deep/force press

    Steps to reproduce:

    Open pressurejs.com in Chrome on OSX and in DevTools turn on device emulation and set it to iPhone 6. Scroll to bottom and tap on test 5 and the pop up that should only trigger with a force touch displays.

    Same results on Chrome Android using a Samsung Galaxy S4 and Nexus 5. On Nexus 5 all the tests get triggered.

    bug 
    opened by kylehalleman 7
  • Error on handling multi touch events

    Error on handling multi touch events

    I have the following error when I try to zoom with pinch, swipe or make any other multi touch event on element that Pressure is applied to.

    TypeError: undefined is not an object (evaluating 'this.selectTouch(e).force')

    in line this._changePress(this.selectTouch(e).force, e))

    It`s probably in pressure/dist/pressure.js:316 or pressure/src/adapters/adapter_3d_touch.js:25

    The code that uses Pressure

    Pressure.set(self.slotsContainer, { //DOM node startDeepPress: function (event) { //handle event } });


    Device is a 2016 IPhone 6S Plus MN2W2RU/A Operating system is iOS 10.2.1 Browser is Safari 10.0

    bug 
    opened by Legohuman 6
  • Force Touch not working properly Safari 13

    Force Touch not working properly Safari 13

    When I use force touch, it reverts to polyfill. When I go to the 'Pressure Change' section on the website, the "Targets All" bar uses polyfill, but the 'Force Touch' bar works as it should.

    Edit: It still does not work, probably has something to do with the new Safari 13 update

    Edit 2: Still does not work in Safari 14


    Device: 2017 Apple MacBook Pro OS: macOS Mojave 10.14.6 - macOS Catalina 10.15.2 Browser: Safari 13.0.1 - Safari 14.0

    opened by zanderp25 5
  • Firefox console warning: _mutating the [[Prototype]] of an object will cause your code to run very slowly

    Firefox console warning: _mutating the [[Prototype]] of an object will cause your code to run very slowly

    Hello,

    Thanks for this script. It is great!

    Using Pressure.js with Firefox 47.0.1 64 bit on Windows 10, you can see this warning in the console:

    mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

    The function that is causing problems is the one called "_inherits". I guess it is because it is trying to do this:

    subClass.proto = superClass;

    Could that warning be fixed, please? Despite that fact that it is not so serious and it should still work even with the warning, it does not look nice.

    What I am doing now to prevent this warning is to detect whether "webkitmouseforcewillbegin" event is supported by the browser and if so, I lazy load the script.

    Cheers, Joan

    opened by jalbam 5
  • Mac Book Pro not working anymore

    Mac Book Pro not working anymore

    It looks like Apple updated Safari or something happened and the library is not working anymore. Website says, 'NOT supported' if clicked on test button in Safari.

    opened by eckelt 5
  • Pressure Is Not Supported On iPhone 6S Plus

    Pressure Is Not Supported On iPhone 6S Plus

    Just wanted to let you know, that I can let that button on the website say "not supported", when pressing very very lightly on an iPhone 6S Plus. I guess that's related to the force actually being 0.0000. I suggest to change the check from (I assume) if (force) to if (force == null) or something similar.

    opened by FlorianWendelborn 5
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimatch from 3.0.4 to 3.1.2

    Bump minimatch from 3.0.4 to 3.1.2

    Bumps minimatch from 3.0.4 to 3.1.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Apple Magic Trackpad 2 on iPad only uses polyfill

    Apple Magic Trackpad 2 on iPad only uses polyfill

    I would like to track pressure from an Apple Magic Trackpad 2 connected to an iPad (Safari as browser). Unfortunately, the pressure.js library only works as a function of time instead of force. Do you have any clue what might be going on?


    Please provide information about the device you are seeing the issue on Device is a [2022] [Apple Magic Trackpad 2] Operating system is [iPadOS, I guess] Browser is [Safari]

    opened by mg2485 0
  • Bump copy-props from 2.0.4 to 2.0.5

    Bump copy-props from 2.0.4 to 2.0.5

    Bumps copy-props from 2.0.4 to 2.0.5.

    Release notes

    Sourced from copy-props's releases.

    2.0.5

    Fix

    • Avoids prototype pollution (#7)

    Doc

    • Update license years.
    • Transfer ownership to Gulp Team (#6)

    Build

    • Update dependencies: each-props (>=1.3.2), is-plain-object (>=5.0.0).

    Test

    • Expand test versions to v11〜v14.
    Changelog

    Sourced from copy-props's changelog.

    Changelog

    3.0.1 (2021-10-31)

    Bug Fixes

    • ci: Rename prettierignore typo & avoid formatting web (192badf)
    • Update dependencies (ba8a51c)

    3.0.0 (2021-09-25)

    ⚠ BREAKING CHANGES

    • Normalize repository, dropping node <10.13 support (#8)

    Miscellaneous Chores

    • Normalize repository, dropping node <10.13 support (#8) (85b1165)
    Commits
    • 40b7974 2.0.5
    • 2c738f5 Fix: Avoids prototype pollution (#7)
    • 4cac863 Merge: Transfer ownership to Gulp Team (#6)
    • 54a791d Doc: Transfer ownership to Gulp Team
    • 196fc9e Merge: Update dependencies and expand ci test versions (#5)
    • e89907f Test: Update npm to v4 when nodejs is v5 because of npm install error.
    • e970322 Test: Run coveralls when nodejs >= 6 because of its supports
    • 063e534 Test: Add nodejs v11-v14 into ci test versions
    • 72270af Doc: Update license years
    • f60b928 Build: Update versions of dependencies
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Doesn't work on any device?

    Doesn't work on any device?

    I have tried visiting the pressure.js homepage and from 3 different touch devices and none of them results in the Pressure Change example working (they all use polyfill).

    Surface Pro 7 with Chrome 96.0.4664.45 Apple iPad Pro 4th gen with Safari Samsung Galaxy S21 Ultra with Chrome 96.0.4664.45

    Just to test, the Surface Pen did work on the Surface and the S-pen worked on the Galaxy (but the apple pen did not work on the iPad). But what am after is it working with finger touch. Does anyone know if this ever worked on a Surface with finger touch? Or does this plugin work with pens only?


    Please provide information about the device you are seeing the issue on Device is a [year] [device] [model] Operating system is [OS] [version] Browser is [browser] [version]

    opened by ronaldjeremy 1
Releases(v2.2.0)
  • v2.2.0(Sep 30, 2020)

  • v2.1.2(Nov 29, 2017)

  • v2.1.1(Mar 29, 2017)

    Fixes issue: #64 Does some error checking around making sure Touch objects have force params before using them.

    Thanks to @davidshimjs for making this release possible. 👍 ⚡️

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Feb 26, 2017)

    This release has a few great improvements. 😄

    Features

    1. Support for Pointer Events! #60 That means that any browser that supports Pointer Events and any device that gives a pressure reading should now work on pressure. Things like Microsoft Surfaces and Wacom Tablets will now work with pressure. 🎉

    This also means that pressure is now more future proofed now that more browsers are adding support for pointer events! Can I Use Pointer Events

    1. Support for polyfillSpeedDown #56 Now you can set a speed in which you want the polyfill to "decrease" once the mouse or touch is released. By default this value is set to 0 so when you release your finger it snaps back to 0.

    Changes

    1. The only setting now accepts touch, mouse, or pointer to specify if you want pressure to only respond to specific events.

    2. The polyfillSpeedsetting has been changed to polyfillSpeedUp because the polyfillSpeedDown was added to this release.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.3(Nov 4, 2016)

  • v2.0.2(Nov 3, 2016)

    This update adds the UMD gulp wrapper. This improves the way that pressure loads itself for RequireJS, CommonJS, or the browser Window. This improvement helps when using pressure with something like Webpack. See this pull request for more information: https://github.com/stuyam/pressure/pull/52

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Oct 24, 2016)

    See issue #50 for more information on this bug fix. The gist of it was that the polyfill and 3d touch could conflict when you touched very very lightly. Now even if the polyfill runs but then force is detected, the force will cancel the polyfill and take over.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 19, 2016)

    50 Commits. 80% of the file size of Pressure 1. More flexible than Pressure 1.

    Biggest Additions to v2.0.0

    • Support for iOS 10.
    • Polyfill is now enabled by default.
    • You can set the polfillSpeed to tell pressure how fast you want it to run for 0 to 1.
    • Support for Pressure is now tested on every single press of an element rather than once per page. This means you could switch between something like a mouse (that does NOT support force touch) and a trackpad (that does support force touch) and Pressure can handle it without having to refresh the page.

    Lot's of hard work in this release so check it out and let me know me know what you think! 💥 🎉

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Mar 19, 2016)

  • 1.0.0(Mar 13, 2016)

    • The biggest addition to v1.0.0 is the polyfill support. Now you can optionally give "support" to older browsers and devices that do not support force or 3d touch. It uses time to fake a pressure value, the longer you press, the higher the "force" is returned. It takes one second to go from 0 to 1 and can do a good job of faking pressure if that if what you are looking for. The Instagram iOS app for example uses the "peek and pop" on iOS. If you have 3D touch support, then you can press hard on an Instagram photo to display it. Else if you do not have 3D touch support, you can simply long hold on an image and it will open it just like the 3D touch version. The same idea applies with the optional pressure.js polyfill support.
    • Now you can set global configurations for pressure so you do not have to set them on each element if you are using options that will be used throughout your site.
    • Fixed a bug that did not allow the value of 1 to be reached on force touch trackpads. Now every type of support will have a force value returned that goes from 0 to 1. Before force touch only got up to around 0.9997 or so.
    • Other various bugs, improvements, and happinest went into making this build!

    -Also this build starts the 1.0.0 track of pressure :tada: This will make it easier to make smaller more incremental improvements to pressure.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.4(Feb 7, 2016)

    • The biggest addition to the v0.0.4 release is that is now supports jQuery if you so choose. Now located at "dist/jquery.pressure.min.js"
    • Fixed a big bug on versions of Chrome on Nexus and Galaxy phones were it was being tricked into thinking they had pressure support. More of a Chrome bug that I had to work around to make sure they are represented as "unsupported"
    • Api changes to how options are passed into pressure
    • Lots of clean up to the internals of pressure to make it smoother than ever
    • Other bug improvements and tweaks for smoother sailing than ever! :boat:
    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Jan 16, 2016)

    Removed the "Pressure.interpolate" method because it was just an alias to the "Pressure.map" method In a stable spot to be tested and tweaked now, the testing results from the iPhone 6s have been good and it is a lot more stable.

    Source code(tar.gz)
    Source code(zip)
Owner
Stuart Yamartino
Software Engineer @dockwa | Building BootstrapEmail.com & love open sourcing stuff.
Stuart Yamartino
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Super tiny size multi-touch gestures library for the web.    You can touch this →

Preview You can touch this → http://alloyteam.github.io/AlloyFinger/ Install You can install it via npm: npm install alloyfinger Usage var af = new Al

腾讯 AlloyTeam 3.3k Dec 12, 2022
Force dark mode for all web pages.

Dark Mode [WIP] Force dark mode for all web pages. Instalation Enable Epiphany extension. Optional if not done. Download the latest release from the .

null 17 Dec 2, 2022
Massive Open-Source Anti-agression Intelligence Collection is intended for civilians to be able to submit and verify intelligence items about an attacking force.

Massive Open-Source Anti-agression Intelligence Collection is intended for civilians to be able to submit and verify intelligence items about an attacking force.

William Brochmann 3 Mar 1, 2022
Bookmarklet exploit that can force-disable extensions installed on Chrome. Also has a very fancy GUI to manage all extensions!

ext remover Bookmarklet exploit that can force-disable any extension installed on Google Chrome Instructions Here are the instructions to using this e

Echo 124 Jan 6, 2023
GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr Descriptive GraphQL error handling for Deno/Oak servers. Features Provides additional context to GraphQL's native error messaging for faster

OSLabs Beta 35 Nov 1, 2022
A simple library for handling keyboard shortcuts with Alpine.js.

✨ Help support the maintenance of this package by sponsoring me. Alpine.js Mousetrap A simple library for handling keyboard shortcuts with Alpine.js.

Dan Harrin 102 Nov 14, 2022
Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js.

Pintora Documentation | Live Editor Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js. Expressing yo

hikerpig 652 Dec 30, 2022
A set of APIs for handling HTTP and HTTPS requests with Deno 🐿️ 🦕

oak commons A set of APIs that are common to HTTP/HTTPS servers. HTTP Methods (/method.ts) A set of APIs for dealing with HTTP methods. Content Negoti

oak 7 May 23, 2022
A desktop app handling image uploading and text transfering.

Transmitter Introduction 一款利用Github repository实现图床+文本传输的桌面应用 框架:Vite+React+Electron Tutorial release 创建Github token:https://docs.github.com/en/authent

Wenhao Zhang 3 Mar 24, 2022
HanAssist - Utilities to ease Chinese variant handling in user scripts and gadgets.

HanAssist 代码文档 HanAssist 是帮助中文维基百科及其他 MediaWiki 网站上的用户脚本和小工具更优雅地处理中文变体消息的实用程序。 本程序的目标是取代wgULS()和wgUVS()小工具。 HanAssist.localize( { hans: '一天一苹果,医生远离我。'

Diskdance 3 Oct 29, 2022
Provides event handling and an HTMLElement mixin for Declarative Shadow DOM in Hotwire Turbo.

Turbo Shadow Provides event handling and an HTMLElement mixin for Declarative Shadow DOM support in Hotwire Turbo. Requires Turbo 7.2 or higher. Quick

Whitefusion 17 Sep 28, 2022
Wrapper for NextJS image handling, optimised for Lambda w/ ApiGw integration.

NextJS Lambda Utils This is a project allowing to deploy Next applications (standalone options turned on) to AWS Lambda without hassle. This is an alt

Jan 65 Dec 28, 2022
Dead-simple CORS handling for any itty-router API (test with Cloudflare Workers, but works anywhere)!

Simple CORS-handling for any itty-router API. Designed on Cloudflare Workers, but works anywhere. Features Tiny. Currently ~600 bytes, with zero-depen

Kevin R. Whitley 6 Dec 16, 2022
Seamlessly connect your web server to Rebrandly so that you can re-use your domain name for both your app and your short links

rebrandly-express Seamlessly connect your web server to Rebrandly so that you can re-use your domain name for both your app and your short links Rebra

null 3 Dec 13, 2022
HackFest is a 36-hour long hackathon wherein you have to put on your hacker hats and build anything that falls in either or both the domain of full-stack web development

HackFest is a 36-hour long hackathon wherein you have to put on your hacker hats and build anything that falls in either or both the domain of full-stack web development (the stack we learn in full-stack web developer roadmap on codedamn).

Shivam Kumar 2 Jun 6, 2022
Learn how to set up Supabase auth for both the frontend and backend of your application using a JWT - JSON web token.

Supabase auth, frontend + backend - example with Next.js Learn how to set up Supabase auth for both the frontend and backend of your application using

YK 7 Nov 20, 2022