Coder Social home page Coder Social logo

kidgodzilla / apple-pencil-safari-api-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shuding/apple-pencil-safari-api-test

0.0 2.0 0.0 336 KB

Canvas based sketch board, with force touch and real-time Bezier curves.

Home Page: https://shuding.github.io/apple-pencil-safari-api-test

HTML 20.41% JavaScript 79.59%

apple-pencil-safari-api-test's Introduction

Screenshot

3D Touch / Force Touch API Demo

A canvas demo featuring:

  • Apple Pencil and 3D Touch pressure detection
  • smooth Bezier curve drawing

In vanilla JS. Tested in Safari & Google Chrome on iOS 9.3.

Demo | Code.

Help me test on Android/Windows/macOS devices and leave an issue please!

API Capability (Apple devices with iOS 9) Capability (Apple devices with iOS 13)
force
radiusX
radiusY
rotationAngle
touchType
altitudeAngle
azimuthAngle

To visualize altitudeAngle and azimuthAngle (source: Apple):

Apple Pencil

Related Resources

  1. Touch Events - Level 2, W3C Draft
  2. The Touch Object on MDN
  3. radiusX
  4. Illustrating the Force, Altitude, and Azimuth Properties of Touch Input

Pointer Events & Polyfills

apple-pencil-safari-api-test's People

Contributors

dimapaloskin avatar limxingzhi avatar osdiab avatar shuding avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.