New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

creepyface-tilt

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creepyface-tilt - npm Package Compare versions

Comparing version 7.5.0 to 8.0.0-alpha.0

4

dist/index.d.ts

@@ -1,3 +0,1 @@

import { PointProvider } from 'creepyface';
declare const tiltPointProvider: PointProvider;
export default tiltPointProvider;
export {};

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("creepyface")):"function"==typeof define&&define.amd?define(["creepyface"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["creepyface-tilt"]=e(t.creepyface)}(this,function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,f=t[Symbol.iterator]();!(r=(a=f.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==f.return||f.return()}finally{if(o)throw i}}return n}(t,e)||r(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=t.beta,n=t.gamma;null!==e&&null!==n&&(a?c.forEach(function(t){return t([-(window.innerWidth*(n-a.gamma))/90,-(window.innerHeight*(e-a.beta))/180])}):a={beta:e,gamma:n})}function i(i,a){function e(t){var e,n,r,o=(n=r=(e=(o=(r=a).getBoundingClientRect()).left,n=o.top,r=o.width,o=o.height,[e+window.pageXOffset+r/2,n+window.pageYOffset+o/2]),o=(t=f(o=t,2))[0],t=t[1],n=f(n,2),[o+n[0],t+n[1]]),t=Math.min(a.offsetWidth,a.offsetHeight)/4;i((n=o,r=r,Math.sqrt([n[0]-r[0],n[1]-r[1]].map(function(t){return Math.pow(t,2)}).reduce(function(t,e){return t+e},0))>t?o:null))}return 0===c.length&&window.addEventListener("deviceorientation",u,!0),c=[].concat(n(c),[e]),function(){0===(c=c.filter(function(t){return t!==e})).length&&window.removeEventListener("deviceorientation",u,!0)}}var a,c=[];return e(t).default.registerPointProvider("tilt",i),i});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("creepyface")):"function"==typeof define&&define.amd?define(["creepyface"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).creepyface)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,f=e[Symbol.iterator]();!(r=(a=f.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t(e).default.registerPointProvider("tilt",function(n){function e(e){var t=e.beta,e=e.gamma;null!==t&&null!==e&&(r?n([-(window.innerWidth*(e-r.gamma))/90,-(window.innerHeight*(t-r.beta))/180]):r={beta:t,gamma:e})}var r;return window.addEventListener("deviceorientation",e,!0),function(){window.removeEventListener("deviceorientation",e,!0)}},function(e,t){if(!e)return e;var n,r,i,i=(n=(r=(i=t).getBoundingClientRect()).left,o=r.top,i=r.width,r=r.height,[n+window.pageXOffset+i/2,o+window.pageYOffset+r/2]),e=(o=i,r=(e=a(r=e,2))[0],e=e[1],o=a(o,2),[r+o[0],e+o[1]]),o=Math.min(t.offsetWidth,t.offsetHeight)/4;return t=e,i=i,Math.sqrt([t[0]-i[0],t[1]-i[1]].map(function(e){return Math.pow(e,2)}).reduce(function(e,t){return e+t},0))>o?e:null})});
{
"name": "creepyface-tilt",
"version": "7.5.0",
"version": "8.0.0-alpha.0",
"main": "dist/index.js",

@@ -39,3 +39,3 @@ "types": "dist/index.d.ts",

"@rollup/plugin-node-resolve": "^11.1.1",
"creepyface": "^7.5.0",
"creepyface": "^8.0.0-alpha.0",
"rollup": "^2.38.4",

@@ -42,0 +42,0 @@ "rollup-plugin-uglify": "^6.0.4",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc